XenServer – autostart of VMs

In XenServer 6.x automatic start virtual machines has been removed because it caused problems with the functionality of HA (more information on the Citrix). Autostart functions can be restored by using the CLI.

The first step is to unlock the autostart on the server pool. First, we display a list of available server pool and memorize the UUID of server pool.

[root@mordor ~]# xe pool-list
                uuid ( RO): 03830f9f-1829-97f9-5a3b-26cca16e71d3
          name-label ( RW): Srv01
    name-description ( RW): Serwer DL120 G6
              master ( RO): a3fa9eea-21de-45f6-a89a-4e23b3010c68
          default-SR ( RW): d5175b5c-d042-aa49-ec90-1fcc6d2fc7a2

Second step is unlock functionality.

xe pool-param-set uuid =  other-config: auto_poweron = true

The next step is to identify virtual machines that will be starting automatically after restart hypervisor. We display a list of VMs:

[root@mordor ~]# xe vm-list
           uuid ( RO): 543b4358-d810-b566-eed6-664856be3df0
     name-label ( RW): baraddur
    power-state ( RO): running

           uuid ( RO): 2eff6db7-cf0d-24c2-8009-6c45c4435e0f
     name-label ( RW): sauron
    power-state ( RO): running


           uuid ( RO): 2e4a8a77-e75a-47e7-5eb6-1aa9b5cf6b54
     name-label ( RW): orodruin
    power-state ( RO): running

           uuid ( RO): 46b1ea32-aab0-48c7-ba6b-7b51c9f4abc5
     name-label ( RW): Control domain on host: mordor
    power-state ( RO): running

 Set the flag autostart on selected machines.

xe vm-param-set uuid= other-config:auto_poweron=true

Now, after rebooting the server hosting the virtual machines selected VM will start automatically.

Please note that the described functionality was disabled in software and is not officially supported by the manufacturer. Neither Citrix nor the more I shall have no liability for the use of this functionality, nor for any losses caused by describeb feature.

Leave a Reply