This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
Home Products Support Community News


Re: [Xen-users] Convert CentOS system to Xen image?

Hello guys,

Just my 2 cents:

On Thu, 2008-04-03 at 11:30 +0300, Igor Chubin wrote:

> So, it's better, may be, to do not raw copying in your case, 
> but files copying.

James, I've had did a lot of migrations using one machine real into one
virtual (also called "p2v") "at hot" -- without shutdown the machine.

If you can turn off the physical machine, please, considere to use one
tool to automatize your migration, like this one:

Whatever, I know this ways to do this work "by hand":

1-) Cloning the device using dd+nc
2-) Coping all "/" using rsync

For this second way, I recommend this read:

And I can say one example of "rsync" with a lot of parameters:

rsync -vaH --numeric-ids --stats --progress --exclude "/mnt/*" \
--exclude "/proc/*" --exclude "/sys/*" --exclude "/tmp/*" \
--exclude "/var/tmp/*" --exclude "/var/run/*.pid" \
--exclude "/var/run/dbus/system_bus_socket"\
rsync:// /mnt/vmname/


But, in both wais, you can have boot problems with LiLo/Grub, and with
different devices (ex: /dev/ida/c0d0p1 -> /dev/hda1).

So, i think that the easier way to do this, its the follow:

- Install one new CentOS inside Xen, using Virt-Manager with sufficient
space to do the migration;
- Boot this one, test, and lean how to start and stop this virtual
- Backup this machine;
- Just "rsync" all "/" from the physical one for inside of "/" of
virtual one;
- Restore your backup from /etc/hosts, /etc/fstab, /etc/mtab/
ifcfg-eth-x, lilo.conf, menu.lst and be happy :-)

May the Force be with you!

Tiago Cruz
Linux User #282636

Xen-users mailing list

<Prev in Thread] Current Thread [Next in Thread>