【问题标题】:How can I run an OSX El Capitan Box under Vagrant?如何在 Vagrant 下运行 OSX El Capitan Box?
【发布时间】:2016-08-23 12:58:05
【问题描述】:

我正在尝试在 vagrant 下设置一个 OSX(最好是 El Capitan)盒子。我的主机操作系统是 El Capitan 10.11.6 (15G31)。

这是我目前尝试过的

vagrant init
vagrant box add jhcook/osx-elcapitan-10.11
# edit vagrant init such that config.vm.box = "jhcook/osx-elcapitan-10.11"
vagrant up

但是,我收到以下错误:

Bringing machine 'default' up with 'virtualbox' provider...
==> default: Importing base box 'jhcook/osx-elcapitan-10.11'...
==> default: Matching MAC address for NAT networking...
==> default: Checking if box 'jhcook/osx-elcapitan-10.11' is up to date...
==> default: Setting the name of the VM: ratatouille_default_1471905801413_58611
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
    default: Adapter 1: nat
==> default: Forwarding ports...
    default: 22 (guest) => 2222 (host) (adapter 1)
==> default: Running 'pre-boot' VM customizations...
==> default: Booting VM...
There was an error while executing `VBoxManage`, a CLI used by Vagrant
for controlling VirtualBox. The command and stderr is shown below.

Command: ["startvm", "e1aafdeb-650b-4b94-89cf-4ef39e22e7f6", "--type", "headless"]

Stderr: VBoxManage: error: Implementation of the USB 2.0 controller not found!
VBoxManage: error: Because the USB 2.0 controller state is part of the saved VM state, the VM cannot be started. To fix this problem, either install the 'Oracle VM VirtualBox Extension Pack' or disable USB 2.0 support in the VM settings.
VBoxManage: error: Note! This error could also mean that an incompatible version of the 'Oracle VM VirtualBox Extension Pack' is installed (VERR_NOT_FOUND)
VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component ConsoleWrap, interface IConsole

我做错了什么?

如何禁用 USB 2.0 支持?

编辑:那些投票结束的人,你能告诉我问题是什么吗?我很乐意纠正它。

【问题讨论】:

  • 您是否厌倦了修复错误? “由于 USB 2.0 控制器状态是已保存 VM 状态的一部分,因此无法启动 VM。要解决此问题,请安装 'Oracle VM VirtualBox Extension Pack' 或在 VM 设置中禁用 USB 2.0 支持。”

标签: macos vagrant osx-elcapitan


【解决方案1】:

好的,这真的很简单。我将此归咎于我对 Vagrant 缺乏经验。

将以下行添加到Vagrant.configure(2) do |config| 块已解决问题(感谢@TomMillard):

  # disable USB 2.0
  config.vm.provider "virtualbox" do |vb|
      vb.customize ["modifyvm", :id, "--usb", "off"]
      vb.customize ["modifyvm", :id, "--usbehci", "off"]
  end

【讨论】:

    【解决方案2】:

    您可以在设置中禁用 USB 端口。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2017-07-09
      • 2017-01-15
      • 1970-01-01
      • 2016-07-05
      • 2016-02-05
      • 2015-12-29
      • 2016-08-09
      • 2015-09-11
      相关资源
      最近更新 更多