[VBoxVmService] -> Discussion & Support

Discussions related to using VirtualBox on Windows hosts.
mattz
Posts: 95
Joined: 18. Feb 2008, 11:51
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: WinXP/Debian/OSX
Location: Germany
Contact:

Re: [VBoxVmService] -> Discussion & Support

Post by mattz »

FB2000 wrote:For people who have problem getting VBoxVmService to work, I would encourage you to submit a Support Request at https://sourceforge.net/projects/vboxvmservice/support. That will help us track your issues easier.
Bug Report, Patch, and Feature Request are welcome on above link, too.
Good point, FB2000! :-)

Cheers, Mattz
mattz
Posts: 95
Joined: 18. Feb 2008, 11:51
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: WinXP/Debian/OSX
Location: Germany
Contact:

Re: [VBoxVmService] -> Discussion & Support

Post by mattz »

Please note my update to the first post of this thread, regarding documentation availability

LINK: http://forums.virtualbox.org/viewtopic. ... 891#p16891
mattz
Posts: 95
Joined: 18. Feb 2008, 11:51
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: WinXP/Debian/OSX
Location: Germany
Contact:

Re: [VBoxVmService] -> Discussion & Support

Post by mattz »

VBoxVmService 2.0 - Codename: "Red Dragon" has arrived.

Read the announcement here:

LINK: http://forums.virtualbox.org/viewtopic. ... 74#p153174
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,

Its been awfully quiet here since the release of the Red Dragon version of VBoxService.

I have tried the earlier release but have some questions on the Red Dragon release which are not discussed in detail in the HowTo file:

1) In the earlier versions, we use the VBoxVmService to initiate the service. This time, I understand that we are to use the VmServiceControl instead. However, VBoxService is still included in the latest download. When do we use VBoxVmService and VmServiceControl? Kindly explain.
2) When you indicated "New interactive model with VmServiceControl", what do you exactly mean by this?

Apologies but I am not that familiar with reading and interpreting the source codes. The documentation files are quite straightforward but does not provide explanation to the differences of the new version from the last one. Appreciate your feedback on these. Thanks!

Allen
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 »

Hi Allen,

A lot has been changed since version 2.0 "Red Dragon". I'll try to explain the most important.

In earlier versions, the VMs run in a way like

Code: Select all

VBoxVmService.exe -> startup.exe -> VBoxManage.exe 
And yes, you can also run "startup.exe" at command line directly to startup a VM. But the VM will by run as the current user, not SYSTEM account as in above case. It was easy to find people running into privileges or access problem regarding .VirtualBox folder, especially on systems like Vista/Win7.

Version 2.0 run VMs as

Code: Select all

VBoxVmService.exe -> VBoxManage.exe 
and with this change, we could remove all those batch files and third party tools, since they are not needed anymore.

Now VBoxVmService.exe become a pure service program. And we added a VmServiceControl.exe to do all the controlling job like install/uninstall service, and startup/stop specified VM. All the control command are executed at VBoxVmService. That means if you start a VM through VmServiceControl at command line, the VM runs exactly the same way as it was started when system reboots, under the SYSTEM user.

To summarize it: VBoxVmService is now much simplified, and is also much easier to install and use. If you need anything else, please let me know.

Best regards,
FB2000
andres696
Posts: 2
Joined: 15. Sep 2010, 16:09
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: xp, 7, debian

Re: [VBoxVmService] -> Discussion & Support

Post by andres696 »

Hi,
first of all great compliments to work to the authors..... but.. :)

If i use acpipowerbutton as guest shutdown method, when there's a real shutdown on host machine, the guest (windows, of course :) ) has not enough time for a clean shutdown.
Is there anybody with the same problem??

thx
andrea
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 »

andres696 wrote: If i use acpipowerbutton as guest shutdown method, when there's a real shutdown on host machine, the guest (windows, of course :) ) has not enough time for a clean shutdown.
Is there anybody with the same problem??
Did you try to modify the PauseShutdown value in VBoxVmService.ini to something longer? Like:

Code: Select all

PauseShutdown=15000
for 15 seconds.
andres696
Posts: 2
Joined: 15. Sep 2010, 16:09
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: xp, 7, debian

Re: [VBoxVmService] -> Discussion & Support

Post by andres696 »

I tried,
sometimes it work and sometimes no, even with bigger values, there's nothing deterministic.
So i looked to sources and digged the web, the keyword is 'SERVICE_ACCEPT_PRESHUTDOWN', but this feature isn't available on XP/2003 server.
I'll try to modify to see if it work..

