>From 15a77ef1f4d38b7ff75b6b78f0e92d9206a3cf88 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 12 Jun 2014 13:49:43 +0100 Subject: [PATCH] builder: Fedora: Enable Xen driver support. See: https://www.redhat.com/archives/libguestfs/2014-June/thread.html#00045 Notes: (1) Edit dracut configuration to make sure the change is permanent, in case kickstart, virt-builder or something else installs a kernel or runs dracut. (2) We need to run dracut on the just-installed kernel, not on the running kernel. The snippet to do this was copied from the Fedora cloud kickstart. Thanks: Olaf Hering, George Dunlap, Dario Faggioli. --- builder/website/fedora.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/builder/website/fedora.sh b/builder/website/fedora.sh index a9dcef6..8702f5d 100755 --- a/builder/website/fedora.sh +++ b/builder/website/fedora.sh @@ -60,6 +60,16 @@ poweroff %packages @core %end + +%post +# Enable Xen domU support: +pushd /etc/dracut.conf.d +echo 'add_drivers+="xen:vbd xen:vif"' > virt-builder-xen-drivers.conf +popd +# Rerun dracut for the installed kernel (not the running kernel): +KERNEL_VERSION=$(rpm -q kernel --qf '%{version}-%{release}.%{arch}\n') +dracut -f /boot/initramfs-$KERNEL_VERSION.img $KERNEL_VERSION +%end EOF # Clean up function. -- 1.9.0