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

17

38

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
Lorenzen answered 21/9, 2015 at 1:54 Comment(3)
It cannot find virtual box anymore, is it still installed ? something have changed in the PATH ? can you run VBoxManage.exe from command line ?Disrepute
I don't understand, I fixed it again this morning by deleting the .vagrant folder now the error just popped again...Lorenzen
If you are windows, this may help.Polarimeter
L
22

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

Lorenzen answered 21/9, 2015 at 19:5 Comment(4)
tanks , this solution works well , please mark as a correct answer .Anatomist
This doesn't work for me (16-jun-2017) on after window10 updates.Marek
Not work for me. Try this solution jesusamieiro.com/…Papillon
Not work for me too. In my case, it occurred after my Windows update and I think it is VirtualBox problem. I tried to reinstall VirtualBox, and it worked.Nikos
S
24

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.

Seafarer answered 1/3, 2016 at 10:8 Comment(0)
L
22

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

Lorenzen answered 21/9, 2015 at 19:5 Comment(4)
tanks , this solution works well , please mark as a correct answer .Anatomist
This doesn't work for me (16-jun-2017) on after window10 updates.Marek
Not work for me. Try this solution jesusamieiro.com/…Papillon
Not work for me too. In my case, it occurred after my Windows update and I think it is VirtualBox problem. I tried to reinstall VirtualBox, and it worked.Nikos
S
13

enter image description here

Just enable permission for VirtualBox in Security & Privacy

Sensation answered 26/3, 2021 at 23:53 Comment(0)
D
10

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
Degrade answered 16/7, 2018 at 7:32 Comment(0)
T
5
  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.

Temperament answered 28/1, 2018 at 11:50 Comment(1)
Huh? One answer talks about modifying the path, another about restarting vagrant, and you propose to delete tons of file just for "it should work fine"? That does not look like a good answer....Bounteous
R
2

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.

Ribose answered 29/10, 2017 at 11:4 Comment(0)
K
1

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.

Keitel answered 5/11, 2018 at 10:41 Comment(0)
P
1

My error:

Stderr: VBoxManage.exe: error: Failed to open/create the internal network 'HostInterfaceNetworking-VirtualBox Host-Only Ethernet Adapter' (VERR_INTNET_FLT_IF_NOT_FOUND).
VBoxManage.exe: error: Failed to attach the network LUN (VERR_INTNET_FLT_IF_NOT_FOUND)
VBoxManage.exe: error: Details: code E_FAIL (0x80004005), component ConsoleWrap, interface IConsole

I first tried disabling the "VirtualBox Host-Only" adapter. Didn't work. Then tried downgrading virtualbox from 6.1.28 to 6.1.26 and that didn't work. Removed everything and started over with 6.1.26, still didn't work. After going in circles for a while, I realized there was another adapter I did not disable called "Ethernet 5" with a 'VirtualBox Host-Only..." description. Not sure if it was created the first time I ran the virtualbox 6.1.28, but after I disabled it, it worked. Noticed another was created after that ("Ethernet 6"), so pretty sure the first issue was the same as others with the 6.1.28 and then the error changed to what I posted above.

Disable all VirtualBox Host-Only Ethernet Adapter #*, under the Control Panel > Network & Internet > Network Connections.

enter image description here

Pfeifer answered 11/11, 2021 at 6:50 Comment(0)
N
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.

Nikos answered 7/11, 2019 at 5:19 Comment(0)
E
0

For me, just restarting the machine solved the problem. I just had install VirtualBox, maybe the paths weren't correctly set.

Ency answered 23/2, 2020 at 21:10 Comment(0)
W
0

I was having the same issue and I just had to enable the hardware virtualization in my computer's BIOS as mentioned in Laravel documentation.

If you are using Windows, you may need to enable hardware virtualization (VT-x). It can usually be enabled via your BIOS. If you are using Hyper-V on a UEFI system you may additionally need to disable Hyper-V in order to access VT-x.

Wordsmith answered 3/4, 2020 at 14:45 Comment(0)
G
0

May be it to late to provide my experience with this issue. You probably have to restart your machine and after installing virtualbox and make sure the environmental variable has a value of "C:\Program Files\Oracle\VirtualBox" System Variable Entry

And Path entry at System variable should have %VBOX_MSI_INSTALL_PATH% %VBOX_MSI_INSTALL_PATH%

Grillage answered 2/8, 2021 at 1:57 Comment(0)
G
0

MACOS users only -> I had same problem what i did was Just enable permission for VirtualBox in Security & Privacy for Oracle.

Gyrfalcon answered 17/8, 2021 at 10:46 Comment(0)
A
0
  1. open PowerShell or cmd as administrator
  2. write bcdedit /set hypervisorlaunchtype off
  3. reboot
Ancona answered 8/11, 2021 at 10:52 Comment(0)
P
0

You might get this error if you are low on free disk space.

Prana answered 22/5, 2022 at 8:57 Comment(0)
P
0
1.Go to Oracle Virtual Box
2.Right click on the Virtual Machine and select Discard Saved State.
3.Then try to start the virtual machine using vagrant up.

Full link: https://www.wintips.org/fix-virtualbox-vm-session-was-closed-before-any-attempt-to-power-it-on/

Pedantry answered 9/6, 2022 at 5:47 Comment(0)
A
0

solved the problem by launching my BIOS and activating virtual technology. In most computers, the technology is off by default. Go ahead and activate it then turn on your computer then run vagrant up...works immediately.

Aurochs answered 7/3, 2023 at 6:18 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.