使用 Vagrant 时 VirtualBox 出现错误

发布于 2024-12-06 15:42:46 字数 2487 浏览 1 评论 0原文

我想使用 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

I want to use Vagrant to create a virtual machine for a development environment. I am getting an error when it tries to install the virtual machine into VirtualBox. The output of VBoxManage import is below. My colleague is able to run this command without any problem. I am on Mac OS X 10.6.8 and he is on Debian.

Does anyone have an idea of the meaning of this error?

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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

血之狂魔 2024-12-13 15:42:46

看来这个问题已经存在了一段时间,所以也许您已经解决了问题。我们也在使用 Vagrant 并遇到了一个奇怪的问题,盒子被损坏了。

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

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

Seems the question has been sitting here for a while, so maybe you already solved the problem. We're also using Vagrant and run into a strange problem where the box was corrupted.

For us this caused the provisioning to fail on a given laptop, but work on all the others. There was no clear indication of the failure, besides the provisioning process just froze.

Have you checked the sha1-sum or similar, to verify that you have exactly the same box file downloaded as your colleague? All the disk image files are cached under ~/.vagrant.d/boxes, so you could compare the checksums under that directory, right after import.

尴尬癌患者 2024-12-13 15:42:46

看来您还没有下载该盒子,因此 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

最后,尝试不同的框图像。它可能安装了较新/较旧版本的 Virtual Box 来宾版本。可以解释为什么你的同事对此没有问题。

It looks like you haven't downloaded the box yet, so vagrant is doing it's best to find the original location of the box.

Try downloading the box manually

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

Also try turning up the logging

$ VAGRANT_LOG=DEBUG vagrant up

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

Lastly, try a different box image. It may have an newer/older version of virtual box guest editions installed. Could explain why your colleague has no issues with it.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文