Last Updated: February 25, 2016
· lemuelf

quickly start/stop virtualbox vm from the command line

alias sprecise='VBoxManage startvm --type headless "Precise Pangolin"'
alias kprecise='VBoxManage controlvm "Precise Pangolin" savestate'

I have the above aliases in my .bash_profile to start and stop (save the state of) my "Precise Pangolin" virtualbox VM. I run the VM headless because it's a server and I only ssh to it.

To run it, I just do:

$ sprecise

And to stop it (save the state):

$ kprecise

Running it like this is a lot quicker and prevents me from having the VM icon in my dock/launcher.