up vote 4 down vote favorite
3
share [g+] share [fb]

I have a VirtualBox machine with Windows XP on a Windows XP Host.

How can I start VirtualBox as a service, so I can get a virtual machine under the hood, and I don't have to start VirtualBox in order to access my virtual machine (via VNC from the network)?

I found that VirtualBox Manage might be the way to go, but since I'm a beginner with this, I don't know where to start.

Any ideas?

link|improve this question

feedback

4 Answers

up vote 2 down vote accepted

Create a Shortcut to C:\Program Files\innotek VirtualBox\VBoxManage.exe

After the quotation marks enter: startvm <your virtual machine name>

Example:

“C:\Program Files\innotek VirtualBox\VBoxManage.exe” startvm XP

Copy/Move the shortcut to your startup folder.

p.s.: if you want to delay the Virtual Machine until your system is fully booted, you can do this in XP via Startup Delayer.

link|improve this answer
It appears to works fine, Is there anyway to "hide" the window for the virtual machine also, so it be running more like a windows service? – Jhonny D. Cano -Leftware- Jan 5 '10 at 19:41
running VBox as a service will not hide the window. you can minimize it automatically to the system tray with AWM though: eusing.com/WindowManager/WindowManager.htm – Molly7244 Jan 5 '10 at 19:59
7  
checkout "VBoxHeadless" for launching VM's with no UI. You will need to use RDP if you want to see the VM's screen. – Mark Porter Jan 5 '10 at 20:25
feedback

Looks like the simplest answer at this point is VBoxVMService. I haven't tried it yet, I'll try to remember to come here and update the answer if/when I do.

link|improve this answer
feedback

Just offering this as another option:

Use the builtin Windows command 'sc' to create a service. Combine this with 'vboxheadless' will get you to where you want to be.

Untested with vboxheadless specifically, but I did create a test service that runs calc.exe. You should be doing something like this:

sc create servicenamehere start= auto binPath= "C:\path\to\vboxheadless.exe --startvm name"

Refer to the documentation for sc for more information. Note: Those spaces after the equal sign are intentional.

link|improve this answer
feedback

Note that the currently accepted answer (Molly7244) actually starts the VM when you login - not when you boot the machine. It is not, in other words, a service.

For an actual service that runs when the machine boots, I use this script in conjunction with cygwin (cygrunsrv). Makes use of the VBoxHeadless mode as mentioned elsewhere on this page.

Works great.

link|improve this answer
1  
+1 for "not a service"... -1 for linking to the solution rather than including it in the answer. Vote is null. :) Consider revising to include the solution as link rot is detrimental to the longevity of this answer. – Aaron Copley Jan 3 at 22:07
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.