Changes

Jump to: navigation, search

Migrating Xen domainU Guests Between Host Systems

1,875 bytes added, 19:10, 11 June 2008
Preparing the Xen Migration Environment
<pre>
exportfs -a
</pre>
 
With the exports configured, /xen can be mounted on the target system as follows:
 
<pre>
mkdir /xen
mount 192.168.2.20:/xen /xen
</pre>
 
== Running the DomainU Guest ==
 
Before attempting to perform a live migration of the Xen guest it is worth first checking that the guest will run successfully on both the source and target hosts. This will verify, for example, that both systems are configured with enough memory to execute the guest. Beginning on the source host change directory to /xen and run the guest domain as follows:
 
<pre>
cd /xen
xm create XenGuest1.cfg -c
</pre>
 
Assuming the guest boots successfully execute the appropriate shutdown command and wait for the guest to exit. Once you are certain the guest has exited repeat the above steps on the target system. If any problem occur on witehr system rectify the issues before attempting the migration. Be sure to shutdown the guest on the target system before proceeding.
 
== Performing the Migration ==
 
The first step in performing the migration is to start up the guest on the source host:
 
<pre>
xm create XenGuest1.cfg -c
</pre>
 
Once the system has booted exit from the console by pressing Ctrl+]. We can now view the list of guests running on the host:
 
<pre>
# xm list
Name ID Mem(MiB) VCPUs State Time(s)
Domain-0 0 864 2 r----- 3995.3
centos.5-1 1 127 1 -b---- 82.6
</pre>
 
As shown above our guest domain has been assigned an ID of 1. To perform the live migration we need to use the ''xm'' command, the syntax for which is as follows:
 
xm migrate ''domain id'' ''target host'' -l
 
In order to migrate our guest (domain ID 1) to our target host (IP address 192.168.2.21) we therefore need to execute the following command:
 
<pre>
xm migrate 1 192.168.2.32 -l
</pre>
1,798
edits

Navigation menu