make sure libvirtd starts when needed

This commit is contained in:
lukas 2021-11-28 18:17:05 +01:00
parent 7277fe262c
commit 3dbf80bcd3
5 changed files with 22 additions and 13 deletions

View File

@ -14,5 +14,4 @@ spice-vdagent # "Agent for Spice guests" The spice agent is unnecessary for a ba
%end # End of the packages section
services --enabled=NetworkManager,qemu-guest-agent,spice-vdagentd,libvirtd --disabled=sshd # enable services for guest agents

View File

@ -7,6 +7,8 @@
# What ? This kickstart file configures an hypervisor for AMD (tm) CPUs
services --enabled="NetworkManager,libvirtd"
%post --nochroot --log=/mnt/sysimage/root/bha.log # Beginning of %post section. Those commands are executed outside the chroot environment. Logging is enabled to help with post-installation troubleshooting
sed -i 's/\(quiet\)/\1 amd_iommu=on amd_iommu=pt rd.driver.pre=vfio-pci/i' /mnt/sysimage/etc/default/grub # Load kernel modules in GRUB.

View File

@ -7,6 +7,8 @@
# What ? This kickstart file configures an hypervisor for Intel(tm) CPUs and Intel(tm) graphic cards
services --enabled="NetworkManager,libvirtd"
%post --nochroot --log=/mnt/sysimage/root/bhi.log # Beginning of %post section. Those commands are executed outside the chroot environment. Logging is enabled to help with post-installtion troubleshooting
sed -i 's/\(quiet\)/\1 intel_iommu=on iommu=pt rd.driver.pre=vfio-pci i915.enable_gvt=1/i' /mnt/sysimage/etc/default/grub # Load kernel modules in grub.

View File

@ -25,7 +25,7 @@ timezone Europe/Paris --utc
# SELinux configuration
selinux --enforcing
# System services
services --disabled="sshd" --enabled="NetworkManager,qemu-guest-agent,spice-vdagentd"
services --disabled="sshd" --enabled="NetworkManager"
# System bootloader configuration
bootloader --location=mbr --timeout=1
# Clear the Master Boot Record
@ -45,7 +45,7 @@ grub2-mkconfig -o /boot/grub2/grub.cfg # Unsure it is actually useful
%end
%post --nochroot --logfile=/mnt/sysimage/root/d.log
%post --nochroot --logfile=/mnt/sysimage/opt/base-initial-setup-gnome.log
truncate -s 0 /mnt/sysimage/usr/share/gnome-initial-setup/vendor.conf # remove content of vendor.conf so that all options are made available
@ -72,6 +72,7 @@ generic-release-notes
gnome-initial-setup
gnome-shell
gnome-terminal
mesa-dri-drivers
nano
neofetch
pciutils

View File

@ -25,7 +25,7 @@ timezone Europe/Paris --utc
# SELinux configuration
selinux --enforcing
# System services
services --disabled="sshd" --enabled="NetworkManager,qemu-guest-agent,spice-vdagentd,libvirtd"
services --disabled="sshd" --enabled="NetworkManager,libvirtd"
# System bootloader configuration
bootloader --location=mbr --timeout=1
# Clear the Master Boot Record
@ -45,6 +45,18 @@ grub2-mkconfig -o /boot/grub2/grub.cfg # Unsure it is actually useful
%end
%post --nochroot --logfile=/mnt/sysimage/opt/base-desktop-gnome-virtual-machine-manager.log
# Create a file to autostart virt-manager
cat > /mnt/sysimage/etc/xdg/autostart/virt-manager.desktop << EOF
[Desktop Entry]
Type=Application
Name=Virtual Machine Manager
Exec=virt-manager
EOF
%end
%post --nochroot --logfile=/mnt/sysimage/root/bh.log
# %post --log=/root/bh.log # Beginning of %post section. Those commands are executed outside the chroot environment. Logging is enabled to help with post-installation troubleshooting
@ -89,18 +101,10 @@ chmod +x /mnt/sysimage/usr/sbin/virtualization-tweaks-root-needed.sh
%end
%post --nochroot --logfile=/mnt/sysimage/root/dh.log
%post --nochroot --logfile=/mnt/sysimage/opt/base-initial-setup-gnome.log
truncate -s 0 /mnt/sysimage/usr/share/gnome-initial-setup/vendor.conf # remove content of vendor.conf so that all options are made available
# Create a file to autostart virt-manager
cat > /mnt/sysimage/etc/xdg/autostart/virt-manager.desktop << EOF
[Desktop Entry]
Type=Application
Name=Virtual Machine Manager
Exec=virt-manager
EOF
## Append lines to existing vendor.conf file, so that options are skipped upon reboot
cat >> /mnt/sysimage/usr/share/gnome-initial-setup/vendor.conf<< EOF
[pages]
@ -129,6 +133,7 @@ libguestfs-tools
libvirt
libvirt-daemon-config-network
libvirt-daemon-kvm
mesa-dri-drivers
nano
neofetch
pciutils