Page 1 of 1

VirtualBox COM server bug

Posted: 16. Dec 2013, 05:02
by JustTryingToHelp
Hi.
I'm trying to report a VirtualBox COM server bug which affects VBoxManage.exe and VirtualBox.exe.
It appeared in VirtualBox 4.2.20 and wasn't fixed despite the bug reports on the bugtracker (mines and others).
So I'm reporting it here hoping that it will not be ignored anymore...

Host OS: Windows XP SP3 x86, Windows 7 SP1 x64
VB Version: 4.3.4

I close any VirtualBox.exe and VBoxSVC.exe processes.
I issue a VBoxManage command (started as normal user or as an administrator, it doesn't matter, no change), I wait an amount of time between 6 sec and the moment VBoxSVC process closes and I issue another VBoxManage command.
This time it doesn't do anything for 30 sec and shows this message:

VBoxManage.exe: error: Failed to create the VirtualBox object!
VBoxManage.exe: error: Code CO_E_SERVER_EXEC_FAILURE (0x80080005) - Server execution failed (extended info not available)
VBoxManage.exe: error: Most likely, the VirtualBox COM server is not running or failed to start.
Press any key to close this window...

If I close a VM and in that time interval I start the VB Manager, it fails to start and I get the same error. Or if I close the VB Manager and start a VM...

Batch test file:

Code: Select all

@echo Press any key to start the test...
@pause > nul
"%VBOX_INSTALL_PATH%VBoxManage.exe" modifyvm GUID_OF_THE_VM --hwvirtex off
@if errorlevel 1 goto end
@echo All ok, waiting about 7 sec...
@ping 127.0.0.1 -n 7 -w 1000 > nul
"%VBOX_INSTALL_PATH%VBoxManage.exe" modifyvm GUID_OF_THE_VM --hwvirtex on
@if errorlevel 1 goto end
@echo No error...
:end
@echo Press any key to close this window...
@pause > nul
Best regards

Re: VirtualBox COM server bug

Posted: 16. Dec 2013, 05:09
by Perryg
Actually real bugs go to bugtracker

Re: VirtualBox COM server bug

Posted: 16. Dec 2013, 05:18
by JustTryingToHelp
Perryg wrote:Actually real bugs go to bugtracker
Thanks, but:
JustTryingToHelp wrote:wasn't fixed despite the bug reports on the bugtracker (mines and others).

Re: VirtualBox COM server bug

Posted: 16. Dec 2013, 05:56
by Perryg
And you think that posting it here will make a difference? Re-open a ticket and post your findings.

Re: VirtualBox COM server bug

Posted: 16. Dec 2013, 06:18
by JustTryingToHelp
I understand, but, honestly, how is this gonna help fixing the bug since my first 2 bug reports + other users reports about this bug are not yet solved (for a long time...)? Nobody even answered... something... Completely ignored.
This forum was the last resort.
If you say it's not gonna make a difference, I have no other choice but to give up.
BTW, I reported this bug to be fixed not for my benefit but for a group of VB users. Unfortunately it seems that I can't help them more.
Thanks anyway.

Best regards

Re: VirtualBox COM server bug

Posted: 27. Dec 2013, 06:03
by JustTryingToHelp
Well, I have reported again and... surprise: still no reaction.

So I searched and found 2 workarounds:

1. Killing the VirtualBox COM server:

Code: Select all

@echo off
set ns=7
echo Press any key to start the test
pause > nul
echo Trying to deactivate the hardware virtualization
"%VBOX_INSTALL_PATH%VBoxManage.exe" modifyvm GUID_of_the_VM --hwvirtex off
if errorlevel 1 goto end
echo Killing VBoxSVC.exe
taskkill /F /IM vboxsvc.exe
if errorlevel 1 goto end
echo All ok, waiting about %ns% sec
ping 127.0.0.1 -n %ns% -w 1000 > nul
echo Restarting VBoxSVC.exe directly
start "VBoxSVC" "%VBOX_INSTALL_PATH%VBoxSVC.exe"
echo Trying to reactivate the hardware virtualization
"%VBOX_INSTALL_PATH%VBoxManage.exe" modifyvm GUID_of_the_VM --hwvirtex on
if errorlevel 1 goto end
echo No error
:end
echo Press any key to close this window
pause > nul
2. Waiting for VirtualBox COM server to close:

Code: Select all

@echo off
set ns=7
echo Press any key to start the test
pause > nul
echo Trying to deactivate the hardware virtualization
"%VBOX_INSTALL_PATH%VBoxManage.exe" modifyvm GUID_of_the_VM --hwvirtex off
if errorlevel 1 goto end
echo All ok, waiting about %ns% sec
ping 127.0.0.1 -n %ns% -w 1000 > nul
:recheck
tasklist /FI "IMAGENAME eq vboxsvc.exe" 2> nul | find /I /N "vboxsvc.exe" > nul
if "%ERRORLEVEL%"=="0" (
echo Found VBoxSVC.exe process, checking again in 0.5 sec
ping 127.0.0.1 -n 1 -w 500 > nul
goto recheck
)
echo VBoxSVC.exe process not found
echo Trying to reactivate the hardware virtualization
"%VBOX_INSTALL_PATH%VBoxManage.exe" modifyvm GUID_of_the_VM --hwvirtex on
if errorlevel 1 goto end
echo No error
:end
echo Press any key to close this window
pause > nul

They're not perfect, each one has its small problems, but it's better than nothing...

Merry Christmas.

LE: a workaround for starting VirtualBox.exe:

Code: Select all

@echo off
:recheck
tasklist /FI "IMAGENAME eq vboxsvc.exe" 2> nul | find /I /N "vboxsvc.exe" > nul
if "%ERRORLEVEL%"=="0" (
echo Found VBoxSVC.exe process, checking again in 0.5 sec
ping 127.0.0.1 -n 1 -w 500 > nul
goto recheck
)
echo VBoxSVC.exe closed, starting VirtualBox.exe
start "VirtualBox Manager" "%VBOX_INSTALL_PATH%VirtualBox.exe"