Vagrant: There was an error while executing `VBoxManage`, a CLI used by Vagrant for controlling VirtualBox.

Created on 29 Dec 2017  ·  34Comments  ·  Source: hashicorp/vagrant

I recently (today) updated my Virtualbox and vagrant installs to the latest versions. When I got to boot a current project this happens. I destroyed my old vagrant box that the project was created with, and created a new one as a test, but I still get the same error.

Error that comes to screen after "vagrant up"

There was an error while executing VBoxManage, a CLI used by Vagrant
for controlling VirtualBox. The command and stderr is shown below.

Command: ["startvm", "007ab888-e415-4f3a-9a4a-3682504c718a", "--type", "headless"]

Stderr: VBoxManage.exe: error: The virtual machine 'Projects_default_1514560086822_51787' has terminated unexpectedly during startup with exit code 1 (0x1). More details may be available in 'C:\Users\my.name\VirtualBox VMs\Projects_default_1514560086822_51787\Logs\VBoxHardening.log'
VBoxManage.exe: error: Details: code E_FAIL (0x80004005), component MachineWrap, interface IMachine

Vagrant version

2.0.1

Virtualbox version

5.2.4

Host operating system

Windows 10

Guest operating system

CentOS7.2

Vagrantfile

$set_environment_variables = <<SCRIPT
tee "/etc/profile.d/myvars.sh" > "/dev/null" <<EOF
# required environment variables.
export ELASTIC_USER=xxxxxxxxxx
export ELASTIC_PASS=xxxxxxxxxx
export NODE_TLS_REJECT_UNAUTHORIZED=0
export SNOW_USER=xxxxxxxxxx
export SNOW_PASS=xxxxxxxxx
EOF
SCRIPT

Vagrant.configure("2") do |config|

                # avoid self signed SSL issues
                config.vm.box_download_insecure = true
                #config.vm.network "forwarded_port", guest:80, host:8080, host_ip: "127.0.0.1"
                config.vm.network "forwarded_port", guest:9000, host:9000, host_ip: "127.0.0.1" # node
                config.vm.network "forwarded_port", guest:9014, host:9014, host_ip: "127.0.0.1" # node
                #config.vm.network "forwarded_port", guest:3000, host:3000, host_ip: "127.0.0.1" # grafana
                config.vm.network "forwarded_port", guest:9200, host:9200, host_ip: "127.0.0.1" # elastic
                config.vm.network "forwarded_port", guest:5601, host:5601, host_ip: "127.0.0.1" # kibana

                # pull the Vagrant box
                config.vm.box="DockerNodeElastic 1.0.6"
                config.vm.box_url="CentOS-72-Elastic-Node-Docker-1.0.6.box"

                config.ssh.username="vagrant"
                config.ssh.password="vagrant"

                config.vm.synced_folder ".", "/vagrant",
                                :mount_options => ["dmode=777", "fmode=777"]

                # optional
                config.vm.provider "virtualbox" do |v|
                                v.memory=1024
                end
                config.vm.provision "shell", inline: $set_environment_variables, run: "always"
end

Debug output

https://gist.github.com/YeeP79/f05958c705748b1c431e04c65b569f2a

VBoxHardening.log

https://gist.github.com/YeeP79/4d794d987b2db57f54aec99c25f95c0c

Expected behavior

vagrant machine should have booted up

Actual behavior

Stuck in starting

waiting-reply

Most helpful comment

If you're running on windows try the following, from VirtualBox forum post

Go to C:\Program Files\Oracle\VirtualBox\drivers\vboxdrv directory, right click on VBoxDrv.inf and select Install.

Go to console and enter 'sc start vboxdrv'.

Then try 'vagrant up'. Worked for my issue.

All 34 comments

@YeeP79 - have you tried starting a vm through the virtualbox GUI? Does that still work?

@briancain - I am having the same issue with Vagrant 2.0.1, VirtualBox 5.2.4, CentOS 7.4 guest and Windows 10 host. Trying to start VM through VirtualBox GUI, returns:


VirtualBox - Error In supR3HardenedWinReSpawn

NtCreateFile(\Device\VBoxDrvStub) failed: 0xc000000e STATUS_NO_SUCH_DEVICE (162 retries) (rc=-101)

Make sure the kernel module has been loaded successfully.

where: supR3HardenedWinReSpawn what: 3 VERR_OPEN_FAILED (-101) - File/Device open failed. Driver is probably stuck stopping/starting. Try 'sc.exe query vboxdrv' to get more information about its state. Rebooting may actually help.


Reboting actually does not help. VirtualBox setup repair neither. This is what I am facing at this moment.

> sc.exe query vboxdrv

