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] Re: Raw Disk Image to domU

To: "Ricardo Tiago" <rtiago@xxxxxxxxx>
Subject: Re: [Xen-users] Re: Raw Disk Image to domU
From: "Todd Deshane" <deshantm@xxxxxxxxx>
Date: Sun, 25 May 2008 23:11:59 -0400
Cc: xen-users@xxxxxxxxxxxxxxxxxxx
Delivery-date: Sun, 25 May 2008 20:12:30 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=B2OInNfwDQEs4yGPI26u9Lroh9vJiDa+amAnolwh5dE=; b=trPSM799AjRUuLBoxZhhIbtdajORdhorCJtaUmOZTDrWh5P0E4/msZ/Cmn4VGYOObrVkdCN1N5hBNEtLPx9/mj/KhRR4EEIb0/k0yvY1GDfpalzJ/TZZ+Vk7vvHk+rSspZRLPTIi+Z7u8sl6lhSdQBe8b761N37bwSPdxUX8F5A=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=hIhQLSRK19Iu0+Qr4Pqs5PmbRQQiqyg6hNM7fJi1fwXIqiTHeWxykq6LP1gUIO7X4qFYaD30VQfSGz/iOEAylrAoizuOM8HC55eR1SwVx8NXIk+4pB1dqiS1KlCRjHmAKjnt1n0bm66kBX7XAC17azFYCrNyIySv3wzEW2tPgDc=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <8ed7d4b30805251702p7073133fh361b926683693495@xxxxxxxxxxxxxx>
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: <8ed7d4b30805251634md72f6dbl520b04ddffc9000@xxxxxxxxxxxxxx> <8ed7d4b30805251702p7073133fh361b926683693495@xxxxxxxxxxxxxx>
Reply-to: deshantm@xxxxxxxxx
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
Hi Ricardo,

On Sun, May 25, 2008 at 8:02 PM, Ricardo Tiago <rtiago@xxxxxxxxx> wrote:
> I have managed to start the domain but changing to cfg file, but it
> dies with a kernel panic

It seems to me that you should be able to use the dd image of the disk.

You are leaving out a key bit of information that would have made it
easier to answer the question. What is on the disk?

I will assume the answer is Linux and probably Fedora or the like.

The solution has to deal with the root= option on the kernel command
line. You may also need to adjust the /etc/fstab file in the image as
well.

You need to specify in the guest config the proper root= line.

You can get a good sense of this from the grub.conf file from the original
disk. However you may still need to modify the disk image itself to make
things work.

For this you should you losetup to associate the disk image with a
loopback device and then use kpartx -av to make the partions available.

You can then work with the mapped partitions in /dev/mapper just as
you would normal Linux partitions.

One other simple, but potentially non-ideal is to treat the guest as
an hvm guest and boot it as such, but that would have performance
degradation.

I also should mentioned that we covered the converting of a existing
partition to a domU in our book[1]. We also covered in a lot of detail
working with the disk and partition images, losetup, kpartx, dd, etc.

I learned a lot from the writing a book on xen experience and there
is a lot of fundamental knowledge to be gained from it.

I am unsure if I gave you enough information to solve your problem
completely. It will depend on the support in the fedora Xen kernel
for your desired domU (i.e if you need LVM support, etc.). It also
depends on how tricky it is to boot your existing system image.

Feel free to post the details of where you get stuck in the rest of
the process of converting the image the rest of the way to a domU.

Hope that gets you started in the right direction.

By the way, the pygrub trick in your first post didn't work probably since
you are booting a kernel in that disk image that is not Xen compatible. Either
that or pygrub wasn't able to properly read into the disk to get the grub info.

Cheers,
Todd

[1] http://runningxen.com

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

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