How to Autostart a Virtual Machine in VirtualBox

sun virtualbox

Changes:
03/15/2011 - added path of the later virtualbox releases

Starting a guest operating system automatically is just very easy on VirtualBox and is handled nicely by a utility called VBoxManage. Below are the steps to start a virtual machine or a guest OS automatically.

Create a batch file and name it to anything you like e.g startvm.bat and insert the lines below to the batch file:

Earlier Version of VirtualBox
cd "c:\Program Files\Sun\VirtualBox"
vboxmanage startvm "virtual machine name"

Later Version of VirtualBox
cd "c:\Program Files\Oracle\VirtualBox"
vboxmanage startvm "virtual machine name"

VirtualBox VBoxmanage

Save the batch file and place it in the Startup folder.

That’s it, the virtual machine should start automatically every time you start the host machine.


Permalink • Print • Comment

Trackback uri

http://seoroot.com/blog/howto/how-to-autostart-a-virtual-machine-in-virtualbox.html/trackback

Related Entries

7 Comments on How to Autostart a Virtual Machine in VirtualBox »

Floris @ 2:28 pm:

That was easy, and it works. Awesome!

Jeff @ 10:24 am:

Thank goodness for Chef Boyardee!!!! about time something went right for me!!! this fix was just what i needed!! thanks again!!!!!

andy @ 12:20 pm:

hey thanks it kinda worked but now that the virtualbox was bought by oracle it’s not anymore in “c:/program files/sun/virtualbox
it is in c:P F / ORACLE/ virtualbox”

Batman @ 8:38 am:

Hi Andy,

Thanks for the notice.

Warm regards,
Em

Jon @ 9:37 pm:

You can also use

“C:\Program Files\Oracle\VirtualBox\VBoxManage.exe” startvm Backtrack5R1 –type headless

This will run the VM in the background with no windoes showing. You can connect to it later by RDPing into localhost at the port number you specify in the VM settings under Display -> Remote Display -> Server port

alireza moshki kakhki @ 10:46 am:

thank for this nice notice

lyallp @ 6:03 am:

VirtualBox now has the ability to right click on a Virtual Machine entry, then create a shortcut on the desktop.

Navigate to the Start Menu->Programs->Startup entry, right click and explore all users (or the current user, whichever is appropriate)

Cut/Paste this shortcut into the Programs->Start folder

:-)

Leave a Comment