[CentOS] Migrating standalone systems to xen guests

Fri Mar 4 09:42:14 UTC 2011
Pasi Kärkkäinen <pasik at iki.fi>

On Fri, Mar 04, 2011 at 10:31:18AM +0200, Jussi Hirvi wrote:
> Is there any (easy?) way to migrate running standalone CentOS 4 or 5 
> systems to xen virtual stacks?
> 
> Rebuilding those systems from scratch on the xen machine would take 
> plenty of work.
> 

If you're talking about Xen PV domUs, then the process
is pretty much like this:

- ssh into the standalone system.
- make sure /etc/modprobe.conf includes xenblk driver (so that it'll be included in the generated initrd when you install kernel-xen).
- fix /etc/fstab to have xvd* (xen virtual disk) devices instead of sd*.
- install kernel-xen rpm.
- verify kernel-xen is the default in /boot/grub/grub.conf.
- verify root= parameter is correct in /boot/grub/grub.conf for kernel-xen.
- copy/transfer all the files from the standalone system to virtual disk/image.
- create a configuration file for the new domU, make it use pygrub bootloader, and make it use xvd* disks/devices.
- done.


-- Pasi