SERVICE_NAME: vboxdrv
        TYPE               : 1  KERNEL_DRIVER
        STATE              : 3  STOP_PENDING
                                (STOPPABLE, NOT_PAUSABLE, IGNORES_SHUTDOWN)
        WIN32_EXIT_CODE    : 0  (0x0)
        SERVICE_EXIT_CODE  : 0  (0x0)
        CHECKPOINT         : 0x0
        WAIT_HINT          : 0x0

>

@YeeP79 - I was able to solve it with these answers. After a manual drivers reinstallation (C:\Program Files\Oracle\VirtualBox\drivers\vboxdrv\VBoxDrv.inf), still needed to change the service path to C:\Program Files\Oracle\VirtualBox\drivers\vboxdrv\VBoxDrv.sys (instead of HKLM). And worked after a final reboot 😄

@YeeP79 Can you confirm if @rbossle's comment resolves your issue https://github.com/hashicorp/vagrant/issues/9318#issuecomment-355394018

I cannot. In waiting for help, I uninstalled and re-installed virtual box
and vagrant. The vagrant box in question now boots just fine.

Had the same issue with vagrant 2.0.1 and VirtualBox 5.2.4 on Windows 10. Issue occured when I updated VirtualBox from 5.2.2 to 5.2.4. A complete reinstall of VirtualBox as suggested in previous comment fixed the issue.

Closing this as it seems vbox reinstall resolves the issue.

vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> 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: Forwarding ports...
default: 80 (guest) => 8080 (host) (adapter 1)
default: 22 (guest) => 2222 (host) (adapter 1)
==> 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", "28429b58-52ad-4e1c-a3b1-0cadb910d646", "--type", "headless"]

Stderr: VBoxManage.exe: error: Could not open the medium 'E:\centos-7-1-1.x86_64_1524449919929_78394\centos-7-1-1.x86_64.vmdk'.
VBoxManage.exe: error: VD: error VERR_PATH_NOT_FOUND opening image file 'E:\centos-7-1-1.x86_64_1524449919929_78394\centos-7-1-1.x86_64.vmdk' (VERR_PATH_NOT_FOUND)
VBoxManage.exe: error: Details: code E_FAIL (0x80004005), component MediumWrap, interface IMedium

Vagrant version
2.0.4

Virtualbox version
5.2.8

Host operating system
Windows 7

Guest operating system
this is my box
https://vagrantcloud.com/centos/boxes/7/versions/1803.01/providers/virtualbox.box

anybody can help me this problem?
tks

If you're running on windows try the following, from VirtualBox forum post

Go to C:\Program Files\Oracle\VirtualBox\drivers\vboxdrv directory, right click on VBoxDrv.inf and select Install.

Go to console and enter 'sc start vboxdrv'.

Then try 'vagrant up'. Worked for my issue.

@sebaux thanks! This solution worked for me

@sebaux Worked for me as well. Thanks for the info!

For me the solution was to run the terminal as Administrator on Windows (source).

I turned off Hiper-V and Widows Hypervisor Platform on Turn windows feature on or off and it worked form me.

Resolved by disabling GUI using the value true to the parameter headless in .json file.

PS C:\my-project> vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Importing base box 'scotch/box'...
==> default: Matching MAC address for NAT networking...
==> default: Checking if box 'scotch/box' is up to date...
==> default: Setting the name of the VM: my-project_default_1543837245866_98665
==> default: Vagrant has detected a configuration issue which exposes a
==> default: vulnerability with the installed version of VirtualBox. The
==> default: current guest is configured to use an E1000 NIC type for a
==> default: network adapter which is vulnerable in this version of VirtualBox.
==> default: Ensure the guest is trusted to use this configuration or update
==> default: the NIC type using one of the methods below:
==> default:
==> default: https://www.vagrantup.com/docs/virtualbox/configuration.html#default-nic-type
==> default: https://www.vagrantup.com/docs/virtualbox/networking.html#virtualbox-nic-type
==> 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: 22 (guest) => 2222 (host) (adapter 1)
==> 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", "b2e0b6af-a8dd-48a7-956e-bf5f5b43d434", "--type", "headless"]

Stderr: VBoxManage.exe: error: The virtual machine 'my-project_default_1543837245866_98665' has terminated unexpectedly
during startup with exit code 1 (0x1). More details may be available in 'C:\Users\bundalla\VirtualBox VMs\my-project_de
fault_1543837245866_98665\Logs\VBoxHardening.log'
VBoxManage.exe: error: Details: code E_FAIL (0x80004005), component MachineWrap, interface IMachine
PS C:\my-project>

@lolmaus solution works for me. as simple as that run terminal as admin

just remove the .vagrannt.d and .virtualbox directories under user directory....

Just to say that I experienced similar problems, and while a number of the options recommended by user may work, I would like to say that the one that worked for me is after following a solution on stackexchange, and I did the following:

