Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

I just got laravel homestead to run yesterday using powershell. Now, it won't even run. I just suspended vagrant and turned off my pc. Now it's just giving me this error:

Bringing machine 'default' up with 'virtualbox' provider... ==> default: Checking if box 'laravel/homestead' is up to date... ==> default: Clearing any previously set forwarded ports... There was an error while executing `VBoxManage`, a CLI used by Vagrant for controlling VirtualBox. The command and stderr is shown below.  Command: ["modifyvm", "b21f2dd0-7f73-4d0f-b1e0-0f82ecdda1fe",     "--natpf1", "delete", "ssh", "--natpf1", "delete", "tcp33060",  "--natpf1", "delete", "tcp44300", "--natpf1", "delete", "tcp54320",  "--natpf1", "delete", "tcp8000"]  Stderr: VBoxManage.exe: error: Code E_FAIL (0x80004005) - Unspecified    error (extended info not available) VBoxManage.exe: error: Context: "LockMachine(a->session,   LockType_Write)" at line 493 of file VBoxManageModifyVM.cpp 
like image 439
rendell Avatar asked Sep 21 '15 01:09

rendell


People also ask

What is VBoxManage?

As briefly mentioned in Section 1.18, “Alternative Front-Ends”, VBoxManage is the command-line interface to Oracle VM VirtualBox. With it, you can completely control Oracle VM VirtualBox from the command line of your host operating system.

Where is VBoxManage EXE?

The file is located in Program Files/Oracle/VirtualBox/VBoxManage.exe and is used as a command-line interface with VirtualBox.


2 Answers

I had the same problem and the previous answer didn't work for me. I opened the VirtualBox GUI and saw that the virtual machine was running. I stopped it and then I executed "vagrant up". All worked well.

like image 170
Jesús Amieiro Avatar answered Sep 18 '22 19:09

Jesús Amieiro


Ok, so I finally fixed the problem. Tried restarting my laptop and it's not giving me that error anymore. Here's what I did:

  1. Right click on "This PC" / "My Computer" on windows desktop
  2. Select "Properties"
  3. Go to "Advanced" tab
  4. Click "Environment Variables..." at the bottom
  5. Under System Variables click "New..."
  6. Set "Variable name" to "VBOX_INSTALL_PATH"
  7. Set "Variable value" to "C:\Program Files\Oracle\VirtualBox\"
  8. Select "OK" and close all the other settings windows

source: https://github.com/mitchellh/vagrant/issues/3852

like image 34
rendell Avatar answered Sep 20 '22 19:09

rendell