How to run VirtualBox VM as a Windows’ service.

Posted: November 12, 2011 in Software

VMware can do this without any much problem. However, I kinda favor to VirtualBox due to its Linux (as guest OS) driver superiority. I have been reading several quite technical tutorials on how to achieve this. Without any doubt, those authors are amazing. Unfortunately, my hand is tight and I really need a simple and quick solution for this. Lucky for me, somebody has created a software for this purpose; VBoxVmService. A free ware and open source. Sweet.

While I have been tinkering with VirtualBox on Windows hosts, one thing I really wanted to do is to run VMs truely in the background. So that there are no console windows or anything left behind while the VM is running. VirtualBox has a utility called VBoxHeadless which you think would do the trick, but unfortunately it leaves a console window running, as far as I can tell, just to spew out a little information. This is even when you’ve selected to access the screen via VRDP.

Well, I just found this handy little tool called VBoxVmService. With this package, you can easily create up to 127 VMs and run them as a service is any flavor of Windows (I tried it with Windows 7 x64). The set up instructions are pretty straight forward, essentially unpack the software somewhere, edit the configuration file to add your VM(s), register VBoxVmService as a Windows service, and start the service.

The only odd thing for me was that initially the start up process complained that it could not find my VMs by name. After digging around a few posts on the VirtualBox forums, I found a workaround that fixed it for me. I had to add VBOX_USER_HOME as a System environment variable, and reboot. After which everything has been running great.

The VMs start up at boot, and I can access them with Windows Remote Desktop Connection client.

Credit: Mock @ Oracle

 

Comments
  1. Nathan says:

    This is a nice idea but I couldn’t get it to work for me :(. I am trying to get them up and running on a Windows Server 2008 host. I am running two ubuntu server VMs and the networking side of it isn’t exactly simple to say the least. Anyhow, I ended up using a program called ServiceEX to get one of them to work, the other still seems to be having problems though…

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s