2021-08-18 09:52:14 +00:00
# __ ____ ____ _____
# ____ / /_ __ __/ / /___ ____ ___ ___ / __ \/ ___/
# / __ \/ __ \/ / / / / / __ \/ __ `__ \/ _ \ / / / /\__ \
# / /_/ / / / / /_/ / / / /_/ / / / / / / __/ / /_/ /___/ /
# / .___/_/ /_/\__, /_/_/\____/_/ /_/ /_/\___/ \____//____/
# /_/ /____/
2021-08-18 15:01:35 +00:00
# What ? This kickstart file bootstraps a desktop hypervisor.
2021-08-18 09:52:14 +00:00
# 'd' for desktop, 'h' for hypervisor, 'm' for minimal, 'd' for development only.
# ATTENTION : this kickstart file will automatically DESTROY the main disk and all of its contents.
# Bye bye!
2021-08-18 18:10:10 +00:00
# In order to be fed to virt-install or software like livecd-creator, this file needs to be flatten or merged into one.
# Here is how you can do it with the ksflatten tool provided by the pykickstart package on Fedora :
# ksflatten -c dhmd.cfg -o flat-dhmd.cfg
2021-08-18 13:01:51 +00:00
%include bmd.cfg # A minimal machine
%include bdmd.cfg # A desktop environment
%include bhmd.cfg # A base hypervisor
2021-08-18 09:52:14 +00:00
2021-08-19 18:31:20 +00:00
reboot --kexec # Reboot straight into the system after a successfull installation
2021-08-19 17:40:05 +00:00
%packages --exclude-weakdeps # Beginning of the packages section. Do not include weak dependencies.
2021-08-18 15:14:06 +00:00
virt-manager # Install virt-manager, the graphical front-end for QEMU/KVM
2021-08-19 17:40:05 +00:00
gnome-initial-setup # Add GNOME initial setup too to let user create local account.
2021-08-18 15:14:06 +00:00
2021-08-19 17:40:05 +00:00
%end # End of the packages section
2021-08-19 20:18:23 +00:00
%post --nochroot --log = /mnt/sysimage/root/dhmd.log # Beginning of %post section. Those commands are executed outside the chroot environment. Add logging.
2021-08-19 17:40:05 +00:00
2021-08-19 18:03:20 +00:00
# Create a file to autostart virt-manager
2021-08-19 19:04:11 +00:00
cat > /mnt/sysimage/etc/xdg/autostart/virt-manager.desktop << EOF
2021-08-19 17:40:05 +00:00
[Desktop Entry]
Type = Application
2021-08-20 08:26:44 +00:00
Name = Virtual Machine Manager
2021-08-19 17:40:05 +00:00
Exec = virt-manager
EOF
2021-08-19 19:04:11 +00:00
# Download netboot.xyz # cannot resolve hostname
# wget https://boot.netboot.xyz/ipxe/netboot.xyz.iso -P /var/lib/libvirt/iso/
2021-08-19 17:40:05 +00:00
%end # End of the %post section