xen configure vm to start with xen server

View Xen Server Information

(1) View pool information
[root@xenserver-243 ~]# xe pool-list
uuid ( RO)                : e29037aa-0dca-f95a-1932-bf6c8ba9206a
          name-label ( RW):
    name-description ( RW):
              master ( RO): 9d71b444-d2de-4d50-a42d-214ac71d0fd1
          default-SR ( RW): 4583c5fc-4329-b93b-abdd-490a429b5827

(2) View vm information
[root@xenserver-243 ~]# xe vm-list
uuid ( RO)           : a10e09d4-f9c3-4570-9f33-a3f632038587
     name-label ( RW): Control domain on host: xenserver-kslxwbgb
    power-state ( RO): running


uuid ( RO)           : 1ceecc89-125c-4ca4-50fd-b613767f8a8e
     name-label ( RW): CentOS6_2.248
    power-state ( RO): halt


uuid ( RO)           : 86e41c0a-b58c-8550-a28c-aa7bcb3e90d1
     name-label ( RW): CentOS6_2.249
    power-state ( RO): halt

1. You must first set the XenServer pool to start automatically at boot 

(1) Set the boot to start
[root@xenserver-243 ~]#  xe pool-param-set uuid=e29037aa-0dca-f95a-1932-bf6c8ba9206a other-config:auto_poweron=true
(2) View the setting information
[root@xenserver-243 ~]#  xe pool-param-get uuid=e29037aa-0dca-f95a-1932-bf6c8ba9206a param-name=other-config param-key=auto_poweron
true

2. Set XenServer to specify vm to start automatically when booted

(1) Set the boot to start
[root@xenserver-243 ~]# xe vm-param-set uuid=1ceecc89-125c-4ca4-50fd-b613767f8a8e other-config:auto_poweron=true
(2) View the setting information
[root@xenserver-243 ~]# xe vm-param-get uuid=1ceecc89-125c-4ca4-50fd-b613767f8a8e param-name=other-config param-key=auto_poweron
true

3. Set XenServer to start automatically when all vms are turned on

(1) Set the boot to start

[root@xenserver-243 ~]# 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
(2) View the setting information
[root@xenserver-243 ~]# for i in `xe vm-list params=uuid --minimal|sed 's/,/ /g'`;do xe vm-param-get uuid=$i param-name=other-config param-key=auto_poweron;done
Error: Key auto_poweron not found in map // display correctly
true
true

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325134205&siteId=291194637