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] Converting full virtualized Linux domUs to use paravirtu

To: Pekka.Panula@xxxxxxxx, Xen-users@xxxxxxxxxxxxxxxxxxx
Subject: Re: [Xen-users] Converting full virtualized Linux domUs to use paravirtualized drivers
From: "Daniel Asplund" <danielsaori@xxxxxxxxx>
Date: Wed, 13 Aug 2008 20:15:54 +0200
Cc:
Delivery-date: Wed, 13 Aug 2008 11:16:31 -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:to :subject:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=IRrn3i9zc3Ga67achc1aJx9AiBwJ5XaHM9Ey5D+HNA8=; b=kPF1eqTlrHvvPPpw/Zh/5s2WqbsFrbUX24V3So0w7zBrVmdIoW74mAQaWL/SY6yhnj +Fc7beF4AyOJImaS5IF26mRQ9WuWNBMRo4hu4o1FyUGUPVLSGPuNKfAKKHRhDwe8lKdU Y9CdZ0gEeWVSjKtG6EHM6exMxE/0FdBU9o4gs=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=ljfQfk5UUzoX7Yy3rjjnAxWJUWPB5Lzx5PXpSKRrFBdXIVkkgNWXhtLrXhcSOIGRd6 H1AmyWoDYa5LrDfmoHkiFFSTy1DaLU3SsdKq6P7KVf2fjOlESY79G3kZnWNZCP7PyBSy rt7bV6iIIQ1vT5GnISQR3QTF9dNgJa5fnAgAI=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <20080812122220.GJ3771@xxxxxxxxxxxxxxx>
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: <OFEFDA4BDF.80B13E4B-ONC22574A3.003D69CC-C22574A3.003D9CB3@xxxxxxxx> <20080812114702.GH3771@xxxxxxxxxxxxxxx> <OFBA45AD90.6B43027D-ONC22574A3.00431313-C22574A3.00436D4C@xxxxxxxx> <20080812122220.GJ3771@xxxxxxxxxxxxxxx>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
>> I am mainly wanting to convert HVM as para domU, is there any docs about
>> that?
>>
>
> Hmm.. basicly it should be something like:
>
> - in HVM guest: yum install kernel-xen
> - in HVM guest: make sure /boot/grub/menu.lst contains kernel-xen as a kernel 
> to boot
> - in dom0: update your guest/domU cfgfile, make sure you use pygrub to load 
> the kernel+initrd from domU.
>
> That should be it..
>
> -- Pasi
>

I have converted a HVM installation of Trixbox(based on CentOS) to a
PVM running on Ubuntu 8.04 Dom0.
I didn't use pygrub as that doesn't play with DRBD. So below is
another method. After doing the first two steps above you can follow
my installation notes below. Sorry if it is a bit messy, am about to
put it into a howto but haven't found the time yet...

CONVERT TRIXBOX HVM to PVM
apt-get install kpartx

losetup /dev/loop0 /dev/drbd6
kpartx -av /dev/loop0
mount /dev/mapper/loop0p2 /mnt/

Create an LVM for root and swap.
mkfs.ext3 and
rsync -a /dev/mapper/loop0p2 to new LVM

Edit /etc/fstab on the DomU disk to map /dev/xvda to root and /dev/xvdb to swap

Ran the following within the HVM to create new initrd which loads xen
drivers. otherwise kernel panic.:
mkinitrd /boot/initrd-2.6.18-92.1.6.el5xenU2.img 2.6.18-92.1.6.el5xen
--with=xenblk --with=xennet --preload=xenblk --preload=xennet

Copy kernel and initrd from HVM to Dom0.

Modified the xen config file with the kernel and initrd above.

Removed: xencons=tty1 from the "extra=" line. like this:
extra="clock=jiffies"
as needed in other configs.

Problem with network, DomU tried to start eth1 only.
Modified: /etc/sysconfig/network-scripts like this:

# Realtek Semiconductor Co., Ltd. RTL-8139/8139C/8139C+
DEVICE=eth0
ONBOOT=yes
BOOTPROTO=none
NETWORK=10.111.1.0
NETMASK=255.255.255.0
IPADDR=10.111.1.160
GATEWAY=10.111.1.254
MACADDR=00:16:3E:AA:35:32

/etc/init.d/network restart
---------
I actually had a problem using the original kernel. Performing a live
migration or even shutting down the DomU made it hang. It couldn't not
unload one or two block devices.
So I ended up using the Dom0 kernel instead. I copied the modules from
Dom0 to the DomU as usual.

To early to say if this is really stable, but at least it works. ;)

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

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