[TriLUG] New Qemu and VirtualBox docs for Linux
Alan Porter via TriLUG
trilug at trilug.org
Sun May 24 20:56:06 EDT 2015
> Thank you. I didn't know that. Where can I read more about Virtual
> Box's CLI?
I have found that I tend to use a very small number of virtualbox
commands over and over, and I tend to forget their details. So I
created this little function in my $HOME/.bashrc . Maybe it'll
help you or others on the list. The "sh -xc" part is so it will
echo the commands to stderr before running them... hopefully to
reinforce the proper command as I run my shortcut.
Alan
function vbox () {
local vm="$2"
case "$1" in
start) { sh -xc "VBoxManage startvm \"$vm\" --type headless" ; } ;;
pause) { sh -xc "VBoxManage controlvm \"$vm\" savestate" ; } ;;
stop) { sh -xc "VBoxManage controlvm \"$vm\" poweroff" ; } ;;
list) { sh -xc "VBoxManage list runningvms" ; } ;;
all) { sh -xc "VBoxManage list vms" ; } ;;
*) echo "vbox start|pause|stop|list|all" ;;
esac
}
More information about the TriLUG
mailing list