XenServer虚拟机开机自启
一、先登录XenServer
$ssh root@172.16.18.21
root@172.16.18.21's password:
Permission denied, please try again.
root@172.16.18.21's password:
Last failed login: Mon Nov 5 11:29:46 CST 2018 from 172.16.18.238 on ssh:notty
There was 1 failed login attempt since the last successful login.
Last login: Tue Oct 30 16:24:26 2018 from 172.16.18.238
[root@metrics ~]#
二、查看 pool list
[root@metrics ~] xe pool-list
uuid ( RO) : c1ca74cd-e670-c67c-435f-b0367116c542
name-label ( RW):
name-description ( RW):
master ( RO): adb8383a-f355-4971-814a-5826c4f440ac
default-SR ( RW): bb587bb4-3576-ae8d-d0be-e262a47c39c7
[root@metrics ~] xe pool-param-set uuid=c1ca74cd-e670-c67c-435f-b0367116c542 other-config:auto_poweron=true
三、查看虚拟机列表,并添加到自动启动
[root@metrics ~]# xe vm-list
uuid ( RO) : 546e7189-143f-3e97-af37-40ad82fbefa8
name-label ( RW): 你装机前设定定的名字
power-state ( RO): running
uuid ( RO) : 0430cad8-6990-044e-101b-b05cfa98e2e0
name-label ( RW): CentOS 7-Redis5
power-state ( RO): running
添加到自动启动,注意uuid为虚拟机的唯一标识
[root@metrics ~]# xe vm-param-set uuid=546e7189-143f-3e97-af37-40ad82fbefa8 other-config:auto_poweron=true
[root@metrics ~]# xe vm-param-set uuid=0430cad8-6990-044e-101b-b05cfa98e2e0 other-config:auto_poweron=true