add latest modifications to the base hypervisor

This commit is contained in:
lukas 2021-07-22 16:24:37 +02:00
parent a09e6cb590
commit 0125a8dccd

View File

@ -5,18 +5,16 @@
# / .___/_/ /_/\__, /_/_/\____/_/ /_/ /_/\___/ \____//____/
# /_/ /____/
# WHAT ? This Kickstart file bootstraps a minimal desktop-oriented nested-host.
# What ? This kickstart file bootstraps a minimal desktop-oriented nested-hypervisor.
# 'v' for virtual machine, 'e' for efi, 'm' for minimal, 'd' for desktop, 'h' for hypervisor, 'd' for development only.
# USAGE : Press the `tab` or 'e' key during POST and apend that after the 'quiet' string :
# inst.ks=https://git.phyllo.me/home/kickstart/raw/branch/master/leafs/vemdhd.cfg
# A shorter URL can also be used :
# inst.ks=https://url.phyllo.me/vemdhd
# inst.ks=https://git.phyllo.me/home/kickstart/raw/branch/master/leaves/vhdmd.cfg
# ATTENTION : this kickstart file will automatically DESTROY the main virtual disk 'vda' and all of its contents.
# Bye bye!
%include https://git.phyllo.me/home/kickstart/raw/branch/master/leafs/vemdd.cfg # Includes vemdd.cfg, the minimal GNOME-based desktop-oriented virtual machine ks file.
%include https://git.phyllo.me/home/kickstart/raw/branch/master/leafs/vdmd.cfg # Includes vemdd.cfg, the minimal GNOME-based desktop-oriented virtual machine ks file.
%post # Beginning of %post section
@ -31,17 +29,19 @@ echo "vfio-pci" > /etc/modules-load.d/vfio-pci.conf
echo "vfio_iommu_type1" > /etc/modules-load.d/vfio_iommu_type1.conf
echo "vfio_virqfd" > /etc/modules-load.d/vfio_virqfd.conf
# Create a directory to store iso images and make the user "test" its owner
mkdir /var/lib/libvirt/iso
chown test:test /var/lib/libvirt/iso
dracut --add-drivers "vfio vfio-pci vfio_iommu_type1 vfio_virqfd" --force # Instruct dracut to load the vfio drivers:
# Create a directory to store rom files and make the user "test" its owner
mkdir /var/lib/libvirt/rom
chown test:test /var/lib/libvirt/rom
mkdir /var/lib/libvirt/iso # Create a directory to store iso images
chown test:test /var/lib/libvirt/iso # Make the user "test" the owner of this directory
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` within this directory
mkdir /var/lib/libvirt/rom # Create a directory to store rom files
chown test:test /var/lib/libvirt/rom # Make the user "test" its owner
virsh pool-create-as --name iso --type dir --target /var/lib/libvirt/rom # Make libvirt aware of this new directory by creating a so-called `pool` within this directory
chown test:test /var/lib/libvirt/images # Make the user "test" the owner of this directory
# Create a network bridge (doesn't work, perhaps because nmcli is not available at that time. No, it is because the new network must be defined within the libvirt context, with an XML file)
# nmcli con add ifname br0 type bridge con-name br0
# nmcli con add type bridge-slave ifname en0 master br0
# nmcli con up br0
nmcli con add ifname br0 type bridge con-name br0 # Add a network bridge
nmcli con add type bridge-slave ifname enp1s0 master br0
nmcli con up br0
%end # End of the %post section