1) Opened "Environment Variables..."
2) In the System Variables
3) created a new entry by clicking "New..."
4) Input a "Variable name"
5) Set "Variable value" to my virtualBox path

Click "OK" and restart

I got a similar error:

There was an error while executing `VBoxManage`, a CLI used by Vagrant
for controlling VirtualBox. The command and stderr is shown below.

Command: ["showvminfo","\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"]

Stderr:

I was able to solve it with the solution from an answere on stackoverflow:

To solve this problem, you need to delete the folder .vagrant in the root directory of your project. Then run the command vagrant up again.

try command : "vagrant reload"

when I run command: vagrant up
return same error:
Bringing machine 'homestead-7' up with 'virtualbox' provider...
==> homestead-7: Importing base box 'laravel/homestead'...
There was an error while executing VBoxManage, a CLI used by Vagrant
for controlling VirtualBox. The command and stderr is shown below.

Command: ["import", "\\?\C:\Users\Administrator\.vagrant.d\boxes\laravel-VAGRANTSLASH-homestead\7.1.0\virtualbox\box.ovf", "--vsys", "0", "--vmname", "ubuntu-18.04-amd64_1555583251862_13423", "--vsys", "0", "--unit", "11", "--disk", "C:/Users/Administrator/VirtualBox VMs/ubuntu-18.04-amd64_1555583251862_13423/ubuntu-18.04-amd64-disk001.vmdk"]

Stderr: 0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Interpreting \?\C:\Users\Administrator.vagrant.d\boxes\laravel-VAGRANTSLASH-homestead\7.1.0\virtualbox\box.ovf...
OK.
0%...
Progress state: E_INVALIDARG
VBoxManage.exe: error: Appliance import failed
VBoxManage.exe: error: Code E_INVALIDARG (0x80070057) - One or more arguments are invalid (extended info not available)
VBoxManage.exe: error: Context: "enum RTEXITCODE __cdecl handleImportAppliance(struct HandlerArg *)" at line 957 of file VBoxManageAppliance.cpp

how to resolve?

@zhangrg-php solved my problem

i am facing the same issue but i am using linux. can anybody help?

I am facing the same issue on Ubuntu 16.04. I tried everything above. I am using latest versions.
virtualbox version 6.0.8
vagrant version 2.2.5
I think I need to downgrade my versions ?
Help ??

@shivaniiiii have you solved the problem?

@AFKD98 no not yet. I am stuck with the same error

try command : "vagrant reload"

Unfortunately throws the same error :(

Try this:

https://forums.virtualbox.org/viewtopic.php?f=6&t=92260#p453889

This solved the problem for me.

i also had this error after running "vagrant up" #am running on ubuntu. please someone should assist.
/usr/share/rubygems-integration/all/gems/vagrant-2.0.2/plugins/providers/virtualbox/driver/version_5_0.rb:714:in block in start': There was an error while executingVBoxManage`, a CLI used by Vagrant (Vagrant::Errors::VBoxManageError)
for controlling VirtualBox. The command and stderr is shown below.

Command: ["startvm", "9080fd06-62ab-47d7-ac21-3e2cc510e342", "--type", "headless"]

Stderr: VBoxManage: error: VT-x is not available (VERR_VMX_NO_VMX)
VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component ConsoleWrap, interface IConsole
There was an error while executing VBoxManage, a CLI used by Vagrant
for controlling VirtualBox. The command and stderr is shown below.

Command: ["startvm", "9080fd06-62ab-47d7-ac21-3e2cc510e342", "--type", "headless"]

Stderr: VBoxManage: error: VT-x is not available (VERR_VMX_NO_VMX)
VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component ConsoleWrap, interface IConsole

and got this after running "vagrant reload"
==> default: Checking if box 'jasonc/centos7' 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: Forwarding ports...
default: 22 (guest) => 2222 (host) (adapter 1)
==> 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", "9080fd06-62ab-47d7-ac21-3e2cc510e342", "--type", "headless"]

Stderr: VBoxManage: error: VT-x is not available (VERR_VMX_NO_VMX)
VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component ConsoleWrap, interface IConsole

please check if your processor is compatible of creating a virtual environment or not. If in case it is compatible then try enabling VT -x from BIOS setup. I hope this helps.

In my case on ubuntu cosmic, I had to remove the package for virtualbox-dkms and then I could run virtualbox machines again

I download the metasploitable 3 on my ubuntu system.
When I run the 'vagrant up':
I have the error like that:

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

I have no idea how to fix that. Anyone has the idea? Appreciate that.

I have fixed that. You can see the reference for my question:
VBoxManage: error: Failed to create the host-only adapter

I'm going to lock this issue because it has been closed for _30 days_ ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

Was this page helpful?
0 / 5 - 0 ratings