WARNING - OLD ARCHIVES

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/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-users

Re: [Xen-users] migrating to xen (newbie question)

To: xen-users@xxxxxxxxxxxxxxxxxxx
Subject: Re: [Xen-users] migrating to xen (newbie question)
From: Simon Hobson <linux@xxxxxxxxxxxxxxxx>
Date: Fri, 30 Apr 2010 07:52:20 +0100
Delivery-date: Thu, 29 Apr 2010 23:54:24 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <4BD96853.8050403@xxxxxxxxxxxxxxxx>
List-help: <mailto:xen-users-request@lists.xensource.com?subject=help>
List-id: Xen user discussion <xen-users.lists.xensource.com>
List-post: <mailto:xen-users@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=unsubscribe>
References: <4BD96853.8050403@xxxxxxxxxxxxxxxx>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
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

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