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

20

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
laravel-5
vagrant
virtualbox
windows-10
homestead
asked on Stack Overflow Sep 21, 2015 by rendell

7 Answers

21

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.

answered on Stack Overflow Mar 1, 2016 by Jesús Amieiro
14

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

answered on Stack Overflow Sep 21, 2015 by rendell • edited Feb 8, 2017 by JJJ
2

For Mac OS, close all the running VMs and restart the virtual box using following command:

sudo "/Library/Application Support/VirtualBox/LaunchDaemons/VirtualBoxStartup.sh" restart
answered on Stack Overflow Jul 16, 2018 by KayV
1

Try to follow these steps 1. Run cmd as Administrator 2. vagrant halt 3. vagrant up 4. if required vagrant provision but once vagrant is up.

answered on Stack Overflow Oct 29, 2017 by Gaurav Arora
1
  1. First of all destroy the virtual box with vagrant destroy.
  2. Navigate to C:\Users\Justice replace justice by username.
  3. Delete the .vagrant.d folder.
  4. Go into VirtualBox VMs folder and delete everything inside it.
  5. Start it again with vagrant up.

It should work fine.

answered on Stack Overflow Jan 28, 2018 by Prince John • edited Jan 28, 2018 by סטנלי גרונן
0

Disable Hyper-V virtualization that is enabled in Windows.

Open a command prompt as administrator and run the following command:

dism.exe /Online /Disable-Feature:Microsoft-Hyper-V

Afterwards, reboot the PC and try VirtualBox again.

answered on Stack Overflow Nov 5, 2018 by Tahir
0

After the Windows Update, I get this problem too and I think it is the VirtualBox problem. My solution is re-install VirtualBox.

Also make sure VirtualBox directory path C:\Program Files\Oracle\VirtualBox\ is in PATH environment variable.

answered on Stack Overflow Nov 7, 2019 by Chhaileng

User contributions licensed under CC BY-SA 3.0