Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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 stackoverflow.com Dec 7 '09 at 15:53

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

2 Answers 2

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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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