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默認(rèn)會把box文件緩存在家目錄下的.vagrant.d文件夾內(nèi).
解決方案
- 第一種:修改VAGRANTHOME環(huán)境變量為其他磁盤的文件夾
- 第二種:將.vagrant.d移動到其他磁盤病往,并建立軟連接到家目錄
除此之外,vagrant使用virtualbox作為虛擬化層時virtualbox的虛擬機(jī)緩存也在家目錄蒸绩。
同樣可以將其移動到其他磁盤并軟連接之。