How to run a VirtualBox VM from command line?
Here's the command I run from a shortcut I have on my desktop. This should work from a command line as well.
"C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" startvm <NameOfVMHere>
Of course, this is based on typical system defaults. Any given system might have moved the Program Files folder or installed VirtualBox to a custom location.
vboxmanage
is the way to go
vboxmanage startvm "winxppro Clone"
man vboxmanage
or documentation can be found here
While (<vm>
your vm name)
vboxmanage controlvm <vm> savestate
saves the current statusvboxmanage controlvm <vm> resume
resumes the previous saved statevboxmanage controlvm <vm> poweroff
plugs off your machine cable
I will try to elaborate on @Philippe answer:
Try adding --
before the startvm
The command: vboxmanage startvm <machine_name>
will start the server which name is "machine_name".
For example if you have a machine that called UbuntuServer then the command will look like so: vboxmanage --startvm UbuntuServer
Note vboxmanage
should be in you path to run this command. Add if to your path if not (on my mac it was added with the installation of virtual box.