Vagrant Aerospike:VBoxManage:错误:无法创建仅用于主机的适配器

Vagrant Aerospike:VBoxManage:错误:无法创建仅用于主机的适配器,vagrant,virtual-machine,virtualbox,aerospike,Vagrant,Virtual Machine,Virtualbox,Aerospike,我正在运行以下vagrant命令 vagrant up Bringing machine 'default' up with 'virtualbox' provider... ==> default: Checking if box 'aerospike/aerospike-ce' is up to date... ==> default: Clearing any previously set network interfaces... There was an error

我正在运行以下
vagrant
命令

vagrant up



Bringing machine 'default' up with 'virtualbox' provider...
==> default: Checking if box 'aerospike/aerospike-ce' is up to date...
==> default: Clearing any previously set network interfaces...
There was an error while executing `VBoxManage`, a CLI used by Vagrant
for controlling VirtualBox. The command and stderr is shown below.

Command: ["hostonlyif", "create"]

Stderr: 0%...
Progress state: NS_ERROR_FAILURE
VBoxManage: error: Failed to create the host-only adapter
VBoxManage: error: VBoxNetAdpCtl: Error while adding new interface: failed to open /dev/vboxnetctl: No such file or directory
VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component HostNetworkInterfaceWrap, interface IHostNetworkInterface
VBoxManage: error: Context: "RTEXITCODE handleCreate(HandlerArg *)" at line 94 of file VBoxManageHostonly.cpp
运行up命令时,出现上述错误。

流浪版本:流浪2.0.4
VirtualBox版本:5.2.10r122088
OS:mac osX

更新1:
我重新安装了virtualbox,现在错误已更新为下面的错误

Bringing machine 'default' up with 'virtualbox' provider...
==> default: Checking if box 'aerospike/aerospike-ce' is up to date...
==> default: Clearing any previously set forwarded ports...
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
    default: Adapter 1: nat
    default: Adapter 2: hostonly
    default: Adapter 3: hostonly
==> default: Forwarding ports...
    default: 3000 (guest) => 3000 (host) (adapter 1)
    default: 8081 (guest) => 8081 (host) (adapter 1)
    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", "a5ebe584-c9fa-42f4-a1b5-cff2c0bd441f", "--type", "headless"]

Stderr: VBoxManage: error: The virtual machine 'aerospike-vm_default_1524766631459_17780' has terminated unexpectedly during startup with exit code 1 (0x1)
VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component MachineWrap, interface IMachine
日志文件:

VirtualBox: object created
00:00:00.160282 nspr-3   ERROR [COM]: aRC=VBOX_E_OBJECT_NOT_FOUND (0x80bb0001) aIID={85cd948e-a71f-4289-281e-0ca7ad48cd89} aComponent={SessionMachine} aText={No storage device attached to device slot 0 on port 1 of controller 'IDE Controller'}, preserve=false aResultDetail=0
00:00:00.160538 nspr-2   ERROR [COM]: aRC=VBOX_E_OBJECT_NOT_FOUND (0x80bb0001) aIID={85cd948e-a71f-4289-281e-0ca7ad48cd89} aComponent={SessionMachine} aText={No storage device attached to device slot 0 on port 1 of controller 'IDE Controller'}, preserve=false aResultDetail=0
00:00:00.160757 nspr-2   ERROR [COM]: aRC=VBOX_E_OBJECT_NOT_FOUND (0x80bb0001) aIID={85cd948e-a71f-4289-281e-0ca7ad48cd89} aComponent={SessionMachine} aText={No storage device attached to device slot 1 on port 1 of controller 'IDE Controller'}, preserve=false aResultDetail=0
00:00:00.160945 nspr-2   ERROR [COM]: aRC=VBOX_E_OBJECT_NOT_FOUND (0x80bb0001) aIID={85cd948e-a71f-4289-281e-0ca7ad48cd89} aComponent={SessionMachine} aText={No storage device attached to device slot 1 on port 1 of controller 'IDE Controller'}, preserve=false aResultDetail=0
00:00:00.172916 nspr-3   ERROR [COM]: aRC=NS_ERROR_FAILURE (0x80004005) aIID={85cd948e-a71f-4289-281e-0ca7ad48cd89} aComponent={SessionMachine} aText={This machine does not have any snapshots}, preserve=false aResultDetail=0
00:00:00.238766 nspr-3   ERROR [COM]: aRC=VBOX_E_OBJECT_NOT_FOUND (0x80bb0001) aIID={85cd948e-a71f-4289-281e-0ca7ad48cd89} aComponent={SessionMachine} aText={No storage device attached to device slot 0 on port 1 of controller 'IDE Controller'}, preserve=false aResultDetail=0
00:00:00.239024 nspr-2   ERROR [COM]: aRC=VBOX_E_OBJECT_NOT_FOUND (0x80bb0001) aIID={85cd948e-a71f-4289-281e-0ca7ad48cd89} aComponent={SessionMachine} aText={No storage device attached to device slot 0 on port 1 of controller 'IDE Controller'}, preserve=false aResultDetail=0
00:00:00.239219 nspr-2   ERROR [COM]: aRC=VBOX_E_OBJECT_NOT_FOUND (0x80bb0001) aIID={85cd948e-a71f-4289-281e-0ca7ad48cd89} aComponent={SessionMachine} aText={No storage device attached to device slot 1 on port 1 of controller 'IDE Controller'}, preserve=false aResultDetail=0
00:00:00.239424 nspr-2   ERROR [COM]: aRC=VBOX_E_OBJECT_NOT_FOUND (0x80bb0001) aIID={85cd948e-a71f-4289-281e-0ca7ad48cd89} aComponent={SessionMachine} aText={No storage device attached to device slot 1 on port 1 of controller 'IDE Controller'}, preserve=false aResultDetail=0
00:00:00.251936 nspr-3   ERROR [COM]: aRC=NS_ERROR_FAILURE (0x80004005) aIID={85cd948e-a71f-4289-281e-0ca7ad48cd89} aComponent={SessionMachine} aText={This machine does not have any snapshots}, preserve=false aResultDetail=0
00:00:00.316957 nspr-2   ERROR [COM]: aRC=VBOX_E_OBJECT_NOT_FOUND (0x80bb0001) aIID={85cd948e-a71f-4289-281e-0ca7ad48cd89} aComponent={SessionMachine} aText={No storage device attached to device slot 0 on port 1 of controller 'IDE Controller'}, preserve=false aResultDetail=0
00:00:00.317204 nspr-3   ERROR [COM]: aRC=VBOX_E_OBJECT_NOT_FOUND (0x80bb0001) aIID={85cd948e-a71f-4289-281e-0ca7ad48cd89} aComponent={SessionMachine} aText={No storage device attached to device slot 0 on port 1 of controller 'IDE Controller'}, preserve=false aResultDetail=0
00:00:00.317389 nspr-3   ERROR [COM]: aRC=VBOX_E_OBJECT_NOT_FOUND (0x80bb0001) aIID={85cd948e-a71f-4289-281e-0ca7ad48cd89} aComponent={SessionMachine} aText={No storage device attached to device slot 1 on port 1 of controller 'IDE Controller'}, preserve=false aResultDetail=0
00:00:00.317561 nspr-3   ERROR [COM]: aRC=VBOX_E_OBJECT_NOT_FOUND (0x80bb0001) aIID={85cd948e-a71f-4289-281e-0ca7ad48cd89} aComponent={SessionMachine} aText={No storage device attached to device slot 1 on port 1 of controller 'IDE Controller'}, preserve=false aResultDetail=0
00:00:00.330797 nspr-2   ERROR [COM]: aRC=NS_ERROR_FAILURE (0x80004005) aIID={85cd948e-a71f-4289-281e-0ca7ad48cd89} aComponent={SessionMachine} aText={This machine does not have any snapshots}, preserve=false aResultDetail=0
对于“没有存储设备连接到设备”错误,您可以尝试重新添加IDE控制器。假设发生了损坏配置的事件

