2021-08-18 09:50:28 +00:00
|
|
|
# __ ____ ____ _____
|
|
|
|
# ____ / /_ __ __/ / /___ ____ ___ ___ / __ \/ ___/
|
|
|
|
# / __ \/ __ \/ / / / / / __ \/ __ `__ \/ _ \ / / / /\__ \
|
|
|
|
# / /_/ / / / / /_/ / / / /_/ / / / / / / __/ / /_/ /___/ /
|
|
|
|
# / .___/_/ /_/\__, /_/_/\____/_/ /_/ /_/\___/ \____//____/
|
|
|
|
# /_/ /____/
|
|
|
|
|
|
|
|
# What ? This kickstart file provides the base configuration for a hypervisor.
|
|
|
|
# 'b' for basic building block, 'h' for hypervisor', 'm' for minimal, 'd' for development only.
|
|
|
|
|
2021-08-19 17:38:42 +00:00
|
|
|
%packages --exclude-weakdeps # Beginning of the packages section. Do not include weak dependencies.
|
2021-08-18 09:50:28 +00:00
|
|
|
|
|
|
|
qemu-kvm
|
|
|
|
libvirt
|
|
|
|
libvirt-daemon-config-network
|
|
|
|
libvirt-daemon-kvm # Install minimal tools dedicated to virtualization.
|
|
|
|
virt-install
|
|
|
|
virt-top
|
|
|
|
libguestfs-tools
|
|
|
|
python3-libguestfs
|
|
|
|
guestfs-tools # Complementary tools useful for interacting with vith guest systems
|
|
|
|
|
2021-08-19 17:38:42 +00:00
|
|
|
%end # End of the packages section
|
2021-08-18 09:50:28 +00:00
|
|
|
|
2021-08-19 19:04:30 +00:00
|
|
|
%post --nochroot --log=/mnt/sysimage/root/bhmd-post.log # Beginning of %post section. Those commands are executed outside the chroot environment
|
2021-08-18 09:50:28 +00:00
|
|
|
|
|
|
|
mkdir /var/lib/libvirt/iso # Create a directory to store iso images
|
2021-08-18 13:01:51 +00:00
|
|
|
virsh pool-create-as --name iso --type dir --target /var/lib/libvirt/iso # Make libvirt aware of this new directory by creating a so-called 'pool'
|
2021-08-18 09:50:28 +00:00
|
|
|
|
2021-08-19 10:44:25 +00:00
|
|
|
# Add a network bridge. Still need to declare it to virt-manager
|
|
|
|
nmcli con add ifname br0 type bridge con-name br0
|
2021-08-18 09:50:28 +00:00
|
|
|
nmcli con add type bridge-slave ifname enp1s0 master br0
|
|
|
|
nmcli con up br0
|
|
|
|
|
|
|
|
%end # End of the %post section
|