Open ig-semenov opened 3 years ago
I've seen something very similar. It seems that there's been a change in behavior with VirtualBox 6.1.26 that results in vagrant halt
or vagrant reload
not stopping all VBoxHeadless processes. Unless these processes are stopped, a subsequent vagrant up
results in this error.
Environment: Windows 10 Pro Version 21H1 (OS Build 19043.1110), Vagrant 2.2.18 x64, VirtualBox 6.1.26r145957.
Vagrantfile:
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.box = "generic/alpine38"
end
The first vagrant up
works as expected. However, here's what I see when I run vagrant halt
, then look for VBoxHeadless processes, then run vagrant up
again:
PS C:\alpine38> vagrant halt
==> default: Attempting graceful shutdown of VM...
PS C:\alpine38>
PS C:\alpine38>
PS C:\alpine38> Get-Process -Name VBoxHeadless
NPM(K) PM(M) WS(M) CPU(s) Id SI ProcessName
------ ----- ----- ------ -- -- -----------
18 11.96 26.43 6.67 900 15 VBoxHeadless
4 1.89 8.42 0.09 1820 15 VBoxHeadless
4 1.96 4.98 0.17 4696 15 VBoxHeadless
PS C:\alpine38>
PS C:\alpine38>
PS C:\alpine38> vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Checking if box 'generic/alpine38' version '3.3.2' 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: Running 'pre-boot' VM customizations...
==> 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", "ee64efca-a2b5-4753-b00c-fcd3681bb77e", "--type", "headless"]
Stderr: VBoxManage.exe: error: The VM session was closed before any attempt to power it on
VBoxManage.exe: error: Details: code E_FAIL (0x80004005), component SessionMachine, interface ISession
If I stop all VBoxHeadless processes using Task Manager, vagrant up
works again.
I see the same behavior with VirtualBox 6.1.26 and Vagrant 2.2.17, so I think whatever changed is on the VirtualBox side. For the moment, I've downgraded to VirtualBox 6.1.24 to avoid this issue.
Edit 11-Aug-2021: This problem still occurs with the latest VirtualBox test build (6.1.27r146035).
I got a similar message when using the cloned VM feature:
I think its related to a change in Headless mode see:
VirtualBox 6.1.26 (released July 28 2021)
This is a maintenance release. The following items were fixed and/or added:
VMSVGA: fixed VM screen artifacts after restoring from saved state (bug #20067) Storage: Fixed audio endianness for certain CUE sheet CD/DVD images. VBoxHeadless: Running VM will save its state on host shutdown VBoxManage: Fix OS detection for Ubuntu 20.10 ISO with unattended install Linux Additions: Fixed mouse pointer offsetting issue for VMSVGA graphics adapter in multi-monitor VM setup (6.1.24 regression)
I think its related to a change in Headless mode
That's possible, although it looks like the change is supposed to affect host shutdown only, which doesn't seem to apply here.
Regardless, from what I've seen, the problem makes Vagrant unusable with VirtualBox 6.1.26 on Windows 10 hosts, so I hope a solution can be found.
This issue may be specific to Windows hosts.
Using the same Alpine Linux 3.8 Vagrantfile I used above on an Oracle Linux 7.9 host running Vagrant 2.2.18 and VirtualBox 6.1.26r145957, the problem did not occur. vagrant halt
and vagrant reload
worked as expected, and no VBoxHeadless processes remained after the VM was shut down.
Have a similar problem but with another error message:
There was an error while executing 'VBoxManage', a CLI used by Vagrant for controlling VirtualBox. The command and stderr is shown below.
Command: ["startvm", "96585ae4-fed6-4713-a4f1-fed0f860f1d3", "--type", "headless"]
Stderr: VBoxManage.exe: error: The VM session was closed before any attempt to power it on VBoxManage.exe: error: Details: code E_FAIL (0x80004005), component SessionMachine, interface ISession
by ending the task like @PaulNeumann mentioned, vagrant up
works again
This problem is also mentioned in the Vagrant Community Forum here.
I'm also having this problem but killing virtualbox processes via task manager made it work only once.
I'm also having this problem but killing virtualbox processes via task manager made it work only once.
Right. Stopping the VBoxHeadless processes isn't a "permanent" fix. The processes have to be stopped every time the VM is halted in order for vagrant up
to work.
I'm also having this problem but killing virtualbox processes via task manager made it work only once.
Right. Stopping the VBoxHeadless processes isn't a "permanent" fix. The processes have to be stopped every time the VM is halted in order for
vagrant up
to work.
Apologies, I probably didn't express myself properly. What I meant to say was that killing the process doesn't always fix it for me. I sometimes (about 50% of the time) still have to reboot the host. To further add to the problem, this seems to happen even after a clean boot(Windows 10 fast boot disabled) so there should be no virtualbox processes around.
This issue seems to be resolved in VirtualBox 6.1.28. See this VirtualBox ticket and the changelog for VirtualBox 6.1.28.
From the VirtualBox 6.1.28 changelog: "Windows Host: Fixed VBoxHeadless process sticking around after VM is closed (bug #20574)".
Still experiencing the error in Windows
Virtual Box version 6.1.32
Vagrant version Installed Version: 2.2.16
There was an error while executing `VBoxManage`, a CLI used by Vagrant
for controlling VirtualBox. The command and stderr is shown below.
Command: ["startvm", "0a967fd3-201d-4023-9dda-a1d0495750c0", "--type", "headless"]
Stderr: VBoxManage.exe: error: The virtual machine 'ansible-node' has terminated unexpectedly during startup with exit code -1073741819 (0xc0000005)
VBoxManage.exe: error: Details: code E_FAIL (0x80004005), component MachineWrap, interface IMachine
Still experiencing the error in Windows
Virtual Box version 6.1.32
Vagrant version Installed Version: 2.2.16
There was an error while executing `VBoxManage`, a CLI used by Vagrant for controlling VirtualBox. The command and stderr is shown below. Command: ["startvm", "0a967fd3-201d-4023-9dda-a1d0495750c0", "--type", "headless"] Stderr: VBoxManage.exe: error: The virtual machine 'ansible-node' has terminated unexpectedly during startup with exit code -1073741819 (0xc0000005) VBoxManage.exe: error: Details: code E_FAIL (0x80004005), component MachineWrap, interface IMachine
Same here... Anyone found a solution for this?
Still experiencing the error in Windows Virtual Box version 6.1.32 Vagrant version Installed Version: 2.2.16
There was an error while executing `VBoxManage`, a CLI used by Vagrant for controlling VirtualBox. The command and stderr is shown below. Command: ["startvm", "0a967fd3-201d-4023-9dda-a1d0495750c0", "--type", "headless"] Stderr: VBoxManage.exe: error: The virtual machine 'ansible-node' has terminated unexpectedly during startup with exit code -1073741819 (0xc0000005) VBoxManage.exe: error: Details: code E_FAIL (0x80004005), component MachineWrap, interface IMachine
Same here... Anyone found a solution for this?
To anyone encountering this issue:
For me the virtual machines wouldn't boot in headless mode but would in "regular" mode with GUI. I solved this by adding this to my Vagrantfile:
config.vm.provider "virtualbox" do |v| v.gui = true end
Pretty sure this issue is not vagrant related since Virtualbox by itself encounters the same issue.
Virtual box version: 6.1.32 r149290 (Qt5.6.2)
OS: Windows 10
vagrant version: 2.2.19
Frustrated now, trying to boot up my images, and getting the above error. Has this been resolved or is any other workaround??
There was an error while executing VBoxManage, a CLI used by Vagrant for controlling VirtualBox. The command and stderr is shown below.
Command: ["startvm", "28fec84a-4331-48cd-859e-ae2e6280a67a", "--type", "gui"]
Stderr: VBoxManage.exe: error: The virtual machine 'Vagrant_default_1650395181197_57538' has terminated unexpectedly during startup with exit code 1 (0x1). More details may be available in 'C:\Users\user\VirtualBox VMs\Vagrant_default_1650395181197_57538\Logs\VBoxHardening.log' VBoxManage.exe: error: Details: code E_FAIL (0x80004005), component MachineWrap, interface IMachine
I tried running it in GUI mode config.vm.provider "VirtualBox" do |vb| vb.gui = true end What the above code does is just open up the same error in the VirtualBox error popup.
Please suggest a workaround at least.
Thanks
Getting something similar using recent downloads of both vagrant and virtualbox
There was an error while executing `VBoxManage`, a CLI used by Vagrant
for controlling VirtualBox. The command and stderr is shown below.
Command: ["startvm", "fdcbff71-0ef1-4060-a59d-7f4936f2049c", "--type", "gui"]
Stderr: VBoxManage.exe: error: Failed to get device handle and/or partition ID for 000000000207b150 (hPartitionDevice=0000000000000ca1, Last=0xc0000002/1) (VERR_NEM_VM_CREATE_FAILED)
VBoxManage.exe: error: Details: code E_FAIL (0x80004005), component ConsoleWrap, interface IConsole
Try Open Control Panel > Network and Internet > Network Connections and see if the VirtualBox Ethernet Adapter is disabled then enabled it.
I have disabled Ethernet Adapter VirtualBox Host-Only Network and I got message error Command: ["startvm", "fdcbff71-0ef1-4060-a59d-7f4936f2049c", "--type", "gui"]
, but I enabled it and vagrant up it work fine.
Virtual box version: 6.1.32 r149290 (Qt5.6.2) OS: Windows 10 vagrant version: 2.2.19 Frustrated now, trying to boot up my images, and getting the above error. Has this been resolved or is any other workaround??
There was an error while executing VBoxManage, a CLI used by Vagrant for controlling VirtualBox. The command and stderr is shown below.
Command: ["startvm", "28fec84a-4331-48cd-859e-ae2e6280a67a", "--type", "gui"]
Stderr: VBoxManage.exe: error: The virtual machine 'Vagrant_default_1650395181197_57538' has terminated unexpectedly during startup with exit code 1 (0x1). More details may be available in 'C:\Users\user\VirtualBox VMs\Vagrant_default_1650395181197_57538\Logs\VBoxHardening.log' VBoxManage.exe: error: Details: code E_FAIL (0x80004005), component MachineWrap, interface IMachine
I tried running it in GUI mode config.vm.provider "VirtualBox" do |vb| vb.gui = true end What the above code does is just open up the same error in the VirtualBox error popup.
Please suggest a workaround at least.
Thanks
I got the same issue when running a box in headless mode. Switching to GUI mode fixed the issue. I don't know if its a problem with VBox or with Vagrant.
Still an issue with VirtualBox 1.38 (Windows 11 host).
For window 10 I can't bootstrap Virtualbox any help?
PS C:\Users\23470\ubundu_linux\trusty64> vagrant up
Bringing machine 'default' up with 'VirtualBox' provider...
==> default: Checking if box 'ubuntu/trusty64' version '20190514.0.0' 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", "01d7cbc4-7937-4a82-ab6f-d458b883413d", "--type", "headless"]
Stderr: VBoxManage.exe: error: Not in a hypervisor partition (HVP=0) (VERR_NEM_NOT_AVAILABLE). VBoxManage.exe: error: VT-x is not available (VERR_VMX_NO_VMX) VBoxManage.exe: error: Details: code E_FAIL (0x80004005), component ConsoleWrap, interface IConsole
Hello.
As many have said before, I'm facing the same issue while trying to boot a Vagrant machine in headless mode.
Linux 6.1.1-1-MANJARO #1 SMP PREEMPT_DYNAMIC Wed Dec 21 23:21:50 UTC 2022 x86_64 GNU/Linux
» pamac info vagrant
Name : vagrant
Version : 2.3.4-1
Description : Build and distribute virtualized development environments
URL : https://vagrantup.com
Licenses : MIT
Repository : community
Installed Size : 119,3 MB
Groups : --
Depends On : curl libarchive libssh2 libxml2 libxslt rsync ruby xz perl
Optional Dependencies : --
Required By : --
Optional For : --
Provides : --
Replaces : vagrant-substrate
Conflicts With : vagrant-substrate
Packager : Jonathan Steel <jsteel@archlinux.org>
Build Date : mer. 21 déc. 2022 19:42:52
Install Date : lun. 16 janv. 2023 13:05:19
Install Reason : Explicitly installed
Validated By : Signature
Backup files : --
» vagrant up
Bringing machine 'don-debian64' up with 'virtualbox' provider...
==> don-debian64: Checking if box 'debian/bullseye64' version '11.20221219.1' is up to date...
==> don-debian64: 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", "203179ea-80ae-4bae-b511-1a744561c3d4", "--natpf1", "delete", "127.0.0.1tcp8282", "--natpf1", "delete", "ssh"]
Stderr: VBoxManage: error: The machine 'don_don-debian64_1674035812904_21653' is already locked for a session (or being unlocked)
VBoxManage: error: Details: code VBOX_E_INVALID_OBJECT_STATE (0x80bb0007), component MachineWrap, interface IMachine, callee nsISupports
VBoxManage: error: Context: "LockMachine(a->session, LockType_Write)" at line 637 of file VBoxManageModifyVM.cpp
==> 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", "52b6103a-9b35-44c5-9847-80de5073a1b2", "--type", "headless"]
Stderr: VBoxManage.exe: error: Not in a hypervisor partition (HVP=0) (VERR_NEM_NOT_AVAILABLE). VBoxManage.exe: error: VT-x is disabled in the BIOS for all CPU modes (VERR_VMX_MSR_ALL_VMX_DISABLED) VBoxManage.exe: error: Details: code E_FAIL (0x80004005), component ConsoleWrap, interface IConso**
Is there any solution to the issue?
There was an error while executing VBoxManage
, a CLI used by Vagrant
for controlling VirtualBox. The command and stderr is shown below.
Command: ["startvm", "9761ffaa-52a4-4d00-891b-7b17415448db", "--type", "headless"]
I'm also facing this like everybody. I try many ways but it's still the same
Best fix Device Manager-> Network Adapters Disable and enabled the Virtualbox Host only Adapter, worked for me 😉
Just surprised that so many people suffered from this problem. For the .38 version, I tried many solutions mentioned above without success, but a simple rebooting works!
here's the solution https://www.comss.ru/page.php?id=7726
I met the error message at the beginning:
==> 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", "9cc90ed2-3737-47d4-8d24-151f0ea577c6", "--type", "headless"]
Stderr: VBoxManage.exe: error: Failed to get device handle and/or partition ID for 0000000001e69dd0 (hPartitionDevice=0000000000000a45, Last=0xc0000002/1) (VERR_NEM_VM_CREATE_FAILED) VBoxManage.exe: error: Details: code E_FAIL (0x80004005), component ConsoleWrap, interface IConsole
And the VirtualBox version is 6.1.28; vagrant version is 2.2.18 However, after I change VirtualBox to version 6.1.30 the problem is solved!
Tried to install latest (acording to your VBox version) VirtualBox Extension Pack? Solved my problem.
Still experiencing the error in Windows Virtual Box version 6.1.32 Vagrant version Installed Version: 2.2.16
There was an error while executing `VBoxManage`, a CLI used by Vagrant for controlling VirtualBox. The command and stderr is shown below. Command: ["startvm", "0a967fd3-201d-4023-9dda-a1d0495750c0", "--type", "headless"] Stderr: VBoxManage.exe: error: The virtual machine 'ansible-node' has terminated unexpectedly during startup with exit code -1073741819 (0xc0000005) VBoxManage.exe: error: Details: code E_FAIL (0x80004005), component MachineWrap, interface IMachine
Same here... Anyone found a solution for this?
To anyone encountering this issue:
For me the virtual machines wouldn't boot in headless mode but would in "regular" mode with GUI. I solved this by adding this to my Vagrantfile:
config.vm.provider "virtualbox" do |v| v.gui = true end
Pretty sure this issue is not vagrant related since Virtualbox by itself encounters the same issue.
This one worked pretty well, Thanks a lot @MarioAquino-MAQU ❤️🙌
STDERR: There was an error while executing
VBoxManage
, a CLI used by Vagrant for controlling VirtualBox. The command and stderr is shown below.Command: ["startvm", "85834710-d639-4ea9-98a0-2d7504a38da4", "--type", "headless"]
Stderr: VBoxManage.exe: error: The virtual machine 'kitchen-onguard-netbox-wrapper-default-centos-79' has terminated unexpectedly during startup with exit code -1073741819 (0xc0000005) VBoxManage.exe: error: Details: code E_FAIL (0x80004005), component MachineWrap, interface IMachine ---- End output of vagrant up --no-provision --provider virtualbox ---- Ran vagrant up --no-provision --provider virtualbox returned 1] on default-centos-79