下面是一个Vagrantfile示例:

流浪猫档案

def provisioned?(vm_name='default', provider='virtualbox')  
  if ! File.exist?(".vagrant/machines/#{vm_name}/#{provider}/action_provision")
     vb.customize ["storagectl", :id, "--name", "IDE Controller", "--add", "ide"]
  end
end

Vagrant.configure("2") do |config|
  config.vm.box = "aerospike/aerospike-ce"
  config.vm.box_version = "4.0.0.5"
end
要尝试的命令:

删除虚拟机:

vagrant destroy
vagrant up --provider virtualbox
启动虚拟机:

vagrant destroy
vagrant up --provider virtualbox
如果问题仍然存在,您可以尝试从virtualbox中删除VM以及~/virtualbox\VMs/

例如:

vagrant up --provider virtualbox
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Importing base box 'aerospike/aerospike-ce'...
==> default: Matching MAC address for NAT networking...
==> default: Checking if box 'aerospike/aerospike-ce' is up to date...
==> default: Setting the name of the VM: tmp_default_1525381682916_49938
==> default: Fixed port collision for 3000 => 3000. Now on port 2221.
==> default: Fixed port collision for 8081 => 8081. Now on port 2223.
==> default: Fixed port collision for 22 => 2222. Now on port 2224.
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
    default: Adapter 1: nat
    default: Adapter 2: hostonly
==> default: Forwarding ports...
    default: 3000 (guest) => 2221 (host) (adapter 1)
    default: 8081 (guest) => 2223 (host) (adapter 1)
    default: 22 (guest) => 2224 (host) (adapter 1)
==> default: Running 'pre-boot' VM customizations...
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
    default: SSH address: 127.0.0.1:2224
    default: SSH username: vagrant
    default: SSH auth method: private key
==> default: Machine booted and ready!
[default] GuestAdditions 5.2.10 running --- OK.
==> default: Checking for guest additions in VM...
==> default: Configuring and enabling network interfaces...
    default: SSH address: 127.0.0.1:2224
    default: SSH username: vagrant
    default: SSH auth method: private key
==> default: Mounting shared folders...
    default: /vagrant => /private/tmp

看起来这是一个virtualbox问题。您安装了哪个版本的virtualbox?你在运行哪个操作系统?请参阅:您是否先卸载所有以前版本的virtualbox并重新启动。请参阅vagrant问题:您好,您能检查日志文件中观察到的问题吗根用户可能没有用户主目录中.VirtualBox文件夹的信息。设置VBOX\u用户\u主路径可能是建议的解决方案。您的意思是在bash\u配置文件中设置路径还是授予读取权限?