Mindtwist.de

...let your mind twist!

How to use Xen virtual disks with RHEL6

RHEL6 does not come with Xen support as dom0. As domU however, you may still use RHEL6 and binary compatible distributions. Recently I've had some issues with partitioned xvda1 devices where one partition should be used as physical volume. The following dracut hook helped me to boot the system and to get rid of the dracut emergency shell.

 

# mkdir -p /root/initrd-hooks

# cat /root/initrd-hooks/15-xvda.sh
#!/bin/sh
# create device nodes for partitions on xvda devices
for dev in /dev/xvda*
do
    kpartx -a -v $dev
done
# scan for physical volumes on xvda devices
lvm pvscan /dev/mapper/xvd*
# activate all lvm volumes
lvm vgchange -aly

# chmod +x /root/initrd-hooks/15-xvda.sh

# dracut --force -v --include /root/initrd-hooks /initqueue-finished /boot/initramfs-2.6.32-71.29.1.el6.x86_64.img
The hook will be placed right before the root device search completes.
 

Linux Magazine

Linux Magazine News
  • Rocks Releases Mamba

    The latest version of Rocks cluster distribution – an open source toolkit for real and virtual clusters – has been released.

  • PowerTOP Releases v2.0

    PowerTOP releases v2.0 of its Linux tool, with improved diagnostics and user interface.