Migrating Xen VM to CitrixXen
by Gregor PipanOur solution was this way for each OSS VM:
* create new VM, boot it and assign a temporary IP
* install rsync on the old and the new VM
* enable SSH root login on the old VM
* run the following rsync command the first time:
rsync -av –numeric-ids –delete –progress –exclude /sys –exclude /boot –exclude /dev –exclude /proc –exclude /etc/mtab –exclude /etc/fstab –exclude /etc/udev/rules.d –exclude /lib/modules root@my-old-vm:/ /
* this copies most files from the old VM, but excludes the running kernel, special filesystems, fstab etc.
* downtime begins: switch the old VM to runlevel 1, disable remote logins, startup the sshd again
* do a final rsync with the command from above
* shutdown the old VM
* downtime ends: reboot the new VM
* install the linux XenTools on the new VM
* cleanup old kernels from the package manager
This way we migrate several VM’s with short downtimes, aslong there are not to many inodes (files) in use. One VM had more than 2 million inodes on a 20 GB partition in use (maildir) – using rsync would take several hours just for creating the file list.
Leave a Reply