Here how I destroy virtualbox machines from command line (stop and unregister them)
# name: Check if the machine is running
VBoxManage list runningvms
# Stop the machine
vboxmanage controlvm {{ machine_name }} poweroff soft && sleep 7
# Check if the machine exists
VBoxManage list vms
# Destroy selected machine.
vboxmanage unregistervm --delete {{ machine_name }}
Top comments (0)