[VBoxVmService] -> Discussion & Support

Discussions related to using VirtualBox on Windows hosts.
AllenL
Posts: 39
Joined: 9. Sep 2010, 11:29
Primary OS: MS Windows XP
VBox Version: PUEL
Guest OSses: WinXP

Re: [VBoxVmService] -> Discussion & Support

Post by AllenL »

FB2000 wrote:Windows has a hard limit to how long the service controller could wait when system reboots. The time limit is specified in the WaitToKillServiceTimeout value of the following registry key: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control. Your PauseShutdown value should never exceed this time limit.

Based on that, I would say just stay with 'savestate', unless you are sure 'acpipowerbutton' can be done with in the time limit.
Hi FB2000,

Apologies for asking this question again but I still cant get how the "Pauseshutdown" works in VBoxVmService in relation to the "WaitToKillServiceTimeout" of Windows. Once the PC is issued the shutdown command, whether using the Power button or via Windows, is it that:

a) the guest VM initiates the shutdown sequence simultaneously with the Pauseshutdown delay then tells Windows WaitToKillServiceTimeout to start countdown after the Pauseshutdown delay has expired?

b) Windows WaitToKillServiveTimeout is initiated, the guest VM initiates the shutdown sequence after the Pauseshutdown delay has expired then waits for Windows WaitToKillServiceTimeout to expire and shutdown?

My guest VMs are booting much better now after adjusting these two variables but some guests still take more time to do a savestate than others. I am concerned that these guests might get caught in the middle of the Windows WaitToKillServiceTimeout and get shutdown inappropriately. In such cases, I would either shorten the Pauseshutdown value or increase the WaitToKillServiceTimeout value to give more time to the guest VMs to do their thing.

Kindly explain. Thanks!
pikeman
Posts: 2
Joined: 15. Jan 2011, 06:49
Primary OS: MS Windows Vista
VBox Version: OSE other
Guest OSses: CentOS

Re: [VBoxVmService] -> Discussion & Support

Post by pikeman »

HELP!, windows vista x64 sp2 host
virtulbox 4.0.0
VBoxVMService Firewaorks downloaded yesterday

It does not work!!!
HELP!!!
detail service install and start fine, but it can not start VM.
FB2000
Posts: 92
Joined: 10. Sep 2009, 13:27
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: CentOS

Re: [VBoxVmService] -> Discussion & Support

Post by FB2000 »

AllenL wrote: My guest VMs are booting much better now after adjusting these two variables but some guests still take more time to do a savestate than others. I am concerned that these guests might get caught in the middle of the Windows WaitToKillServiceTimeout and get shutdown inappropriately. In such cases, I would either shorten the Pauseshutdown value or increase the WaitToKillServiceTimeout value to give more time to the guest VMs to do their thing.

Kindly explain. Thanks!
For VBoxVmService version 2.1 and later (update VBoxVmService if you are still using 2.0 or earlier), when Windows is sutting down, it works like this

1) VBoxVmService is notified of the shutting down requirest, it will immiditely send out

Code: Select all

VBoxManager.exe controlvm savestate
or

Code: Select all

VBoxManager.exe controlvm acpipowerbutton
command to each VM it started, based on the settings in VBoxVmService.ini.

2) VBoxVmService will wait for PauseShutdown delay, then exit itself. If PauseShutdown is bigger than WaitToKillServiceTimeout, then VBoxVmService will not get a chance to close itself cleanly, it will be killed by Windows forcely as non-responding service.

3) Each VM will take different time to complete the controlvm command in step 1. Hopefull all can be finished before PauseShutdown or WaitToKillServiceTimeout, whichever is smaller.

Hope that helps.
FB2000
Posts: 92
Joined: 10. Sep 2009, 13:27
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: CentOS

Re: [VBoxVmService] -> Discussion & Support

Post by FB2000 »

pikeman wrote:HELP!, windows vista x64 sp2 host
virtulbox 4.0.0
VBoxVMService Firewaorks downloaded yesterday

It does not work!!!
HELP!!!
detail service install and start fine, but it can not start VM.
I am sorry I don't know how to help without further details. Please submit a support ticket at http://sourceforge.net/tracker/?group_i ... id=1045322, with contents of VBoxVmService.ini and detailed log.
pikeman
Posts: 2
Joined: 15. Jan 2011, 06:49
Primary OS: MS Windows Vista
VBox Version: OSE other
Guest OSses: CentOS

Re: [VBoxVmService] -> Discussion & Support

Post by pikeman »

I tried it again and it worked.
I did 2 things, 1 I put vista into test mode when I was trying to mess with vmware server install
2, I put username as pikeman instead of Pikeman in the ini file

anyway, it works now, thanks
AllenL
Posts: 39
Joined: 9. Sep 2010, 11:29
Primary OS: MS Windows XP
VBox Version: PUEL
Guest OSses: WinXP

Re: [VBoxVmService] -> Discussion & Support

Post by AllenL »

FB2000 wrote:
For VBoxVmService version 2.1 and later (update VBoxVmService if you are still using 2.0 or earlier), when Windows is sutting down, it works like this

1) VBoxVmService is notified of the shutting down requirest, it will immiditely send out

Code: Select all

VBoxManager.exe controlvm savestate
or

Code: Select all

VBoxManager.exe controlvm acpipowerbutton
command to each VM it started, based on the settings in VBoxVmService.ini.

2) VBoxVmService will wait for PauseShutdown delay, then exit itself. If PauseShutdown is bigger than WaitToKillServiceTimeout, then VBoxVmService will not get a chance to close itself cleanly, it will be killed by Windows forcely as non-responding service.

3) Each VM will take different time to complete the controlvm command in step 1. Hopefull all can be finished before PauseShutdown or WaitToKillServiceTimeout, whichever is smaller.

Hope that helps.
FB2000,

Thank you for the explanation. Now I understand how this works better.

I'm using the version after the Red Dragon and I think I'll have to extend the PauseShutdown delay further than 5000. Some of the VMs are reporting errors in the log file after power up. Must be due to prior incomplete shutdowns.
AllenL
Posts: 39
Joined: 9. Sep 2010, 11:29
Primary OS: MS Windows XP
VBox Version: PUEL
Guest OSses: WinXP

Re: [VBoxVmService] -> Discussion & Support

Post by AllenL »

Hi,

I often encounter this error message listed in the VBoxVmService logfile after powerup:

"ERROR: The machine is not mutable (state is Saved)
Details: code VBOX_E_INVALID_VM_STATE (0x80bb0002), component Machine, interface IMachine, callee IUnknown
Context: "COMSETTER(Ports)(Bstr(ValueUnion.psz))" at line 1862 of file VBoxManageModifyVM.cpp"

Can anybody explain what this error means, what caused this error and is there reason to be alarmed? My setup for my VM's shutdown sequence is "savestate" mode. So far I can see the shutdown log:

"0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%"

so i guess it has shutdown properly.

Thanks!
ChrisJenkins
Posts: 32
Joined: 27. Sep 2008, 11:15
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux x64, Win 7 x64

Re: [VBoxVmService] -> Discussion & Support

Post by ChrisJenkins »

Just wanted to say thanks for VBoxVMService. This is just what I needed and so far seems to be working very well for me.
64BitVMIsGood
Posts: 3
Joined: 10. Feb 2011, 21:27
Primary OS: MS Windows 2008
VBox Version: PUEL
Guest OSses: Windows Server 2008

Re: [VBoxVmService] -> Discussion & Support

Post by 64BitVMIsGood »

hi everyone,

It appears as though my VM hard drive has died.

The error message I am seeing is:

Hard Disk 'yourdisk' with UUID {guid} cannot be directly attached to the virtual machine 'VM' ('directory.xml) because it has 1 differencing child hard disks.
Result Code: E_FAIL (0x80004005)
Component: Machine
Interface: IMachine {guid}

And it is marked as inaccessible. I have not done anything special to this VM, it only has the 1 drive.

What I had installed:
1. Windows Server 2008 Enterprise (x64) SP2
2. SQL Server 2008 Enterprise (x64) SP1
3. Microsoft Visual Studio 2010
4. Microsoft Dynamics CRM 2011

When it died, I had visual studio 2010 open, and was debugging a CRM Plugin. I am sure I also had at least 1 IE window open as well.

Has anyone seen this before, or have suggestions on how to troubleshoot?
streerp
Posts: 1
Joined: 17. Feb 2011, 13:22
Primary OS: MS Windows 2008
VBox Version: PUEL
Guest OSses: WinXP

Re: [VBoxVmService] -> Discussion & Support

Post by streerp »

I am running Vbox 4.0.2 and have also downloaded the latest vboxvmservice to run an XP VM on a win2008 server. The service is set up and starts but no VM runs. Logs look a bit empty?!?
02/17/2011, 11:19:44 - C:\vms\VBoxVmService.exe
02/17/2011, 11:19:44 - C:\vms\VBoxVmService.ini
02/17/2011, 11:19:44 - C:\vms\VBoxVmService.log
02/17/2011, 11:19:44 - VBoxVmService
02/17/2011, 11:19:44 - Running command: '-nologo showvminfo "XPMK3"'.
02/17/2011, 11:19:44 - Running command: '-nologo modifyvm "XPMK3" --vrdeport 3001'.
02/17/2011, 11:19:44 - Running command: '-nologo startvm "XPMK3" --type headless'.
02/17/2011, 11:36:00 - Running command: '-nologo controlvm "XPMK3" "savestate"'.

I did have an older version of both running on a previous machine, and the logs were more verbose, hence me thinking that it just hasn't started properly ... is there anything else I can check/look up to see what is happening :?:
VBoxVmService.ini looks like
[Settings]
ServiceName=VBoxVmService
VBOX_USER_HOME=C:\Users\Administrator\.VirtualBox
PauseShutdown=10000

[Vm0]
VmName=XPMK3
WorkingDir=C:\vms
ShutdownMethod=savestate
VrdePort=3001

VM works fine when firing up normally, just not with Headless ... which is the way we want to go.
Any advice appreciated as this is a great product, both vbox and the Headless add on.

Cheers, Bob
FB2000
Posts: 92
Joined: 10. Sep 2009, 13:27
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: CentOS

Re: [VBoxVmService] -> Discussion & Support

Post by FB2000 »

I don't understand why the logs come out like this. Please try uninstall vboxvmservice and reinstall. The logs should be much more verbose in new version, even if those commands failed errors should be reported.

Have you tried to run

Code: Select all

VmServiceControl.exe -su 0
at command line?

Also check that VBOX_INSTALL_PATH environment variable points to correct path where VBoxManage.exe can be find.
distudio
Posts: 1
Joined: 21. Feb 2011, 05:16
Primary OS: MS Windows 2003
VBox Version: PUEL
Guest OSses: Linux

Re: [VBoxVmService] -> Discussion & Support

Post by distudio »

streerp wrote: VrdePort=3001

VM works fine when firing up normally, just not with Headless ... which is the way we want to go.
Any advice appreciated as this is a great product, both vbox and the Headless add on.

Cheers, Bob
Hi Bob,

Being a relative Newb to Vbox I suspect that I fell into the same trap, all the same symptoms as you describe including the log excerpt but for the fact that I'm running SBS 2003 R2 as host. It might seem obvious to devs and long time users but in order to function as as a service you must also enable the Remote Desktop Server Port in the settings of the virtual machine environment.

In your case as you retained "VrdePort=3001" in the ini file the Remote Desktop Server Port should be set for port 3001. I hope it helps and I'm not just stating the bleeding obvious.

Cheers,

Rob
Mapson.John
Posts: 2
Joined: 4. Jan 2011, 12:06
Primary OS: Other
VBox Version: OSE other
Guest OSses: Other

Re: [VBoxVmService] -> Discussion & Support

Post by Mapson.John »

Hey,

Like many others here, i've been struggling with getting VBoxVmService to work.
For most of the errors found in the VBoxVmService log file described by other posters, the following will provide a sollution:

Problem
- If your log file is showing lines like the following: "ERROR: could not find a registered machine named"
- Or some other variations...

Sollution
- VBoxVmService -has- to run as Local System. The SYSTEM user is the same as the LocalSystem user.
- For this user, the environment variable VBOX_HOME_PATH has to be set
- This user has its own environment variables. New environment variables only get applied after a reboot. I don't know of a way to log in as SYSTEM to manually set the environment variable without a reboot.
- So, simply reboot.

Also, over here you can find the more structured support forum:
- http://sourceforge.net/tracker/?group_i ... id=1045322

And a support thread discussing this issue:
- http://sourceforge.net/tracker/?func=de ... id=1045322

Enjoy!
whatdoesitwant
Posts: 19
Joined: 9. Jul 2009, 14:19
Primary OS: MS Windows 8
VBox Version: PUEL
Guest OSses: Debian 7, Windows 8

Re: [VBoxVmService] -> Discussion & Support

Post by whatdoesitwant »

Running VBoxVMService 2.2 (Fireworks) with VirtualBox 4.04 on Windows 7.

I had (another) "doh"-moment when I noticed that my virtual machines didn't start (with no notable failures).
Both username and the names of the virtual machines in VBoxVMService.ini are case sensitive.

The machinename for VBoxVMService.ini is the machine name as registered with VirtualBox itself. It's the name you see in the VM VirtualBox Manager screen. I confused this with the name I provided to the guest os (in my case same name, no capitals).
I only noticed my lack of coffee and caps when I started the machine manually and it said:

Code: Select all

Read 1 bytes
Started your virtual machine, VM0
Neikius
Posts: 4
Joined: 9. Feb 2011, 14:00
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: linux

Re: [VBoxVmService] -> Discussion & Support

Post by Neikius »

Wow, I got ALL of the symptoms from the last few posts. Something clearly is amiss here.

1) That "differencing hard disks" problem. Well I figured somehow one of the stupid snapshots somehow disappeared! And then I get this error. Somehow I solved it, in the end I had to delete all the snapshots + fiddling with xml. Could be this is caused by trying to run vbox as service? Didn't notice anything similar before.

2) Similar logs to people above me, nothing apparent. If I start the thing by hand it works. I have tried 3 different "products" for making services and neither one works. All just "start" and VM does not actually run ever. There are no new logs that would imply vm working. Also network interface never comes live so I guess it never starts the vm as service.

Win2008 R2 x64. Guess this is as it is right now, sadly.
Post Reply