4

我想使用 Vagrant 为开发环境创建一个虚拟机。尝试将虚拟机安装到 VirtualBox 时出现错误。VBoxManage 导入的输出如下。我的同事能够毫无问题地运行此命令。我在 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
4

2 回答 2

2

似乎这个问题在这里已经有一段时间了,所以也许你已经解决了这个问题。我们也在使用 Vagrant 并遇到了一个奇怪的问题,即盒子损坏了。

对我们来说,这导致在给定笔记本电脑上的配置失败,但在所有其他笔记本电脑上都可以工作。除了配置过程刚刚冻结之外,没有明确的失败迹象。

您是否检查过 sha1-sum 或类似文件,以验证您下载的 box 文件是否与您的同事完全相同?所有磁盘映像文件都缓存在 ~/.vagrant.d/boxes 下,因此您可以在导入后立即比较该目录下的校验和。

于 2012-01-23T15:02:12.680 回答
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

最后,尝试不同的盒子图像。它可能安装了新/旧版本的虚拟盒子来宾版本。可以解释为什么你的同事对此没有任何问题。

于 2013-05-18T01:28:56.527 回答