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.
- Jussi Hirvi
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.
I did so but it can be a bit tricky. You need to make sure you have the needed kernel installed and also configured disk modules and mount points and such. Then you can use tar or rsync to migrate the whole system.
Maybe you can install one guest just for test and see how exactly it must be configured. Then you configure the live systems the same way.
I can't tell you exactly because it's long time ago - and it's not really easy :)
Simon
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
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.
Make sure here to copy with preserving hardlinks, use tar or rsync -aH for this. And, you can exclude some content like /dev/* (but not the directory /dev itself!).
- create a configuration file for the new domU, make it use pygrub
bootloader, and make it use xvd* disks/devices.
Also, you may have to adjust network config.
- done.
And, if something goes wrong, you can simply loop mount the filesystem on the Xen host and fix things, maybe chrooting before depending on what you do.
Simon
On Fri, Mar 4, 2011 at 4:57 AM, Simon Matter simon.matter@invoca.ch wrote:
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.
Make sure here to copy with preserving hardlinks, use tar or rsync -aH for this. And, you can exclude some content like /dev/* (but not the directory /dev itself!).
Use "star". This will preserve SELinux configurations, which neither tar nor rsync do.
On Fri, Mar 4, 2011 at 4:57 AM, Simon Matter simon.matter@invoca.ch wrote:
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.
Make sure here to copy with preserving hardlinks, use tar or rsync -aH for this. And, you can exclude some content like /dev/* (but not the directory /dev itself!).
Use "star". This will preserve SELinux configurations, which neither tar nor rsync do.
Ah, forgot about that, because I always disable SELinux - if I want it so secure I'd take OpenBSD :)
Simon
On Fri, Mar 4, 2011 at 4:57 AM, Simon Mattersimon.matter@invoca.ch wrote:
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?
I playes with VMware ages ago and it was the only solution at the time which could boot an existing installed drive. My home installation was in a drive caddy and I could stick it in the server in the office and boot it in VMware quite happily. Magic!
Make sure here to copy with preserving hardlinks, use tar or rsync -aH for this. And, you can exclude some content like /dev/* (but not the directory /dev itself!).
Use "star". This will preserve SELinux configurations, which neither tar nor rsync do.
The SELinux file contexts are stored in extended attributes, so you can use the --xattrs flag to rsync or tar to copy these across.
Kal
On 4.3.2011 11.42, Pasi Kärkkäinen wrote:
is pretty much like this:
- ssh into the standalone system.
Ok, thanks - that looks like a real how-to already. I will have to consider if I want to take the risk. With name server I would not bother, but with mail server maybe.
- Jussi
On 03/04/2011 02:31 AM, 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.
I think I would use KVM guests and not Xen guests ... but that is just me.
KVM does not require a special kernel and is the supported solution in future versions of upstream products.