How to shut down VirtualBox / Vagrant from CLI
So you need to stop one or more running VirtualBox instances that you may have started and are hanging around. Here are a few helpful commands:
List all running machines (returns name and UUID)
VBoxManage list runningvms
Stop running VMs by "hibernating" them (recommended to avoid data loss)
VBoxManage controlvm <name|uuid> savestate
Poweroff running VMs (not recommended because we may lose data in the guest)
VBoxManage controlvm <name|uuid> poweroff
Use ACPI in an ACPI-aware guest OS (preferable to poweroff for graceful shutdown of guests)
VBoxManage controlv m <name|uuid> acpipowerbutton