Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
added vm-shutdown
  • Loading branch information
VectorCell committed Jun 1, 2021
1 parent 3981018 commit f78bcb5
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions scripts/vm-shutdown
@@ -0,0 +1,11 @@
#!/bin/bash

if [ "$1" != "-f" ]; then
echo "ERROR: cowardly refusing to send the shutdown signal to all running VMs."
echo "To override this cowardice, use the -f option with this script."
exit 1
fi

for VMNAME in $(VBoxManage list runningvms | tr -d '"' | awk '{print $1}'); do
VBoxManage controlvm "$VMNAME" acpipowerbutton
done

0 comments on commit f78bcb5

Please sign in to comment.