Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a headless Debian server which I have installed Virtual Box on. From there, I would like to run a VM, but, without something like KDE, I have no idea how to start up the VM from the shell, and boot it up when the server does.

Does anyone have experience with running VM's in Virtual Box on Linux?

share|improve this question

migrated from Dec 7 '09 at 15:53

This question came from our site for professional and enthusiast programmers.

up vote 2 down vote accepted

The command you're looking for is

VBoxManage startvm "VirtualMachineName"

That does assume the software is installed and your virtual machines are in the correct directory.

To make it start on boot, you could do something like an init.d script. You can do that by copying one of the existing ones, editing it to your liking (you might also want to add a stop/shutdown function to turn the VM off before you turn the host machine off), and then register it with the OS using the command

update-rc.d VMControl defaults

This assumes your file is located at /etc/init.d/VMControl, and you have made it executable (chmod 775 ./VMControl).

Hope that helps.

share|improve this answer

Have a look at the VBoxManage command tool--it has the ability to create an launch VMs from the command line. Here is an example. Details on the VBoxManage command can be found in the User Manual (warning, PDF).

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .