由于最近做自动化测试的虚拟机部署在一台XenServer上,物理机断电重启后,虚拟机没有自启,记录一波
[root@xen-node4-kt-165 ~]# xe pool-list
uuid ( RO) : e1eac705-7b50-a05d-1703-84fb028cf1ad
name-label ( RW):
name-description ( RW):
master ( RO): 52d2ac99-a633-428e-b7f3-5a9a38346b1e
default-SR ( RW): aa12bf31-339f-e77b-db4f-ab1fa354e0a2
[root@xen-node4-kt-165 ~]#
[root@xen-node4-kt-165 ~]# xe pool-param-set uuid=e1eac705-7b50-a05d-1703-84fb028cf1ad other-config:auto_poweron=true
uuid ( RO) : c428ebae-e003-7877-a7d3-a467e75084a6
name-label ( RW): auto_win10
power-state ( RO): running
uuid ( RO) : ccf02caf-01d8-9969-fd44-fd9fd5e6d6af
name-label ( RW): ovirt
power-state ( RO): halted
uuid ( RO) : d05075ec-6661-92f7-2a44-62e2a4cf153f
name-label ( RW): CoreOS 8
power-state ( RO): halted
[root@xen-node4-kt-165 ~]# xe vm-param-set uuid=c428ebae-e003-7877-a7d3-a467e75084a6 other-config:auto_poweron=true
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
xe vm-param-remove uuid=xxxx param-name=other-config param-key=auto_poweron