[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-users] Re: Raw Disk Image to domU


  • To: "Ricardo Tiago" <rtiago@xxxxxxxxx>
  • 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
  • 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=
  • List-id: Xen user discussion <xen-users.lists.xensource.com>

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.