1. Intro

This is a list of command line commands I've found useful.

Use these commands to eg ssh into a server and start a VM there.

I use this to start a remote virtualized pihole instance on my main server from my workstation.



2. The list

In no particular order.


Resize vdi-file

# vboxmanage modifyhd "/full/path/to/virtualdisk.vdi" --resize 40960


List VMs

# vboxmanage list vms


List running VMs

# vboxmanage list runningvms
"Ubuntu 16.04 Server x64 LTS" {bc9819d4-c39b-47d0-ac27-5cda8ab57419}​

Use the UID between the curly brackets to start a VM headless, see below.


Shut down a VM

# vboxmanage controlvm "vm" poweroff


Start a VM with GUI

# vboxmanage startvm "vm" --type gui


Start a VM headless (no GUI)

# vboxheadless --startvm bc9819d4-c39b-47d0-ac27-5cda8ab57419 &


More to come...



3. Sources

The interweb