AHV - migrate all VM on one node to other node

because my customer got VM fail after he set one node to maintenance mode
so...he want a script can manually migrate VM to other node before node enter maintenance
__________________________
#!/bin/bash

VM=(`virsh list | grep -i -v cvm|gawk -F' ' '{printf("%s\n",$2);}'|awk 'NR>3{print p}{p=$0}'`)
for i in ${VM[@]}; do acli vm.migrate $i;done
__________________________

留言

這個網誌中的熱門文章

Easy way for Try out o365 E3 - Step2 - Install Azure AD connect sync AD account to o365

Win7 RSAT & 2003R2 ADWS