|
|
|
|
|
|
|
|
|
|
xen-users
Re: [Xen-users] Replicating a live server on a domU
Alexandru Florescu wrote:
Has anybody ever stumbled upon the need to replicate a live and in
production server to a virtual machine?
I'm trying to virtualize a bunch of servers but I can't figure out
how can I mirror the file system. I do not want to start from
scratch with them.
The whole idea is to transfer them to the virtual side as they currently are.
Yes, I've done it several times - all Debian GNU/Linux systems of
various vintages.
If you are prepared to modify the system, then install a Xen-ified
kernel environment first - it makes things simpler. I just install a
-xen kernel and let that take care of things like modules etc, but I
dare say there are more efficient ways to do it if you aren't using
pygrub.
Create new device files/volumes/whatever on the Dom0, mount them on
Dom0 (eg you might have /mnt /mnt/var /mnt/home etc), and copy the
filesystem across. Personally I normally use Rsync for this - but
don't forget to use the "--numeric-ids" option to avoid ownerships
getting mangled.
Before you unmount the volumes, go in and change things like fstab
and network settings. Also, if you didn't do it earlier, chroot to
the mountpoint (/mnt in the above example) and install the Xen-ified
environment.
Unmount the volumes, setup the guest config file, boot guest (use -c
option to attqch to console) and see what's broken.
--
Simon Hobson
Visit http://www.magpiesnestpublishing.co.uk/ for books by acclaimed
author Gladys Hobson. Novels - poetry - short stories - ideal as
Christmas stocking fillers. Some available as e-books.
_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users
|
|
|
|
|