Promoting a XenServer host to pool master

There are a couple of problems that can be found when attempting to promote a XenServer host to pool master.

  • If you are on host1 attempting to designate host2 through the xsconsole,   you are prompted to select from all of the other hostnames in the pool,  however xsconsole appears to use the hostname only and if your server is not configured to be able to refer to the other host by the hostname xsconsole will show an error,  can not connect to host.
    This could be resolved by making /etc/hosts entries for each host,  but that is overkill when you need to make a quick poolmaster change
  • The next idea is to by convention,  only designate a host to pool master FROM that host,  and make sure that each host can refer to itself using it hostname.
    Not too much problem here,  that seems pretty reasonable to have the current hostname in the /etc/hosts file,  however the default XenServer install does not do this.


So the best way i find is to have a convention to only promot a pool master FROM that host,  using the command line method,  using the UUID.

# xe pool-designate-new-master host-uuid=`grep -B1 -f /etc/hostname <(xe host-list)|head -n1|awk ‘{print $NF}’`

A couple of problems can still prevent new pool master from being designated.

  • All hosts in the pool are not available.  For example,  One of the hosts in the pool was down,  and I received an error because host5 was not available. I solved this using XenCenter to destroy the other hosts,  that seemed like it was not a good idea since I wanted them to come up at sometime in the future and rejoin the pool,  but I guess that has to be done manually.
    • You attempted an operation which involves a host which could not be contacted.
      host: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx (HOST5)
  • Another problem that I have not encountered yet but is still possible, is an issue where you are unable to designate a new master while you have servers down which the pool thinks may still be running. (sounds like some sort of split brain ‘protection’ or something)