Running VirtualBox VMs as Services in Windows
By me on Mar 04, 2010
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.