eHow launches Android app: Get the best of eHow on the go.

How To

How to start a VirtualBox virtual machine without a window in Windows XP/Vista, to use via remote desktop connection

Member
By rpromjr
User-Submitted Article
(1 Ratings)
VBox shortcut, batch files, and vbs
VBox shortcut, batch files, and vbs

In this article I will teach you how to start a virtual machine in the background. Therefore you won't see a window for it running. If you want to connect to it, you can then use a remote desktop connection which is often faster and easier than using the VirtualBox window. Why would you want to do this? In case you want to run your virtual machine without having the window always present. Maybe you are running it as a server and don't always need to see the screen of your virtual machine.

Difficulty: Moderate
Instructions

Things You'll Need:

  • Computer with Windows version of VirtualBox installed
  • A virtual machine setup in VirtualBox
  1. Step 1

    Create a batch file, let's call it: startvm.bat
    In that batch file, put:
    "c:\program files\sun\xvm virtualbox\VBoxHeadless" -startvm "name_of_virtual_machine_here" -p 3340
    (make sure the path points to where you installed VirtualBox)

  2. Step 2

    Create a vbs (Visual Basic Script), let's call it: start.vbs
    In that vbs file, put:
    CreateObject("Wscript.Shell").Run """" & WScript.Arguments(0) & """", 0, False

  3. Step 3

    Put both the batch file and vbs file in the same directory somewhere, I put them on my desktop.

    Create a shortcut to the vbs file and go to the properties of that shortcut and change the target to this:
    C:\Users\Home\Desktop\start.vbs startvm.bat
    (make sure the path goes to the folder you put the vbs and batch file at)

  4. Step 4

    Run the shortcut whenever you want to start the virtual machine.

    If you open VirtualBox, you will see that it says your virtual machine is running.

  5. Step 5

    In order to stop the virtual machine, create another batch file, let's call it: shutdownvm.bat
    In that batch file, put:
    "c:\program files\sun\xvm virtualbox\VBoxManage" controlvm "winXPHome" poweroff
    (make sure the path points to where you installed VirtualBox)

  6. Step 6

    Run the batch file to shutdown your virtual machine.
    You will see in VirtualBox that it says your virtual machine is powered off.

    Remember that before you can remote desktop to the machine you will need to set up the remote desktop settings on the virtual machine by logging into the machine through the VirtualBox interface.

Tips & Warnings
  • Secure your virtual machine so others cannot remote desktop to it without permission!
Subscribe

Post a Comment

Post a Comment

Related Ads

  • Have you done this? Click here to let us know.
I Did This
Get Free Computers Newsletters

Copyright © 1999-2010 eHow, Inc. Use of this web site constitutes acceptance of the eHow Terms of Use and Privacy Policy .   en-US Portions of this page are modifications based on work created and shared by Google and used according to terms described in the Creative Commons 3.0 Attribution License. † requires javascript

eHow Computers
eHow_eHow Technology and Electronics