我正在遵循基本的“入门”指南:http://docs.vagrantup.com/v2/getting-started/index.html
我运行vagrant init <etc>
了vagrant up
,但是失败并出现“NS_ERROR_CALL_FAILED”错误。
然后通过启用调试日志记录VAGRANT_LOG=debug vagrant up
,我得到以下错误输出:
ERROR vagrant: /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/plugins/providers/virtualbox/driver/base.rb:316:in `execute'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/plugins/providers/virtualbox/driver/version_4_2.rb:165:in `import'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/plugins/providers/virtualbox/action/import.rb:15:in `call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/warden.rb:34:in `call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/builtin/handle_box_url.rb:72:in `call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/warden.rb:34:in `call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/plugins/providers/virtualbox/action/check_accessible.rb:18:in `call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/warden.rb:34:in `call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/runner.rb:61:in `block in run'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/util/busy.rb:19:in `busy'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/runner.rb:61:in `run'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/builtin/call.rb:51:in `call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/warden.rb:34:in `call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/builtin/config_validate.rb:25:in `call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/warden.rb:34:in `call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/plugins/providers/virtualbox/action/check_virtualbox.rb:17:in `call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/warden.rb:34:in `call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/builder.rb:116:in `call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/runner.rb:61:in `block in run'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/util/busy.rb:19:in `busy'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/runner.rb:61:in `run'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/machine.rb:147:in `action'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/batch_action.rb:63:in `block (2 levels) in run'
INFO interface: error: There was an error while executing `VBoxManage`, a CLI used by Vagrant
for controlling VirtualBox. The command and stderr is shown below.
Command: ["import", "/Users/me/.vagrant.d/boxes/precise32/virtualbox/box.ovf"]
Stderr: 0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Interpreting /Users/me/.vagrant.d/boxes/precise32/virtualbox/box.ovf...
OK.
0%...
Progress object failure: NS_ERROR_CALL_FAILED
我的系统设置信息:
Vagrant 1.2.2
VirtualBox 4.2.14(也尝试了 4.2.10,同样的错误)
Mac OSX 10.8.3
答案1
这是 VirtualBox 4.2.14 版本中的回归问题,并且已将修复程序签入版本控制中。
https://www.virtualbox.org/ticket/11895
在修复发布之前,降级 VirtualBox 是您的最佳选择。据报告,版本 4.2.12 可以正常工作。
答案2
以下内容可能会有所帮助:
http://www.rkoster.net/2011/02/17/virtualbox-code-ns_error_call_failed-0x800706be/
sudo adduser $USER vboxusers
https://github.com/mitchellh/vagrant/issues/1622
为获得最佳效果,请退出所有 VirtualBox UI,停止所有 VirtualBox VM,并且仅从单个用户使用 Vagrant + VirtualBox。
或者...
事实上,我是以提升的提示符(管理员)身份运行的。
您是否有任何奇怪的设置,例如多个用户、打开的 GUI、或访问受限的用户或非标准文件夹或严格的权限?