Pages

Sunday, February 19, 2012

Technotes: Recovering Virtual Machines From A Failed Pool Member #citrix

Technotes: Recovering Virtual Machines From A Failed Pool Member

Recovering Virtual Machines From A Failed Pool Member

Document ID: CTX132387 / Created On: Feb 17, 2012 / Updated On: Feb 17, 2012
Average Rating: not yet rated

Symptoms

In the event of a XenServer host power failure, any virtual machines running on that host might not be displayed in XenCenter.
Note
: This article applies only to virtual machines on shared storage.

Following is the screen shot of the pool prior to failure of xenserver2:

Following is the screen shot of the pool after the failure of xenserver2:

Note that the virtual machines that were running on xenserver2 are not shown in XenCenter.

Cause

This is the expected behavior without High Availability enabled. Without High Availability there is no way for XenServer to confirm that there has been a host failure and to recover the virtual machines from that host. The safest course of action at this point is to do nothing. If the problem host is just unresponsive rather than in a completely failed state, it is unsafe to restart the virtual machines on other hosts in the pool. This might cause data corruption.

Resolution

To recover from the preceding issue, complete the following procedure:

  1. Firstly, confirm if the host has actually failed and determine if it can be recovered. In the event of certain hardware failures there is no way to recover the host and it must be removed from the pool altogether.
  2. If the host is not recoverable, run the following command to obtain a list of virtual machines that are running on the XenServer, as observed by the XenServer:
    xe vm-list resident-on= is-control-domain=false params=uuid
  3. Run the following command to reset the power-state on any virtual machines whose UUIDs are displayed from the preceding command:
    xe vm-reset-powerstate uuid= --force

    As the power states are reset for the virtual machines, they are displayed at the bottom of the pool list in XenCenter

After all the Virtual machines are recovered, the failed host can be forgotten.

More Information

CTX119717 – XenServer High Availability

CTX130821 – How to Clean the Xapi Database after Running the host-forget Command

Disclaimer

The above mentioned sample code is provided to you AS IS with no representations, warranties or conditions of any kind. You may use, modify and distribute it at your own risk. CITRIX DISCLAIMS ALL WARRANTIES WHATSOEVER, EXPRESS, IMPLIED, WRITTEN, ORAL OR STATUTORY, INCLUDING WITHOUT LIMITATION WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NONINFRINGEMENT. Without limiting the generality of the foregoing, you acknowledge and agree that (a) the sample code may exhibit errors, design flaws or other problems, possibly resulting in loss of data or damage to property; (b) it may not be possible to make the sample code fully functional; and (c) Citrix may, without notice or liability to you, cease to make available the current version and/or any future versions of the sample code. In no event should the code be used to support of ultra-hazardous activities, including but not limited to life support or blasting activities. NEITHER CITRIX NOR ITS AFFILIATES OR AGENTS WILL BE LIABLE, UNDER BREACH OF CONTRACT OR ANY OTHER THEORY OF LIABILITY, FOR ANY DAMAGES WHATSOEVER ARISING FROM USE OF THE SAMPLE CODE, INCLUDING WITHOUT LIMITATION DIRECT, SPECIAL, INCIDENTAL, PUNITIVE, CONSEQUENTIAL OR OTHER DAMAGES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. Although the copyright in the code belongs to Citrix, any distribution of the code should include only your own standard copyright attribution, and not that of Citrix. You agree to indemnify and defend Citrix against any and all claims arising from your use, modification or distribution of the code.


No comments:

Post a Comment