source: trunk/server/doc/migrate @ 2498

Last change on this file since 2498 was 2066, checked in by achernya, 11 years ago
Merge branches/fc15-dev to trunk
File size: 1.6 KB
Line 
1Migrating a Scripts guest between Xen hosts
2-------------------------------------------
3
4Two main components:
5
6    1. Copying the disk image (we do this with dd/netcat/backend network)
7    2. Modifying Xen configuration
8
9First, get a copy of /etc/fstab; in particular, you care about the UUIDs
10of the swap and cache partitions.
11
12Next, shut off the relevant VM.  Make sure that you have space on the
13destination host, and that you have a volume ready to receive the data
14(check with 'lvs').  From now, we'll assume $MACHINE is the name of the
15VM you're migrating, $SRC is the source host, and $DST is the destination host.
16
17Setup dd listening on a port on the destination host.  Pick a random,
18hard to guess port number.
19
20    root@$DST:~# nc -l -p $RANDOMPORT | dd of=/dev/$DST/$MACHINE-root bs=16M
21
22Next, send the data over the *backend network*.  We have 172.21.*.* setup
23to be routed on our backend network, do NOT use the public IPs on 18.*.*.*.
24
25    root@$SRC:~# dd if=/dev/$SRC/$MACHINE-root bs=16M | nc 172.21.X.Y $RANDOMPORT
26
27where X and Y are the last two digits of the normal 18.181.X.Y IP address of $DST.
28
29Once you're done, ensure that the swap and cache partitions are ready on the
30destination (you don't, mercifully, have to dd those over)--make sure they're
31properly configured; especially make sure that they the right UUIDs (from
32the fstab you saved!)  Check 'install-fedora' if you need to be reminded
33what the incants are.
34
35Finally, edit /etc/xen/scripts and modify the host that is hosting the server.
36Spin it up on the host and make sure everything is in order, then nuke the
37old disk image (multiple copies of a Scripts server is a bad idea!)
Note: See TracBrowser for help on using the repository browser.