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

Re: [Libguestfs] Xen drivers for virt-builder images



Not quite as easy as I imagined.  However by using the attached patch
I have managed to add the two Xen drivers to the initramfs.  (I
haven't been able to test that it boots in Xen however)

I'm just building an updated Fedora 20 image which I'll upload later
today.

Are there other guests that need to be updated in the same way?
The RHEL 7 RC guest probably no longer works, since it looks like
we've got and deleted the binary packages from ftp.redhat.com.

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-top is 'top' for virtual machines.  Tiny program with many
powerful monitoring features, net stats, disk stats, logging, etc.
http://people.redhat.com/~rjones/virt-top
>From 15a77ef1f4d38b7ff75b6b78f0e92d9206a3cf88 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones redhat com>
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


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