我最近遇到了Vagrant和Virtualbox的麻烦,我无法确定发生了什么。我正在尝试使用此存储库中的Vagrant设置(next(String)
),但每次发出vagrant up
命令时,我都会收到有关损坏图像的相同回溯错误:
There was an error while executing `VBoxManage`, a CLI used by Vagrant
for controlling VirtualBox. The command and stderr is shown below.
Command: ["import", "/home/dan/.vagrant.d/boxes/ubuntu-VAGRANTSLASH-trusty64/20160602.0.0/virtualbox/box.ovf", "--vsys", "0", "--vmname", "ubuntu-cloudimg-trusty-vagrant-amd64_1466024621846_36463", "--vsys", "0", "--unit", "6", "--disk", "/home/dan/VirtualBox VMs/ubuntu-cloudimg-trusty-vagrant-amd64_1466024621846_36463/box-disk1.vmdk"]
Stderr: 0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Interpreting /home/dan/.vagrant.d/boxes/ubuntu-VAGRANTSLASH-trusty64/20160602.0.0/virtualbox/box.ovf...
OK.
0%...
Progress state: VBOX_E_FILE_ERROR
VBoxManage: error: Appliance import failed
VBoxManage: error: Could not create the imported medium '/home/dan/VirtualBox VMs/ubuntu-cloudimg-trusty-vagrant-amd64_1466024621846_36463/box-disk1.vmdk'.
VBoxManage: error: VMDK: Compressed image is corrupted '/home/dan/.vagrant.d/boxes/ubuntu-VAGRANTSLASH-trusty64/20160602.0.0/virtualbox/box-disk1.vmdk' (VERR_ZIP_CORRUPTED)
VBoxManage: error: Details: code VBOX_E_FILE_ERROR (0x80bb0004), component ApplianceWrap, interface IAppliance
VBoxManage: error: Context: "RTEXITCODE handleImportAppliance(HandlerArg*)" at line 877 of file VBoxManageAppliance.cpp
我尝试使用vagrant box remove ubuntu/trusty64
删除损坏的框并重新发出vagrant up
命令,该框似乎已成功下载,但每次导入基本框时都会失败。
我目前在Ubuntu 14.04上使用Vagrant 1.8.4和Virtualbox 5.0.20。任何帮助将不胜感激。
答案 0 :(得分:0)
为了帮助您排查故障,请查看:
vagrant init ubuntu/trusty64
机器出现了吗?如果是这样,那么环境应该没问题。
接下来我将再次创建一个新目录,并仅复制该github仓库中的相关文件,不包括隐藏目录.vagrant
理想情况下,.gitignore应该出现在该回购中,不包括.vagrant目录。
祝你好运!