- 410-backup-rvms
#!/bin/bash # # Backup all running VMs # # Run user check if [ "$UID" -eq 0 ] then echo "This script should NOT be run as root." exit 1 fi # # Source config file if [ ! -f ~/.vbconfig ]; then echo "Config File ~/.vbconfig not found!" echo "Run: set-folders to create .vbconfig" exit 1 fi . ~/.vbconfig # RUN_VM_LIST=`VBoxManage list runningvms|awk '{print $1}'` for VM in $RUN_VM_LIST do VM1="${VM//\"}" echo "Processing ... $VM1" $VB_BIN_LOC/420-backup-vm-w.bash "$VM1" done # exit