使用Vagrant时出现VirtualBox错误

4

我想使用Vagrant创建一个开发环境的虚拟机。但是,在尝试将虚拟机安装到VirtualBox中时,出现了错误。以下是VBoxManage import的输出。我的同事能够毫无问题地运行此命令。我使用的是Mac OS X 10.6.8,他使用的是Debian。

有人知道这个错误的含义吗?

20:41:26:haitran:vagrant $  vagrant up
[default] Box ubuntu1104 was not found. Fetching box from specified URL...
[default] Downloading with Vagrant::Downloaders::HTTP...
[default] Downloading box: http://dl.dropbox.com/u/7490647/talifun-ubuntu-11.04-server-amd64.box
[default] Extracting box...
[default] Verifying box...
[default] Cleaning up downloaded box...
[default] Importing base box 'ubuntu1104'...
The VM import failed! Try running `VBoxManage import` on the box file
manually for more verbose error output.
21:06:54:haitran:vagrant $  VBoxManage import ~/.vagrant.d/boxes/ubuntu1104/box.ovf 
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Interpreting /Users/haitran/.vagrant.d/boxes/ubuntu1104/box.ovf...
OK.
Disks:  vmdisk1 41943040000     -1      http://www.vmware.com/interfaces/specifications/vmdk.html#streamOptimized       box-disk1.vmdk  -1      -1
Virtual system 0:
 0: Suggested OS type: "Ubuntu_64"
    (change with "--vsys 0 --ostype <type>"; use "list ostypes" to list all possible values)
 1: Suggested VM name "talifun-ubuntu-11.04-server-amd64"
    (change with "--vsys 0 --vmname <name>")
 2: Number of CPUs: 1
    (change with "--vsys 0 --cpus <n>")
 3: Guest memory: 360 MB
    (change with "--vsys 0 --memory <MB>")
 4: Network adapter: orig NAT, config 2, extra slot=0;type=NAT
 5: CD-ROM
    (disable with "--vsys 0 --unit 5 --ignore")
 6: IDE controller, type PIIX4
    (disable with "--vsys 0 --unit 6 --ignore")
 7: IDE controller, type PIIX4
    (disable with "--vsys 0 --unit 7 --ignore")
 8: SATA controller, type AHCI
    (disable with "--vsys 0 --unit 8 --ignore")
 9: Hard disk image: source image=box-disk1.vmdk, target path=/Users/haitran/VirtualBox VMs/talifun-ubuntu-11.04-server-amd64/box-disk1.vmdk, controller=8;channel=0
    (change target path with "--vsys 0 --unit 9 --disk path";
    disable with "--vsys 0 --unit 9 --ignore")
0%...
Progress state: VBOX_E_FILE_ERROR
VBoxManage: error: Could not create the clone medium '/Users/haitran/VirtualBox VMs/talifun-ubuntu-11.04-server-amd64/box-disk1.vmdk' (VERR_GENERAL_FAILURE)
VBoxManage: error: Details: code VBOX_E_FILE_ERROR (0x80bb0004), component Appliance, interface IAppliance, callee 
Context: "ImportAppliance" at line 793 of file VBoxManageAppliance.cpp

你能找到答案了吗? - spuder
2个回答

2
似乎这个问题已经存在一段时间了,也许你已经解决了这个问题。我们也在使用Vagrant,并遇到了一个奇怪的问题,即盒子被损坏了。
对于我们来说,这导致在某台笔记本电脑上无法完成规划,但在其他所有设备上都可以。除了规划进程仅仅卡住外,没有明确的失败迹象。
您是否检查了sha1-sum或类似内容,以验证您下载的盒子文件与同事完全相同?所有磁盘映像文件都缓存在~/.vagrant.d/boxes下,因此您可以在导入后立即比较该目录下的校验和。

这个回答已经有3年了。我有理由认为我面临着类似的问题。还有其他的新发现/提示吗? - Nikos Alexandris

1

看起来您还没有下载该虚拟机,因此vagrant正在尽力查找该虚拟机的原始位置。

请尝试手动下载该虚拟机。

vagrant box add ubuntu1104  http://dl.dropbox.com/u/7490647/talifun-ubuntu-11.04-server-amd64.box

同时尝试增加日志记录等级

$ VAGRANT_LOG=DEBUG vagrant up

http://docs-v1.vagrantup.com/v1/docs/debugging.html

最后,尝试使用不同的盒子镜像。它可能安装了更新/旧版本的虚拟机增强功能。这可能解释为什么你的同事没有问题。

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接