盒子导入失败?

vagrant box add metadata.json
==> box: Loading metadata for box 'metadata.json'
box: URL: file://G:/lc-homestead-6.1.1-2018090400/lc-homestead-6.1.1-2018090400/metadata.json
==> box: Adding box 'lc/homestead' (v6.1.1) for provider: virtualbox
box: Downloading: virtualbox.box
box:
The box failed to unpackage properly. Please verify that the box
file you're trying to add is not corrupted and that enough disk space
is available and then try again.
The output from attempting to unpackage (if any):

x ./box.ovf
x ./Vagrantfile
x ./box-disk001.vmdk: Write failed
bsdtar.EXE: Error exit delayed from previous errors.
出现这个错误 是什么问题呢?

《L01 基础入门》
我们将带你从零开发一个项目并部署到线上,本课程教授 Web 开发中专业、实用的技能,如 Git 工作流、Laravel Mix 前端工作流等。
《G01 Go 实战入门》
从零开始带你一步步开发一个 Go 博客项目,让你在最短的时间内学会使用 Go 进行编码。项目结构很大程度上参考了 Laravel。
Summer
最佳答案

试了一下,没啥问题。报错信息里有以下一行,有可能是硬盘空间不够:

The box failed to unpackage properly. Please verify that the box
file you're trying to add is not corrupted and that enough disk space.

请看下 VirtualBox 里的配置(如下图),这个才是你虚拟机的存储路径:

file

5年前 评论
讨论数量: 12

在windows下遇到同样的问题,在执行命令时发现会占用C盘空间,但是找了配置路径,都没有配置C盘的,最后发现是vagrant的问题。
使用vagrant up启动虚拟机的时候,打包的虚拟机会保存在.vagrant.d/boxes目录下,这个文件夹默认是存放在系统盘上的C:/Users/{用户名}目录下的,如果box文件非常多的话,会造成空间不够。

解决:把这个目录移到其它盘
1、将.vagrant.d文件夹剪切到别的盘,比如d:/software/vagrant/.vagrant.d
2、设置环境变量VAGRANT_HOME为d:/software/vagrant/.vagrant.d
3、在path环境变量下添加%VAGRANT_HOME%

希望帮到其它同学~

5年前 评论
woxiaobai 4年前

vagrant和virtualbox 我都放在G盘下 剩余空间还有90G

5年前 评论

使用的是Vagrant 2.0.2

5年前 评论
Summer

@niechen virtual box 版本呢?

5年前 评论
Summer

试了一下,没啥问题。报错信息里有以下一行,有可能是硬盘空间不够:

The box failed to unpackage properly. Please verify that the box
file you're trying to add is not corrupted and that enough disk space.

请看下 VirtualBox 里的配置(如下图),这个才是你虚拟机的存储路径:

file

5年前 评论

@Summer

file
virtual box 版本是 5.2.12

5年前 评论

@Summer 已解决 的确是C盘的空间大小不够,谢谢。 :+1: :+1: :+1: :smile: :smile: :smile:

5年前 评论

c盘大小不够,如何解决呢

5年前 评论

请问为什么我C盘的内存还有80个G也会报
The box failed to unpackage properly. Please verify that the box
file you're trying to add is not corrupted and that enough disk space.

5年前 评论

@niechen 兄弟 怎么解决的 我也是这个问题

4年前 评论

讨论应以学习和精进为目的。请勿发布不友善或者负能量的内容,与人为善,比聪明更重要!