Skip to main content

Useful VirtualBox Commands

If you run VirtualBox, here are some useful commands to manage your VMs.

Check state of VM

VBoxManage showvminfo your-vm | grep State

State should be running. If aborted, but stop and restart the VM (see below).

Check NIC configuration of VM

VBoxManage showvminfo your-vm | grep NIC

Restart the VM

VBoxManage startvm your-vm --type headless

Stop the VM

If you need to stop the VM, use the following “soft” shutdown technique to avoid any file system corruption:

VBoxManage controlvm your-vm poweroff soft

Delete the VM

The entire VM may be removed as follows:

VBoxManage unregistervm your-vm -delete