basically everything that you can do with the super conveniant virtualbox gui you can do from the commandline on a headless server.

# set default vm directory
# where all vms should reside in
# also if you clone a vm it will be copied in this folder
vboxmanage setproperty machinefolder /vms/

# register/add/import vm/make existing vm known to the system
VBoxManage registervm /path/to/vm.vbox

# unregister vm
VBoxManage unregistervm /path/to/vm.vbox

# list all registered vms
VBoxManage list vms
# show info about a particular vm
# you can also use the vmid
vboxmanage showvminfo vmname

# start vm
VBoxManage startvm vmName --type headless

# should trigger orderly shutdown, if OS is listening to this event
# like push of power button
VBoxManage controlvm vmName acpipowerbutton

# hard off
# like pulling power cord
VBoxManage controlvm vmName poweroff

 

liked this article?

  • only together we can create a truly free world
  • plz support dwaves to keep it up & running!
  • (yes the info on the internet is (mostly) free but beer is still not free (still have to work on that))
  • really really hate advertisement
  • contribute: whenever a solution was found, blog about it for others to find!
  • talk about, recommend & link to this blog and articles
  • thanks to all who contribute!
admin