h++p://blogs.technet.com/b/askperf/archive/2008/02/04/ws2008-service-shutdown-and-crash-handling.aspx

ciao
andrea
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 »

Hi andrea,

Thanks very much for the link. I didn't really notice this shutdown timeout problem before your post.

As you pointed out, SERVICE_ACCEPT_PRESHUTDOWN isn't available on XP/2003 server. And Microsoft document also says that:
This control code should be used only in special circumstances, because a service that handles this notification blocks system shutdown until the service stops or the preshutdown time-out interval expires.
source: http://msdn.microsoft.com/en-us/library ... 85%29.aspx

I think we should probably not using it at all. When your VM takes long time to poweroff, it's better to use savestate as ShutdownMethod, to avoid all the troubles.

I did modify VBoxVmService codes a little bit to make it works better during shutdown. One obvious change is PauseShutdown now became a global setting, instead of VM specific. When service is stopped, it doesn't make sense to wait VM0 to shutdown, then VM1, then VM2, ..., etc. Now all the VMs will start shutting down at once, and all are expected to finish within time specified as PauseShutdown. You could checkout changed codes from svn if you want. This doesn't make difference for people running only one VM, however.

Best regards,
FB2000
njadmin
Posts: 2
Joined: 21. Sep 2010, 23:03
Primary OS: MS Windows 2003
VBox Version: PUEL
Guest OSses: Fedora 5,7,9,10

Re: [VBoxVmService] -> Discussion & Support

Post by njadmin »

Is there a way to get the service to reload the config file without restarting the whole service? (bringing all other virtual machines down)

I'm currently using the Red Dragon release (love the start/stop each machine)

I have added a new machine to the ini file and I'm trying to start it without restarting the service. It says it cannot locate the machine named
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 think VBoxVmService.ini is re-scanned every time when a VM is started, so there should be no problem to add a new machine and start it without restarting the service.

The problem is why it cannot locate the machine named. I suppose this is not because of typo in VM name (too obvious, isn't it?), then the question comes to: after a new VM is created, when will the config files under .VirtualBox folder be created/updated, and thus can be read by VBoxVmService? Remember that VBoxVmService runs as local system user, not the user you used to creat the VM. I have no idea about this right now. Please do experiment out and let us know if you can.
njadmin
Posts: 2
Joined: 21. Sep 2010, 23:03
Primary OS: MS Windows 2003
VBox Version: PUEL
Guest OSses: Fedora 5,7,9,10

Re: [VBoxVmService] -> Discussion & Support

Post by njadmin »

At first I thought it might have been the name of the VM (I used a hyphen in the name) but I renamed it to something simpler.
I have the local system hard linked to the virtualbox.xml file. I'll try and delete and then re-create the link and see if that works.

Looks like recreating the hard link worked. Don't know what happened but I'll keep an eye on it.


One more thing:
Is there a way to have the GUI front end know what machines are running and what state they are in if shutdown?
I'm logged in as the vbox user the service uses but the GUI shows all as shutdown/powered off.
And I also cannot send vboxmanage commands to the machines while running from the same logged in user
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 »

You should really delete the hard link since that's no longer needed and can only make things more complicated. I think the real problem here is still when the config files are updated.

So you are running the service as a normal user? I don't know why your machine states are not detected by GUI then. Please try to remove the hard link, and check to make sure there is only one VBOX_USER_HOME environment variable defined in your system, and see what happens.
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 FB2000,

I also encountered the same shutdown problem as Andrea. Maybe I should revert the settings to "save state" instead of "poweroff".

Its really a good idea to have a status indicator of the VMs on the Host machine. This way, we can see in an instant the status of a VM. Maybe an added feature to this status indicator is to have a "start" & "stop" VM function/button incorporated so we wont have to go to the command line to execute this. Its basically these 3 functions that are used quite often.

Prior to the Red Dragon version of VBoxVmService, there were two application included in the ZIP file which are the "Shutdown" & "Startup". Can these applications still be used in the Red Dragon version? I presume these functions work as a general function (all VMs STOP or STARTED at the same time; non-selective or is it)?
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 »

No, you should not use executable files from old versions on version 2.0 (or later). They are just not compatible. You can start or stop the service by VmServiceControl, that will start or stop all VMs.

It's possible to extend VBoxVmService to show VM status on systray, with an option to start/stop individual VM from the menu. Just not sure how useful that could be and don't have time to try it out, yet. I personally run only one VM at the background and connect to it with SSH. I never feel a need to stop/restart the VM in the middle and check status. I do really like to hear more feedback from you people on this topic, so that we could figure out what's the best way to do it.

Best regards, FB2000
Post Reply