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] imaging an existing system?

To: xen-users@xxxxxxxxxxxxxxxxxxx
Subject: Re: [Xen-users] imaging an existing system?
From: Miles Fidelman <mfidelman@xxxxxxxxxxxxxxxx>
Date: Mon, 16 Feb 2009 21:23:48 -0500
Delivery-date: Mon, 16 Feb 2009 18:25:06 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <E5AAD5FF-1F61-4200-B765-89E88A098539@xxxxxxxxxx>
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: <4999DF01.1000000@xxxxxxxxxxxxxxxx> <1234822530.28010.11.camel@ubu32> <E5AAD5FF-1F61-4200-B765-89E88A098539@xxxxxxxxxx>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv: Gecko/20081204 SeaMonkey/1.1.14

Whoa... that's cool. Unfortunately, I'm not sure my target machine is going to support the VT extensions. Why the requirement?



Brian Krusic wrote:

Well, a slightly less elegant solution but one I've done several times is to boot the machine you want to turn into a VM using this CD;


But the caveat is that you must first have a Xen dom0 on a machine supporting Intel VT or AMD V extensions. That machine must have SSH open as well.

Summary of what happens;

1 - Boot the p2v CD.
2 - Answer several self guided questions.
3 - An image of the entire disk is created over the net via SSH on your VT/V enabled dom0.

The down side is that the domU image file is the same size as the entire source disk. What I've done since is to create a new HVM domU where not all the image is allocated (a sparse file) and then kpartx/lomount/mount the original HVM and new HVM and then dump | restore from the original HVM to the new HVM.

This may seem a little Polish to some of you, but hey, I am 1/4 Polak :)

- Brian

On Feb 16, 2009, at 2:15 PM, Thomas Halinka wrote:

Hi Miles,

Am Montag, den 16.02.2009, 16:47 -0500 schrieb Miles Fidelman:

I have an old server, running Debian Sarge.  I'm getting ready to
migrate to a new machine - more horsepower, newer version of Debian, etc.

Good plan ;-)

As an interim step to migrating all of my production stuff, it sure
would be nice to generate a snapshot of the current system, turn it into
an image file, and get it running on the new box, as a VM.

Any suggestions as to procedures and tools for imaging an existing system?

First boot up your old-system into rescue-mode (use knoppix, grml,
whatever) to get a consitent system....

Steps in dom0:

create an empty image file on dom0

  dd if=/dev/zero of=/path/to/images/sarge-disk bs=1M count=5000

---> creates a 5GB-Disk

Format it

  mkfs.ext3 /path/to/images/sarge-disk

Mount it

  mount -o loop /path/to/images/sarge-disk /mnt

Copy your data into it

  rsync -avzH --numeric-ids -e ssh root@old-system:/* /mnt/

umount && create domu.cfg

  umount /mnt && cd /etc/xen && cp $extisting-domu.cfg sarge.cfg
  vim sarge.cfg

Thanks much,

Miles Fidelman



Xen-users mailing list

In theory, there is no difference between theory and practice.
In practice, there is.   .... Yogi Berra

Xen-users mailing list