loading...

Destroy virtualbox machines from command line

grg121 profile image Francisco Navarro ・1 min read

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 }}

Discussion

markdown guide