Vagrant with Virtualbox 6.1.26 issues

Hi,

having issues with vagrant on virtualbox 6.1.26, there is error as below on vagrant up, after doing vagrant halt

--------------------- error message -----------------------------
Bringing machine ‘default’ up with ‘virtualbox’ provider…
==> default: Checking if box ‘generic/ubuntu2004’ version ‘3.3.4’ 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”, “dd6b763d-d888-4be7-904d-7c5734e65b72”, “–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
--------------------- end of error message -----------------------------

how to simulate the above error :
#vagrant init generic/ubuntu2004
#vagrant up
#vagrant halt
#vagrant up

my vagrant environment :
windows 10 pro version 21H1 OS build 19043.1165
vagrant version 2.2.18
virtualbox version 6.1.26

Temporary soution is to downgrade the virtualbox to 6.1.24

i think this is related to the virtualbox 6.1.26 changes
https://www.virtualbox.org/wiki/Changelog
“VBoxHeadless: Running VM will save its state on host shutdown”

please info if there is another solution for the current virtualbox (6.1.26)

Thank you

3 Likes

Getting the same issue
generic/Centos7
vagrant 2.2.18
virtual box 6.1.26 reverted to 6.1.24
OS Win 10 Ent Ver 21H1 Build 19043.1165

I can confirm this issue as well

generic/Centos7
vagrant 2.2.18
Oracle VirtualBox 2.1.26
OS Win 10 Ent Release 20H2

vagrant up works after a cold start but vagrant reload fails with the same error mentioned above. If I restart my computer and run vagrant up again it will work.

I am going to try downgrading VirtualBox to 2.24 and will edit this response with my results but i suspect it will solve the issue like it did for others

I am having the same issue too

Guest: Ubuntu Xenial
Vagrant 2.2.18
Virtual box 6.1.26
Host: Windows 10 21H1 19043.1288

vagrant up works on restarting the host machine. It might work multiple times even after using vagrant halt. But eventually I get the error above.

Even running VBoxManage directly brings up the same error.

Running Task Manager with (Ctrl+Alt+Del) and ending the process called VirtualBox Headless Frontend fixes this issue.

Is it possible that vagrant halt is not shutting down this process correctly? Or is it an issue with some VirtualBox executable responsible for shutting down headless VMs?

Shutting down the VM using the VirtualBox GUI by selecting Close->Save state closes all the VirtualBox Headless Frontend processes correctly. This implies that the issue lies with vagrant halt.

Update 19/10/2021: Shutting down the VM using the VirtualBox GUI by selecting Close->ACPI shutdown seemed to work but on further trials it sometimes leaves the VirtualBox Headless Frontend processes running, which is causing the issue.

This issue has been fixed in 6.1.28.

Windows Host: Fixed VBoxHeadless process sticking around after VM is closed (bug #20574)