【vagrant】第一次安裝添加box報錯:The box failed to unpackage properly....


報錯信息

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.

原因

使用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%


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM