Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vagrant up: There was an error while executing VBoxManage, a CLI used by Vagrant #1809

Closed
starrychloe opened this issue Jun 7, 2013 · 117 comments

Comments

@starrychloe
Copy link

$ /cygdrive/c/Program\ Files/Oracle/VirtualBox/VBoxManage.exe list vms
"AIDC_1367972500" {16d4bcdc-a907-42eb-962f-faef2c68f13c}
"Ubuntu Box" {83f7549d-0ef3-453c-a014-77732d7ba775}


$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
[default] Setting the name of the VM...
There was an error while executing `VBoxManage`, a CLI used by Vagrant
for controlling VirtualBox. The command and stderr is shown below.

Command: ["modifyvm", "16d4bcdc-a907-42eb-962f-faef2c68f13c", "--name", "AIDC_1370628358"]

Stderr: VBoxManage.exe: error: Could not rename the directory 'C:\Users\Chloe\VirtualBox VMs\AIDC_1367972500' to 'C:\Users\Chloe\VirtualBox VMs\AIDC_1370628358' to save the settings file (VERR_ACCESS_DENIED)
VBoxManage.exe: error: Details: code E_FAIL (0x80004005), component SessionMachine, interface IMachine, callee IUnknown
VBoxManage.exe: error: Context: "SaveSettings()" at line 2527 of file VBoxManageModifyVM.cpp

However, I am able to start the VM directly from Oracle VirtualBox manager GUI, and I am able to log in with root/vagrant.

@clebio
Copy link

clebio commented Jun 7, 2013

Seems to be related to #1198. So, yeah. I have this issue as well.

@mitchellh
Copy link
Contributor

Dup of #1198.

At its root this appears to be an issue with what permissions Vagrant is run with. I'd love for Vagrant to better detect when this error might appear. But at the moment I'm unsure what exactly causes it, mostly because of my ignorance about Windows permissions/ACL.

As the error message says, the problem is that VirtualBox can't rename the directory due to an access denied. I would check permissions on the VirtualBox VMs directory.

@clebio
Copy link

clebio commented Jun 9, 2013

@mitchellh I'm not sure why you would consider this closed. It's clearly verified by multiple users. VirtualBox can't rename the directory... ok... why is it trying to? Does VirtualBox, under normal operation, rename directories? Not understanding the cause isn't really a fair reason to ignore the issue. This has made Vagrant very unreliable for me -- I never know when I go to bring up the Vagrant box whether I'll be able to start on my work right away, or will have to spend a few hours debugging a known issue.

@mitchellh
Copy link
Contributor

I'm sorry. I need a clear reproduction case that I can mirror. Until then, I can't fix the bug. Unfortunately this is one of the pros and cons of open source. For platforms that I'd like to support, but don't use on a daily basis, I depend on the community to debug and fix issues for these.

I admit this is a bug, and I'd be happy to fix it, but I require a clear reproduction case that I can do. If I can't get that, I'd love for a patch or pull request to fix it for you.

@clebio
Copy link

clebio commented Jun 9, 2013

@mitchellh I did my best! Hope that is enough to get started. I absolutely understand your point about FOSS. Vagrant is a great tool, so I very much want to help it along.

@mitchellh
Copy link
Contributor

@clebio It looks fantastic. I'm going to give it a shot with my Windows machine shortly. Thanks so much.

@clebio
Copy link

clebio commented Jun 9, 2013

Just glad to help. Let me know if you need more details, etc. Thanks!

@starrychloe
Copy link
Author

I agree with @clebio . Why does Vagrant need to keep renaming the virtual box to a random name like AIDC_1367972500 every time?

@ktacheny
Copy link

I was able to get around this error by going into virtual box preferences and changing the vm directory to c:\1\vagrant\vm

@reinink
Copy link

reinink commented Sep 18, 2013

I'm running Vagrant on OSX Mountain Lion and keep getting this error as well. Typically a vagrant reload solves it.

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

Command: ["guestproperty", "get", "2bdb0360-5d44-40c8-9869-749d396b0caf", "/VirtualBox/GuestAdd/Version"]

Stderr: dyld: Symbol not found: _iconv
  Referenced from: /usr/lib/libcups.2.dylib
  Expected in: /Applications/Vagrant/bin/../embedded/lib/libiconv.dylib in /usr/lib/libcups.2.dylib

@mitchellh
Copy link
Contributor

@reinink This was hot-fixed in 1.3.2 last night. Please redownload 1.3.2 and try again.

@reinink
Copy link

reinink commented Sep 18, 2013

@mitchellh You rock!

@tshafer
Copy link

tshafer commented Sep 21, 2013

I am getting this error as well

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

Command: ["hostonlyif", "ipconfig", "dyld: DYLD_ environment variables being ignored because main executable (/Applications/VirtualBox.app/Contents/MacOS/VBoxNetAdp", "--ip", "192.168.3.1", "--netmask", "255.255.255.0"]

Stderr: VBoxManage: error: The host network interface with the given name could not be found
VBoxManage: error: Details: code NS_ERROR_INVALID_ARG (0x80070057), component Host, interface IHost, callee nsISupports
VBoxManage: error: Context: "FindHostNetworkInterfaceByName(name.raw(), hif.asOutParam())" at line 220 of file VBoxManageHostonly.cpp
VBoxManage: error: Could not find interface 'dyld: DYLD_ environment variables being ignored because main executable (/Applications/VirtualBox.app/Contents/MacOS/VBoxNetAdp'

@sergmetelin
Copy link

Same here as tshafer.
Mac OS X 10.8.5

@adin-ttc
Copy link

same issue here v1.3.3 with OSX 10.8.5 not sure if this its OSX though. I downgraded to 1.3.2 and everything seems to be fine

@jperry
Copy link

jperry commented Sep 27, 2013

I get the same as well for 10.8.5 using 1.3.3, downgrading to 1.3.2 fixed it for me as well.

@jcalonso
Copy link

jcalonso commented Oct 1, 2013

Same problem here, solved by downgrading to 1.3.2

@borantula
Copy link

After getting the error I run the vagrant from VirtualBox itself. On login screen I closed and shut it down.
Then I did a "vagrant up"
It seems to work for me on 1.3.3

@parth-j-gandhi
Copy link

I get this error on Windows 7 with vagrant version 1.3.3 when I run "vagrant up" in a multi-machine environment.
Ideal behavior should be to bring up all the boxes but I get this error after the first box is up and vagrant is in the process of bringing the second one up from the same base box.

@marlev
Copy link

marlev commented Oct 5, 2013

Got the same error after upgraded to OSX 10.9 Maverick GM.
Tried all above but nothing worked.

The solution was to run $sudo /Library/StartupItems/VirtualBox/VirtualBox restart (as found at http://stackoverflow.com/questions/14404777/vagrant-hostonlyif-create-not-working)
After that vagrant up works.

@leogono
Copy link

leogono commented Oct 12, 2013

I followed the workaround provided by @borantula and it works!

@shunwen
Copy link

shunwen commented Oct 17, 2013

@borantula 's workaround works on OSX 1.8.5, Thanks!

@shanimal
Copy link

Not sure if this helps, but I had VirtualBox.app settings open when i shut down and I got this error. I tried to restart and the error repeated. I only closed the settings dialog and it restarted... phew. Thanks to @borantula for pointing me in the right direction. Vagrant version 1.2.3

@kanduvisla
Copy link

Thanks, marlevs' solution worked for me on OSX Mavericks 10.9

@nlisgo
Copy link

nlisgo commented Oct 23, 2013

@marlev thanks a lot for the tip. Got me up and running again!

@yiclwh
Copy link

yiclwh commented Oct 23, 2013

Thanks, marlevs' solution worked for me on OSX Mavericks 10.9 too

@iboargun
Copy link

Thanks, @marlev! Worked for me on OSX Mavericks too! ;)

@rkarthik63
Copy link

I was missing libcurl3 package. Installed libcurl3 and re-installed virtual box to fix the issue

@portal7
Copy link

portal7 commented Jul 22, 2017

I solved killing process "VBoxHeadless" in Task Manager (Windows 10), running "vagrant up" and works like a charm!!

@mualle
Copy link

mualle commented Oct 3, 2017

Check that the VM is not running on VirtualBox Manager.

@helturkey
Copy link

@Adongojustice thank u very much, your response solved my problem.

@saidiadegoke
Copy link

I had the same issue of "There was an error while executing VBoxManage, a CLI used by Vagrant ..." on my Windows 10 machine. I got that fixed by running the CLI window as an 'administrator' and running vagrant up again.

@lambasahil
Copy link

Can anyone help?

$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Checking if box 'hashicorp/precise64' is up to date...
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
    default: Adapter 1: nat
==> default: Forwarding ports...
    default: 8080 (guest) => 8001 (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", "320c29c0-32f1-4134-9f39-1340f5aebaac", "--type", "headless
"]

Stderr: VBoxManage.exe: error: The virtual machine 'Catalogue_default_1506252938
237_96481' has terminated unexpectedly during startup with exit code 1 (0x1).  M
ore details may be available in 'C:\Users\sahil\VirtualBox VMs\Catalogue_default
_1506252938237_96481\Logs\VBoxHardening.log'
VBoxManage.exe: error: Details: code E_FAIL (0x80004005), component MachineWrap,
 interface IMachine

@rafaelrozon
Copy link

@lambasahil I had the same problem. I fixed it by updating Virtualbox to 5.2.4.

@ito2307
Copy link

ito2307 commented Feb 14, 2018

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

Command: ["import", "/home/eduardoh/.vagrant.d/boxes/ubuntu-VAGRANTSLASH-xenial64/20180213.2.0/virtualbox/box.ovf", "--vsys", "0", "--vmname", "ubuntu-xenial-16.04-cloudimg-20180213_1518618539483_25179", "--vsys", "0", "--unit", "10", "--disk", "/home/eduardoh/VirtualBox VMs/ubuntu-xenial-16.04-cloudimg-20180213_1518618539483_25179/ubuntu-xenial-16.04-cloudimg.vmdk", "--vsys", "0", "--unit", "11", "--disk", "/home/eduardoh/VirtualBox VMs/ubuntu-xenial-16.04-cloudimg-20180213_1518618539483_25179/ubuntu-xenial-16.04-cloudimg-configdrive.vmdk"]

Stderr: 0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Interpreting /home/eduardoh/.vagrant.d/boxes/ubuntu-VAGRANTSLASH-xenial64/20180213.2.0/virtualbox/box.ovf...
OK.
0%...
Progress state: VBOX_E_FILE_ERROR
VBoxManage: error: Appliance import failed
VBoxManage: error: Could not create the imported medium '/home/eduardoh/VirtualBox VMs/ubuntu-xenial-16.04-cloudimg-20180213_1518618539483_25179/ubuntu-xenial-16.04-cloudimg.vmdk' (VERR_VD_VMDK_INVALID_FORMAT)
VBoxManage: error: Details: code VBOX_E_FILE_ERROR (0x80bb0004), component ApplianceWrap, interface IAppliance
VBoxManage: error: Context: "RTEXITCODE handleImportAppliance(HandlerArg*)" at line 886 of file VBoxManageAppliance.cpp

i got this error

@tgaertner
Copy link

Make sure you have installed the VirtualBox-ExtensionPack
Debian/Ubuntu: sudo apt-get install virtualbox-ext-pack

@eleijonmarck
Copy link

Vagrant Reload fixed the issue vagrant reload

@samomar
Copy link

samomar commented Sep 12, 2018

This thread is gold, I don't know what exactly worked for me but this thread along side this link helped https://stackoverflow.com/questions/50053255/virtualbox-raw-mode-is-unavailable-courtesy-of-hyper-v-windows-10

@dinbrca
Copy link

dinbrca commented Oct 2, 2018

Had it on Mac after updating to Mac OS Mojave with following error:

==> 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

After a couple of minutes I tried loading VirtualBox directly instead of using Vagrant throught the CLI - I got the following message:
screen shot 2018-10-02 at 10 00 01 am

turns out I just needed to update the VirtualBox.

@xlcrr
Copy link

xlcrr commented Oct 17, 2018

Restarting laptop worked for me

@osmanskaya
Copy link

You have to check if you've the newest version of Virtualbox, because the version might not be compatible with the new Mac OS Mojave. As @dinbrca suggested above, i updated the virtualbox and it worked again!!

@hunken
Copy link

hunken commented Nov 18, 2018

Use
vagrant reload

to solve it

@dvetal
Copy link

dvetal commented Dec 6, 2018

vagrant reload did not work for me. When I updated to mohave i had to basically download the latest vagrant and the latest VirtualBox. Then it worked.

@Xerotherm1c
Copy link

I too received this error, but it was not because of permissions like I had presumed. I'm using vagrant box with Laravel and I attempted to create a new symbolic link for storage using the artisan command. But that command failed, and upon Googling I found that you need to have administrative permissions when launching vagrant to be able to create symbolic links. No sweat, so I closed Git CMD and reopened it as an administrator. I then ran vagrant halt followed by vagrant up, but I didn't realize that the halt didn't actually shut down the vagrant box because the elevated instance seems to not be able to talk to the vagrant box that the non-elevated instance spawned? Not entirely sure, but once I halted the box from non-admin and restarted the vagrant box inside the elevated instance, my problem was solved and everything is back to normal. Hopefully this helps someone.

@ne018
Copy link

ne018 commented Apr 24, 2019

remove saved state on your vbox using:
vagrant halt

then vagrant up again.

@AFKD98
Copy link

AFKD98 commented Jul 1, 2019

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 ??

@jakelacey2012
Copy link

I also had this error because "Oracle America, inc", was blocked from installing software on my mac. This can be fixed by following this https://matthewpalmer.net/blog/2017/12/10/install-virtualbox-mac-high-sierra/index.html

@srikanta72
Copy link

I found the solution at below link:

  1. Grant permission to VirtualBox under System Preferences > Security & Privacy > General (this request is new to macOS High Sierra)
  2. Open Terminal and run: sudo "/Library/Application Support/VirtualBox/LaunchDaemons/VirtualBoxStartup.sh" restart
    Like the guy who answered in below link:
    https://stackoverflow.com/questions/18149546/vagrant-up-failed-dev-vboxnetctl-no-such-file-or-directory

@prbhr007
Copy link

I was able to get around this error by going into virtual box preferences and changing the vm directory to c:\1\vagrant\vm

same solution works for OSX as well.

@sengfai
Copy link

sengfai commented Jan 16, 2020

Go to virtualbox and remove and delete it manually, then run "vagrant up again".

@jggj21
Copy link

jggj21 commented Jan 24, 2020

I opened Virtual Box and when I started the machine from there I showed an error that I had virtualization disabled in the BIOS, I enabled the option from the bios and vagrant up it worked again.

@ghost
Copy link

ghost commented Jan 28, 2020

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.

@ghost ghost locked and limited conversation to collaborators Jan 28, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests