[VBoxVmService] -> Discussion & Support

Discussions related to using VirtualBox on Windows hosts.

Re: [VBoxVmService] -> Discussion & Support

Postby FB2000 » 15. Oct 2010, 16:06

Hi AllenL,

I think I made a mistake in an earlier reply to you. And I'll try to correct here:
* When you use "savestate" as ShutdownMethod, the machine state is saved and will be resumed when you start VM next time. I always use this option myself and never see any problem like data loss or VM failed to start.
* When you use "poweroff" as ShutdownMethod, it's like power plug was pulling off, data get lost and VM may failed to start. I think this option should never be used.
* When you use "acpipowerbutton" as ShutdownMethod, as long as client OS support it, the machine will get a clean shutdown. The only problem for this option is it will take a longer time. If it takes longer than a given time (about 12-15 seconds, configurable in system registry), Windows will think our VBoxVmService service is not-responding and kill it. This is the problem some others had been reporting about and in this case, I suggested to use "savestate" because that's always very quick.

In your case, if you used "poweroff" before and getting problems, just switch to "acpipowerbutton" or "savestate", and see which one works better for you.
FB2000
 
Posts: 92
Joined: 10. Sep 2009, 13:27
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: CentOS

Re: [VBoxVmService] -> Discussion & Support

Postby AllenL » 15. Oct 2010, 17:27

Hello everybody,

Thanks for your replies. I will try extending the PauseShutdown time first and see if this is the cause of our unstable VM.

The last error message I posted was strange. The VM was working and I stopped it with the "VmServiceControl -sd" to adjust some applications. The I issued the -su command to start it again. The command prompt indicated that the VM started but actually did not so I looked into the log and .... the error log I posted. So I was trying to see if anybody can interpret what that error meant.

Anyway, if the Pauseshutdown does'nt work, then I'll try the acpipowerbutton. Will update you guys on this next week.
AllenL
 
Posts: 39
Joined: 9. Sep 2010, 11:29
Primary OS: MS Windows XP
VBox Version: PUEL
Guest OSses: WinXP

Re: [VBoxVmService] -> Discussion & Support

Postby bjorn.stenborg » 19. Oct 2010, 23:44

FB2000 wrote:
bjorn.stenborg wrote:I'm having trouble getting my machine started. I'm running Win7 x64.

I am running Win7 x64, too and I don't have problem like that. Is that possible VBOX_USER_HOME variable is set to wrong path, or the folder pointed by VBOX_USER_HOME is not accessible by local system user (that the VBoxVmService runs as)?


Ah, indeed the permissions on the VBOX_USER_HOME folder were too strict. Thanks for the help - now it's working perfectly! It's wonderful to finally get this working. I've been starting and stopping my Debian machine manually with Windows for almost a year now.

Perhaps a note on this in howto.txt would be good.

/Björn
bjorn.stenborg
 
Posts: 2
Joined: 14. Oct 2010, 00:44
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: Windows XP, Debian

Re: [VBoxVmService] -> Discussion & Support

Postby FB2000 » 20. Oct 2010, 03:51

bjorn.stenborg wrote:Ah, indeed the permissions on the VBOX_USER_HOME folder were too strict. Thanks for the help - now it's working perfectly! It's wonderful to finally get this working. I've been starting and stopping my Debian machine manually with Windows for almost a year now.

Perhaps a note on this in howto.txt would be good.

/Björn

Congraturations, Bjorn.

I am sure it could help others if you could share more details. Do you remember what permissions you used on VBOX_USER_HOME folder that caused the problem? And how did you correct it?

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

Re: [VBoxVmService] -> Discussion & Support

Postby GlenB » 27. Oct 2010, 22:53

When a VM is running as a service, and the Virtualbox GUI is opened on the host, the VM state is "powered off." I am worried that if the VM is started interactively, it will corrupt the image. Is there a way to block the VM from being started a second time, or at least make the user on the host aware that the VM is running?
GlenB
 
Posts: 3
Joined: 15. Oct 2010, 18:58
Primary OS: MS Windows 2003
VBox Version: OSE other
Guest OSses: MS Windows 2003

Re: [VBoxVmService] -> Discussion & Support

Postby cliffboss » 3. Nov 2010, 19:08

Hello

I am getting an error that it cannot find the named vm

.ini file
Code: Select all   Expand viewCollapse view
[Settings]
ServiceName=VBoxVmService
VBOX_USER_HOME=C:\Users\Administrator\.VirtualBox
[Vm0]
VmName=AKIRADEVSP2010
WorkingDir=C:\vms
ShutdownMethod=savestate
VrdpPort=3001
PauseShutdown=15000


I am not sure what I am doing wrong.

Thanks
cliffboss
 
Posts: 5
Joined: 28. Apr 2009, 17:53
Primary OS: MS Windows Vista
VBox Version: PUEL
Guest OSses: Ubuntu

Re: [VBoxVmService] -> Discussion & Support

Postby largesock » 4. Nov 2010, 15:46

I'm having trouble getting this to run on my Windows XP Professional host. I installed it as per the instructions and couldn't get it to run. Kept getting an error message: "ERROR: Could not find a registered machine named 'Ubuntu'". I've double and triple checked the name of the virtual machine, and it's "Ubuntu" with the capital U in the file system, and in the VirtualBox GUI. I set the service to run as my own username, and that didn't fix it. I then changed the ini to get rid of the spaces in the paths just in case that was causing problems, and that didn't fix it either. Any tips for what could be going wrong here? Thanks.
largesock
 
Posts: 1
Joined: 4. Nov 2010, 15:38
Primary OS: MS Windows XP
VBox Version: OSE other
Guest OSses: Ubuntu

Re: [VBoxVmService] -> Discussion & Support

Postby mlcampbe » 4. Nov 2010, 16:37

I have gotten VboxVmService to run and startup my VM's on a vista x64 host and all is working as expected as I can rdp or ssh into the linux guests.

I have a question though. When I use VboxVmService to start the vm's the status is not properly reflected in the virtualbox GUI interface. For example, both of my vm's are currently running after I started the service but when I run the GUI I see that one shows as powered down and the other as saved. Is this normal? Why does the GUI not reflect the correct status? Is there a way to get it to update correctly?
mlcampbe
 
Posts: 4
Joined: 4. Nov 2010, 16:30
Primary OS: MS Windows Vista
VBox Version: PUEL
Guest OSses: 3.2.10

Re: [VBoxVmService] -> Discussion & Support

Postby FB2000 » 5. Nov 2010, 02:49

Answer to GlenB and mlcampbe:

VM status are not detected by VirtualBox GUI because it runs as the same user VBoxVmService runs as, which is LOCAL SYSTEM user by default. And VirtualBox GUI runs as your current user.

It's possible to improve VBoxVmService to show VM status at systray icon in the future. But it will be hard to make VirtualBox GUI aware of that, unless we run both as the same user.


Answer to cliffboss and largesock:

If you are sure the VBOX_USER_HOME folder are setup correctly, then it must be an access permission problem. Right click at the VBOX_USER_HOME folder, wherever it points to, select Properties->Security and make sure SYSTEM user can read/write files under this folder.

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

Re: [VBoxVmService] -> Discussion & Support

Postby graysky » 7. Nov 2010, 23:36

Quick question: what is the other option for ShutdownMethod=? I have seen both savestate and shutdown but not send shutdown signal. I'd like to have the vm shutdown naively.
graysky
 
Posts: 58
Joined: 14. Apr 2009, 22:44
Primary OS: Linux other
VBox Version: OSE other
Guest OSses: WIndowsXP, Linux64

Re: [VBoxVmService] -> Discussion & Support

Postby FB2000 » 8. Nov 2010, 12:20

graysky wrote:Quick question: what is the other option for ShutdownMethod=? I have seen both savestate and shutdown but not send shutdown signal. I'd like to have the vm shutdown naively.

You could use anything that "VBoxManage.exe controlvm" understands, but I believe "savestate" and "acpipowerbutton" are the only two options that works, and "acpipowerbutton" is the right choice for you. Using "poweroff" is really a mistake. Please refer to my explanation at the top of this page.
FB2000
 
Posts: 92
Joined: 10. Sep 2009, 13:27
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: CentOS

Re: [VBoxVmService] -> Discussion & Support

Postby AllenL » 10. Nov 2010, 18:48

Hi FB2000,

Its been awhile since my last post here and my implementation of the increased "Pauseshutdown" value. So far so good. I have not been notified of any hangups.

The value I have set right now is 30s. I do not mind waiting for a longer shutdown period as long as it does not affect the VM. I have tried to execute the 'apipowerbutton' function via the GUI and it takes WinXP a long time to power down.

Question: If I'll use the 'apipowerbutton' this time instead of 'savestate' with VBoxVmService , I will need to have a longer 'Pauseshutdown' value. Is there a limit to the max value that can be set in the 'Pauseshutdown' parameter?
AllenL
 
Posts: 39
Joined: 9. Sep 2010, 11:29
Primary OS: MS Windows XP
VBox Version: PUEL
Guest OSses: WinXP

Re: [VBoxVmService] -> Discussion & Support

Postby FB2000 » 11. Nov 2010, 03:26

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.
FB2000
 
Posts: 92
Joined: 10. Sep 2009, 13:27
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: CentOS

Re: [VBoxVmService] -> Discussion & Support

Postby AllenL » 12. Nov 2010, 13:18

Hi FB2000,

I have reverted the settings of my VMs to "savestate" instead of "acpipowerbutton".

In another situation, when I issue the command "vmservicecontrol -k or -sd n" to shutdown all or a particular VM, the service returns a message of "ControlService failed, error code = 1053". When I look into the log file, the VMs seem to have shutdown (or savestate) properly. What does this error code mean?

My Pauseshutdown value is currently at 20s. Looking at the registry, the "kill...." value is 20000 so I recon this means 20s as well. Maybe the Pauseshutdown delay is too long that caused the error. Will reduce this value and try again.
AllenL
 
Posts: 39
Joined: 9. Sep 2010, 11:29
Primary OS: MS Windows XP
VBox Version: PUEL
Guest OSses: WinXP

Re: [VBoxVmService] -> Discussion & Support

Postby FB2000 » 13. Nov 2010, 12:25

Hi AllenL,

Microsoft doc says error 1053 means "The service did not respond to the start or control request in a timely fashion". So yes, it's very likely to be related to the 20 seconds Pauseshutdown delay. Please modify and try.

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

PreviousNext

Return to VirtualBox on Windows Hosts

Who is online

Users browsing this forum: Baidu [Spider] and 25 guests