VBoxHeadless VM process remains running after stop

Discussions related to using VirtualBox on Windows hosts.
Post Reply
Tom79
Posts: 7
Joined: 6. Dec 2018, 14:53

VBoxHeadless VM process remains running after stop

Post by Tom79 »

I was looking the forum entries for similar issues/problems but I didn't find something.

I'm using VirtualBox on Windows10 (Version 1909 Build 18363.1734).
I updated VirtualBox from 6.1.22 to 6.1.26.

I use VirtualBox VMs in headless mode via VBoxMangage for a longer time with different VirtualBox versions. But with VirtualBox 6.1.26 I have following problem.

step1: I start a debian buster x64 VM from command in headless mode with "VBoxManage.exe startvm <vm-name> --type headless". This is ok.
step2: Also stopping the VM seems to be ok, the command "VBoxManage.exe controlvm <vm-name> acpipowerbutton" doesn't show an error, the result code is ok.
step3: Trying to start the VM again leads to following output:

Waiting for VM "SimSvc_VBox6-1-26-Test" to power on...
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
Error Starting VM

I deleted the VM and I repeated the steps and there I saw after step2 by means of Windows ProcessExplorer that the Window-Process "VBoxHeadless.exe" is still running although the VM-stop command was ok.

After step2 I tried again to stop the VM - this leads to following command output:
VBoxManage.exe: error: Machine 'SimSvc_VBox6-1-26-Test' is not currently running
Error Stopping VM, errorcode 1

I attached the VM directory content (with logs) after step2 and after step3.
Attachments
SimSvc_VBox6-1-26-Test-after-2nd-start.zip
This is the VM directory content after step3.
(107.27 KiB) Downloaded 5 times
SimSvc_VBox6-1-26-Test-after-stop.zip
This is the VM directory content after step2.
(92.84 KiB) Downloaded 5 times
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: VBoxHeadless VM process remains running after stop

Post by scottgus1 »

'Tis a known bug, see https://www.virtualbox.org/ticket/20574. Workaround for now is to roll Virtualbox back to a version that worked. The Bugtracker poster restored proper headless operation with 6.1.22.
fth0
Volunteer
Posts: 5668
Joined: 14. Feb 2019, 03:06
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, ...
Location: Germany

Re: VBoxHeadless VM process remains running after stop

Post by fth0 »

Tom79 wrote:I repeated the steps and there I saw after step2 by means of Windows ProcessExplorer that the Window-Process "VBoxHeadless.exe" is still running although the VM-stop command was ok.
How many Windows processes named "VBoxHeadless.exe" were running before (3) and after step2 (1|2|3)?
Tom79
Posts: 7
Joined: 6. Dec 2018, 14:53

Re: VBoxHeadless VM process remains running after stop

Post by Tom79 »

Yes, after step1 (start-VM) there are 3 VBoxHeadless Windows processes running and after step2 (stop-VM) there is 1 VBoxHeadless process.
fth0
Volunteer
Posts: 5668
Joined: 14. Feb 2019, 03:06
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, ...
Location: Germany

Re: VBoxHeadless VM process remains running after stop

Post by fth0 »

This issue should be fixed in the VirtualBox test builds 6.1.27r147422 and newer.
Post Reply