Xen pool

HowTo: Changing the Xenserver Pool Master

Posted on Updated on

In some of the cases if the pool master failed to start, then the pool itself switch the pool master from the available servers in the pool. Here the scenario like if we need to change back the pool master we should follow few steps manually.

First make sure that HA is disabled, or disable it before continue.

Verify the availability of HA

[root@xenserver2 ~]# xe pool-list params=name-label,uuid,ha-enabled
uuid ( RO) : d838d2d9-3bee-3e82-70ca-1095118ec3d4
 name-label ( RW): InnovXen
 ha-enabled ( RO): true

Disable HA

[root@xenserver2 ~]# xe pool-ha-disable

One you did it successfully, you can move further to find out the UUID of the new Pool Master so it is help to do change on the specific server.

[root@xenserver2 ~]# xe host-list
uuid ( RO) : 0c54cb03-5673-419c-9675-4a93ad03cd3b
 name-label ( RW): xenserver2
 name-description ( RW): Default install of XenServer
uuid ( RO) : 128c1252-8f9e-4290-bfef-0975ccad041d
 name-label ( RW): InnovVirtual
 name-description ( RW): Default install of XenServer

Below command will help to change the poolmaster uuid-host=<UUID if the new server>

[root@xenserver2 ~]# xe pool-designate-new-master host-uuid=128c1252-8f9e-4290-bfef-0975ccad041d

Now enable HA

[root@xenserver2 ~]# xe pool-ha-enable

That’s it now you have changed the pool master, the below script will show you the current PoolMaster

[root@xenserver2 ~]# for i in $(xe pool-list --minimal | sed 's/\,/\n/g'); do iterMaster=$(xe pool-list uuid=$i --minimal params=master | xargs -i xe host-list uuid={} params=name-label --minimal); poolName=$(xe pool-list uuid=$i params=name-label --minimal);echo "Pool Name: $poolName"; echo "Pool Master: $iterMaster"; echo; done
Pool Name: InnovXen
Pool Master: InnovVirtual

 

 

Advertisements