如何在Vagrant下运行OSX El Capitan Box?

时间:2016-08-23 12:58:06

标签: macos vagrant osx-elcapitan

我试图在流浪汉下设置一个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支持?

编辑:投票结束的人,请您告诉我这是什么问题?我很乐意纠正它。

2 个答案:

答案 0 :(得分:3)

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

将以下行添加到Criteria criteria = session.createCriteria(User.class); criteria.setFetchMode("userRoles", FetchMode.EAGER); List userList = criteria.list(); 块已解决问题(感谢@TomMillard):

Vagrant.configure(2) do |config|

答案 1 :(得分:0)

您可以在设置上禁用USB端口。 enter image description here enter image description here