From 0fa52e4e45d80874bc5ea5f112f74be1d3f3472f 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 a9dcef6d3..8702f5dd6 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.