1

I am running the following vagrant command,

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

on running the up command, the above error is coming.

Vagrant version : Vagrant 2.0.4
VirtualBox version : 5.2.10r122088
OS : mac osX

Update 1:
I reinstalled the virtualbox and now the error has updated to the one below

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

Log file:

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
swayamraina
  • 2,958
  • 26
  • 28
  • Looks like this is a virtualbox issue. Which version of virtualbox do you have installed? Which OS are your running? Please see: https://github.com/hashicorp/vagrant/issues/7212 and also https://stackoverflow.com/questions/21069908/vboxmanage-error-failed-to-create-the-host-only-adapter – lvolmar Apr 26 '18 at 19:40
  • Did you un-install all previous versions of virtualbox and reboot first. please see vagrant issue : https://github.com/hashicorp/vagrant/issues/2418 – lvolmar Apr 26 '18 at 20:43
  • Hi, can you check the log file for the observed issue – swayamraina May 01 '18 at 05:51
  • The the root user may not have the info to the .VirtualBox folder in the user's home directory. Setting the VBOX_USER_HOME path may be the recommended fix. – lvolmar May 01 '18 at 22:00
  • do you mean setting the path in bash_profile or giving read permissions? – swayamraina May 02 '18 at 02:07
  • What i get from the error message s that there is no disk attached to the VM. But i have added an optical disk with .iso file for system boot. – swayamraina May 02 '18 at 08:07
  • I think you are correct in terms of not able to acces the disk.. There seems to be some corruption for the virtualbox vm. Could you try deleting the VM from virtualbox GUI. and also from ~/VirtualBox\ VMs/ directories. – lvolmar May 03 '18 at 20:19

1 Answers1

1

For the "No storage device attached to device" error you can try to add the IDE controller back. Assuming that something occurred that corrupted your configuration.

Here is a Vagrantfile example:

cat 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

Commands to try:

Deleting the VM:

vagrant destroy

Starting the VM:

vagrant up --provider virtualbox

If issue persist, you can try to delete the VM from virtualbox and all cached files under ~/VirtualBox\ VMs/

Example:

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
lvolmar
  • 2,022
  • 1
  • 12
  • 8