|
|
|
|
|
|
|
|
|
|
xen-users
Re: [Xen-users] migrating to xen (newbie question)
Miles Fidelman wrote:
I'm sure this has been asked before, but I can't seem to find an answer:
I have a production system running on a plain vanilla Debian
environment. I'd like to migrate everything into a DomU running on
top of Xen.
Is there a simple (or at least well defined) way to take a snapshot
of a system and turn it into an image that can be run virtualized?
It's something I've done myself several times. To run as a PV guest
(PV=Para Virtualised = guest is modified to co-operate with host)
then you need to be running a Xen PV guest capable kernel. Some
distros now ship with PV capable kernels as default, but older ones
don't.
If you can afford to modify the running system, then install a new
'-xen' kernel before you do anything.
Create the container(s) for your virtual disks on the host - my
preference is one LVM volume per guest volume. Create the
filesystems, and mount them on the host.
Copy all the files from your running system to the mounted filesystem
on the host - my preference is to use rsync (don't forget the
--numeric-ids option !) Doing it this way means you can run it once
with the system live, shutdown all the services (such as databases)
that need to close files, and run the copy again to get the handful
of files up to date.
You can now modify /etc/fstab, /etc/network/interfaces (or the
equivalent on your distro) before unmounting the filesystems from the
host and shutdown the original machine before starting the guest VM.
IFF you got all the above steps right, then the guest should start.
If you aren't able to modify the running system, then you can chroot
a session on the host and install the new kernel there before you
unmoun the guest filesystems. I've done that, got loads of warnings -
I assume due to the running kernel/environment not being the same as
the guest I'm modifying.
--
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
|
|
|
|
|