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

Re: [Xen-users] Converting full virtualized Linux domUs to use paravirtualized drivers


  • To: Pekka.Panula@xxxxxxxx, Xen-users@xxxxxxxxxxxxxxxxxxx
  • 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
  • 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=
  • List-id: Xen user discussion <xen-users.lists.xensource.com>

>> 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


 


Rackspace

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