auto start all xen servers

#!/bin/bash

sleep 10


VMS=(news-db vweb1 vweb2 vweb3 vweb4 bwin01)  

for vm in ${VMS[@]}
do

if [ -e "/etc/xen/$vm" ] # Check if file exist
then
data=`date '+%d/%m/%Y - %H:%M:%S'` # Current date/time (log purposes)
echo "starting at: $data -- $vm"
#######/usr/sbin/xm create $vm # Create VM
#######sleep 15 # Wait 15 sec to start the next
echo
continue # Next VM
fi

echo "Nothing to be done..."

done

exit 0

No comments:

Other Articles

Enter your email address: