vagrant空间不够问题解决

vagrant添加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):

这种情况一般是空间不够。vagrant默认会把box文件缓存在家目录下的.vagrant.d文件夹内.

解决方案

  • 第一种:修改VAGRANTHOME环境变量为其他磁盘的文件夹
  • 第二种:将.vagrant.d移动到其他磁盘,并建立软连接到家目录

除此之外,vagrant使用virtualbox作为虚拟化层时virtualbox的虚拟机缓存也在家目录。
同样可以将其移动到其他磁盘并软连接之。

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容