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] Creating a Xen image from HDD partition

To: <xen-users@xxxxxxxxxxxxxxxxxxx>, "Yoav Felberbaum" <mailinglists@xxxxxxxxxx>
Subject: Re: [Xen-users] Creating a Xen image from HDD partition
From: "Nico Kadel-Garcia" <nkadel@xxxxxxxxx>
Date: Fri, 23 Feb 2007 00:09:59 -0000
Delivery-date: Thu, 22 Feb 2007 16:09:19 -0800
Dkim-signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:from:to:references:subject:date:mime-version:content-type:content-transfer-encoding:x-priority:x-msmail-priority:x-mailer:x-mimeole; b=WeI+948zYMAGWkl63ESNkwoFi8tzEZ61Za6YmFLZj5/EYiUSbUoG01iDGbtItxN9dZZP2ubR0rPx7cmp/648YmBM0VAjRn0J99tyR5TcUcB5hi0jgATn2M0d3GuHwM3xAlRFLWF2hSvXvrp2+mMjMZfxPGGSli3FjMh2asQaQzw=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:from:to:references:subject:date:mime-version:content-type:content-transfer-encoding:x-priority:x-msmail-priority:x-mailer:x-mimeole; b=YE6O2wJx5WZM0HYg7W23BU2B9b+W6id1V0geX4jFLa5Z6AX4JRYnlTsPWGxE0UyXdeSZN5zUOdKFikJ5NLpn3N9xbev9Ob03lEqxkyOAK/moLvGJQZR9L023+bNyVkghc6bqLUGwEW7hLd5P6t+riFHylguqiZiASQP/vr2ZqXM=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
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/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=unsubscribe>
References: <9299F09F-8D36-4860-8E9F-11C3D87E7434@xxxxxxxxxx>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
Yoav Felberbaum wrote:
Hello,

I know that this is fairly straightforward & supposedly documented
elsewhere, but damned if I can find the info using Google.

I have a "stock" CentOS 4.4 installed on /dev/sda3 (with a RHEL
install on /dev/sda2). How should I create a xen-usable loop image
from the CentOS partition?

Would the following (paraphrased) command work from RHEL ...?

dd if=/dev/sda3 of=/path/to/file.img

This is the suckful way to do it. "dd" copies are inefficient, and rely on the new partitions or files being exactly the same size.

It's vastly faster and more efficient to use "dd" with skip commands to create a file that contains nothing you care about of the designated size, do a mkfs -t ext3 on that file, mount the file as a loop file system, mount the old partition, and do a "cp -a" or a "rsync" between the partitions. Then unmount them both and use the copy.

I understand that certain directories, like /boot, /proc & a couple
of others should NOT be in the image. Is there a full list?

TIA for any help you are able to provide!

They won't be if you're not duplicating a live OS, but only a mounted filesystem.

_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users

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