XenServer HA is a feature of citrix that provide high availability in our environment monitoring our xen servers. When we configure HA, we can specify wich virtual machines will be automatically restarted in other server if the host server where they’re running fails. To select another server correctly to restart a virtual machine in our pool the requirements are:

  • The XenServer must be able to communicate with the other XenServers in the pool.
  • Each Servers must be access to the HA heartbeat storage shared with all the pool servers.

If one of this conditions fails the server will fence, it means that server will power off to protect the rest of the pool of a possible data corruption. If HA is configured correctly the virtual machines running in the server fenced will be restarted in other host in the pool. So bearing in mind this feature, the minimum recommended numbers of hosts to enable HA are 3. Imagine a scenario with two hosts and HA enabled, if one of these hosts fails the other hosts will fence because there aren’t any peers to communicate and the host will enter in an emergency status mode, disabling the manage network interface and only we can access physically on the machine. We can check if our server is in an emergency status executing:

# xe host-is-in-emergency-mode

It’s important to have a redundance network and storage to avoid this problem. Enabling HA apart of provide restart the virtual machines in case of host failure, we can use the XenMotion feature. XenMotion live migration allows move running virtual machines from one host to another one without shutdown the machine and any downtime. The requirements to use XenMotion are a remote shared storage like an iSCSI device and the host processor must be of the same vendor, family and model and must expose identical feature flags. We can check this features with the next command:

[root@xenserver1 ~]# xe host-cpu-list params=uuid,number,vendor,modelname,stepping,flags
uuid ( RO) : 6e23195b-d232-5771-ec24-e03e4c061011
number ( RO): 1
vendor ( RO): GenuineIntel
modelname ( RO): Pentium(R) Dual-Core CPU E6600 @ 3.06GHz
stepping ( RO): 10
flags ( RO): fpu de tsc msr pae mce cx8 apic sep mtrr mca cmov pat clflush acpi mmx fxsr sse sse2 ss ht nx constant_tsc aperfmperf pni vmx est ssse3 hypervisor tpr_shadow vnmi flexpriority

In this scenario I’ll explain how to create a new pool, enable HA and testing the XenMotion feature:

Create the new Pool 

– Creating the new pool :
Pool > New Pool

– Select your servers that will form the pool.

Create remote storage repository 

1.- Right click in the pool created and click in the option create SR:

2.- In my case I’ll coinfigure software iSCSI.

3.- Enter a name for your storage repository.

4.- Enter the IP address for our target server and select the specified LUN for our storage repository:

5.- Create another storage repository for the used of HA (minimum size recommended 536 MB).

– Resume of the SR created:

Enabling HA 

1.- Click right in the pool and select the option High Availability:

2.- Select the storage repository for the HA:

3.- Configuring the restart of virtual machines in case of failure:

 Testing XenMotion live migration

XenServer HA & Live Migration
Tagged on:                 

One thought on “XenServer HA & Live Migration

  • January 24, 2015 at 19:46

    great it have High availability and live migration. is that provide distributed switch option and how to move xencenter to other machine incase of current OS corrupt or not working


Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.


Get every new post delivered to your Inbox

Join other followers: