Skip to content

Instantly share code, notes, and snippets.

@eedgar
Created May 22, 2014 20:19
Show Gist options
  • Save eedgar/cabbb43949ce3811a388 to your computer and use it in GitHub Desktop.
Save eedgar/cabbb43949ce3811a388 to your computer and use it in GitHub Desktop.
vmware fusion backups
IFS=$'\n'
RUNNING_VMS=`/Applications/VMware\ Fusion.app/Contents/Library/vmrun list|sed '1d'`
for vm in $RUNNING_VMS
do
echo $vm
echo suspending $vm
`/Applications/VMware\ Fusion.app/Contents/Library/vmrun suspend "$vm"`
done
rsync -Cavz --stats --progress "/Users/eedgar/Documents/Virtual Machines.localized" /Volumes/Data\:Backups/
for vm in $RUNNING_VMS
do
echo starting $vm
`/Applications/VMware\ Fusion.app/Contents/Library/vmrun start "$vm"`
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment