Jump to: navigation, search

Difference between revisions of "XenServer/LiveMigration"

 
(Updates to the Live migration steps)
Line 3: Line 3:
  
 
Here are some docs relating to [[XenServer]] live migration.
 
Here are some docs relating to [[XenServer]] live migration.
 +
 +
== Types of Migration ==
 +
 +
There are two main cases for Live Migration:
 +
* VM on shared storage
 +
* VM not on shared storage
 +
 +
When the VM is on shared storage, you are able to use [[XenServer]]'s pool concept to perform the migration. However, the source and destination host must both be in that pool.
 +
 +
When not using shared storage, we have to move the VMs disk to the new server. A new feature of [[XenServer]] (called Storage [[XenMotion]]) will be able to help: http://wiki.xen.org/wiki/CrossPoolMigrationv3
 +
 +
== Live Migration with Block Migration ==
 +
 +
This requires [[XenServer]] 6.1 or later, or XCP 1.6 and later. Neither are released at the time of writing.
 +
 +
This feature has not yet been implemented: https://blueprints.launchpad.net/nova/+spec/xenapi-live-block-migration
 +
 +
== Live Migration using Host Aggregate ==
 +
 +
If you are using [[XenServer]] pools, configured using [http://nova.openstack.org/devref/aggregates.html?highlight=zone Host Aggregates], and you configure that pool to use shared storage as the default storage, you can migrate your VMs between the different hosts in that pool.
 +
 +
=== Setting up a [[XenServer]] pool using Host Aggregates ==
 +
 +
To setup a pool, you need at least two servers, and they must be compatible:
 +
http://docs.vmd.citrix.com/XenServer/6.0.0/1.0/en_gb/reference.html#pooling_homogeneity_requirements
 +
 +
Once you have [[OpenStack]] running on your servers (using [[XenServer/DevStack]] or otherwise), you need to pool them together.
 +
 +
==== Config Requirements ====
 +
 +
==== Creating the Aggregate ====
 +
 +
First create the aggregate using the nova cli:
 +
 +
<pre><nowiki>
 +
nova aggregate-create my_test_pool my_availability_zone
 +
</nowiki></pre>
 +
 +
 +
You can use aggregate-list to get the id, then tool to add your master (using the hostname of the nova compute on that hypervisor):
 +
 +
<pre><nowiki>
 +
nova aggregate-add-host <aggregate_id> my_master_host
 +
</nowiki></pre>
 +
 +
 +
Now you can use xe or [[XenCenter]] to add some shared storage, and make the the default pool storage repository:
 +
http://docs.vmd.citrix.com/XenServer/6.0.0/1.0/en_gb/reference.html#id1002701
 +
 +
Now you can add your further hosts to the pool (keeping in mind the requirements for pool compatibility noted above):
 +
 +
<pre><nowiki>
 +
nova aggregate-add-host <aggregate_id> my_slave_host_1
 +
nova aggregate-add-host <aggregate_id> my_slave_host_2
 +
</nowiki></pre>
 +
 +
 +
You should now see these servers shutdown your nova compute VM, join your pool, then start back up the nova compute VM.
 +
 +
NOTE: in some versions of [[XenServer]], you will now need to re-configure eth0 on your nova compute VM before the VM will boot. You should add the VIF another network. This should be fixed in future versions of [[XenServer]].
 +
 +
==== Creating the Aggregate ====

Revision as of 15:25, 22 June 2012

XenServer Live Migration

Here are some docs relating to XenServer live migration.

Types of Migration

There are two main cases for Live Migration:

  • VM on shared storage
  • VM not on shared storage

When the VM is on shared storage, you are able to use XenServer's pool concept to perform the migration. However, the source and destination host must both be in that pool.

When not using shared storage, we have to move the VMs disk to the new server. A new feature of XenServer (called Storage XenMotion) will be able to help: http://wiki.xen.org/wiki/CrossPoolMigrationv3

Live Migration with Block Migration

This requires XenServer 6.1 or later, or XCP 1.6 and later. Neither are released at the time of writing.

This feature has not yet been implemented: https://blueprints.launchpad.net/nova/+spec/xenapi-live-block-migration

Live Migration using Host Aggregate

If you are using XenServer pools, configured using Host Aggregates, and you configure that pool to use shared storage as the default storage, you can migrate your VMs between the different hosts in that pool.

= Setting up a XenServer pool using Host Aggregates

To setup a pool, you need at least two servers, and they must be compatible: http://docs.vmd.citrix.com/XenServer/6.0.0/1.0/en_gb/reference.html#pooling_homogeneity_requirements

Once you have OpenStack running on your servers (using XenServer/DevStack or otherwise), you need to pool them together.

Config Requirements

Creating the Aggregate

First create the aggregate using the nova cli:

nova aggregate-create my_test_pool my_availability_zone


You can use aggregate-list to get the id, then tool to add your master (using the hostname of the nova compute on that hypervisor):

nova aggregate-add-host <aggregate_id> my_master_host


Now you can use xe or XenCenter to add some shared storage, and make the the default pool storage repository: http://docs.vmd.citrix.com/XenServer/6.0.0/1.0/en_gb/reference.html#id1002701

Now you can add your further hosts to the pool (keeping in mind the requirements for pool compatibility noted above):

nova aggregate-add-host <aggregate_id> my_slave_host_1
nova aggregate-add-host <aggregate_id> my_slave_host_2


You should now see these servers shutdown your nova compute VM, join your pool, then start back up the nova compute VM.

NOTE: in some versions of XenServer, you will now need to re-configure eth0 on your nova compute VM before the VM will boot. You should add the VIF another network. This should be fixed in future versions of XenServer.

Creating the Aggregate