To check whether pool master pool master has failed:
If you’ve tried to connect to the pool from the Xencenter console, and if it fails – then your pool master is down.
Verify this by connecting to the xenserver host using putty and issue a command like “xe host-list” to see if you get a response.
If you get an error message like ““Cannot perform operation as the host is running in emergency mode” – then your Pool master is almost certainly down.
Solution:
Step 1:
Try restarting the toolstack using this command
Service xapi restart
Step 2:
Try rebooting the Pool master to bring it online.
Step 3:
Now the member XenServer hosts will accept only the
pool-emergency commands, because the members try to reconnect for sixty
seconds and then each member puts itself into emergency mode. So we are
telling the pool members where the pool master is
xe pool-emergency-reset-master master-address=<new_master_hostname>
Note:
This command instructs a slave member XenServer host to reset its
master address to the new value and attempt to connect to it. This
command should not be run on master hosts.
And then force the failed pool master to reboot as a pool master using the following command.
xe pool-emergency-transition-to-master uuid=<host_uuid>
If the master comes back up at this point, it re-establishes
communication with its members, the members leave emergency mode, and
operation returns to normal.
However if the master is really dead, choose one of the remaining members and run the command on any member server:
xe pool-emergency-transition-to-master uuid=<host_uuid>
Note:
This command instructs a member XenServer host to become the pool
master. This command is only accepted by the XenServer host if it has
transitioned to emergency mode, meaning it is a member of a pool whose
master has disappeared from the network and could not be contacted for
some number of retries.
Note that this command may cause the password of the host to reset if it has been modified since joining the pool.
Once it has become the master, issue the below command and the members will now point to the new pool master:
xe pool-recover-slaves
Note:
This command instructs the pool master to try and reset the master address of all members currently running in emergency mode.
To recover VMs from Failed pool master:
1). First you have to figure out which server in the environment has failed. To do this, you’ll want to run the command,
xe host-list params=uuid,name-label,host-metrics-live
Any servers that come back with “host-metrics-live = false” have failed. Take note of the UUID of any failed servers
2) Then try to restart the service for the failed host by executing this command on the failed host using Putty
service xapi restart
3) Second, you must determine which VM’s were running on that failed server. You can do this by running the command,
xe vm-list is-control-domain=false resident-on=UUID_of_failed_host
4) Once you’ve determined which VM’s were running, you need to reset
their power state in order to get them to move onto another server. To
do this, run the command,
xe vm-reset-powerstate uuid=UUID_of_failed_vm –force –multiple
You should see the VM’s in question now show up as halted in
the Xencenter console. Restart each of the VM’s, and they should now
boot up onto surviving pool member servers.
Note:
To do this, the VMs should be in shared storage.