mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-22 07:03:38 +00:00
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.
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user