vagrant up 未运行进度状态:E_INVALIDARG VBoxManage.exe:错误:设备导入失败

O.K*_*Kuz 4 vagrant

这是cmd错误,我不明白错误在哪里,我一次又一次地碰到它,无法解决它。

$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Preparing master VM for linked clones...
    default: This is a one time operation. Once the master VM is prepared,
    default: it will be used as a base for linked clones, making the creation
    default: of new VMs take milliseconds on a modern system.
==> default: Importing base box 'hashicorp/bionic64'...
There was an error while executing `VBoxManage`, a CLI used by Vagrant
for controlling VirtualBox. The command and stderr is shown below.

Command: ["import", "\\\\?\\C:\\HashiCorp\\boxes\\hashicorp-VAGRANTSLASH-bionic64\\1.0.282\\virtualbox\\box.ovf", "--vsys", "0", "--vmname", "ubuntu-18.04-amd64_1574870798285_57998", "--vsys", "0", "--unit", "11", "--disk", "C:/Users/\u256C\u044B\u0445\u0443/VirtualBox VMs/ubuntu-18.04-amd64_1574870798285_57998/ubuntu-18.04-amd64-disk001.vmdk"]

Stderr: 0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Interpreting \\?\C:\HashiCorp\boxes\hashicorp-VAGRANTSLASH-bionic64\1.0.282\virtualbox\box.ovf...
OK.
0%...
Progress state: E_INVALIDARG
VBoxManage.exe: error: Appliance import failed
VBoxManage.exe: error: Code E_INVALIDARG (0x80070057) - One or more arguments are invalid (extended info not available)
VBoxManage.exe: error: Context: "enum RTEXITCODE __cdecl handleImportAppliance(struct HandlerArg *)" at line 957 of file VBoxManageAppliance.cpp
Run Code Online (Sandbox Code Playgroud)

Bar*_*art 11

我遇到了同样的问题,并通过更改 VirtualBox 的基本 VM 文件夹解决了它:

  1. 打开虚拟盒子
  2. File -> Preferences
  3. 在常规选项卡中,将默认计算机文件夹路径更改为现有路径。
  4. vagrant up再次运行

就我而言,VirtualBox 的默认计算机文件夹仍然指向我不再连接的外部硬盘驱动器。通过手动导入 Vagrant 下载的 .ovf 文件到 VBox 中,File -> Import Virtual Appliance我找到了上述解决方案。Vagrant 在底层做了同样的事情。


Kat*_*jan 5

我遇到了同样的问题,并迷惑了几个小时。最后,它通过以下步骤起作用了。

  1. 我的 C 盘没有足够的内存让 Vagrant 启动虚拟盒子。清除 Vagrant 的内存。一切顺利,没有任何问题。