版权声明:AshQ https://blog.csdn.net/qq_41565459/article/details/82465937
#先开启pool的auto_poweron
xe pool-list
xe pool-param-set uuid=UUID other-config:auto_poweron=true
#设置单台VM自启动
xe vm-param-set uuid=UUID other-config:auto_poweron=true
#设置所有VM自启动
for i in `xe vm-list params=uuid --minimal | sed 's/,/ /g'`;do xe vm-param-set uuid=$i other-config:auto_poweron=true;done
#取消所有VM的自启动
for i in `xe vm-list params=uuid --minimal | sed 's/,/ /g'`;do xe vm-param-remove uuid=$i param-name=other-config param-key=auto_poweron;done