user --name=test --password=$6$wlB.n8fvumAXv3xn$clVIswjLUjb7MZoJ2JHi1zk1zmx5ViQuzbVkLYf70SDan5hdqI0tUkc89nHE8pVnHStO4mcl3c1Tk0WJvCet1. --iscrypted --gecos="test"
# WPA Supplicant for Linux. Not integrated by default in gnome-shell. Not useful for virtual machine
# dnf install -y wpa_supplicant
# Set the desktop environment as the default target with systemd. Uncomment for graphical system
# systemctl set-default graphical.target
# We also need to install a qemu and spice guest agents, respectively to allow a better support for spice and the ability for the host to better interact with the guest
dnf install spice-vdagent qemu-guest-agent -y
# Install virtualization-related utilites, including virt-manager. Only useful for desktop system
# dnf groupinstall -y Virtualization
# Install wallpapers in gnome. Only useful for Gnome
## make user "test" part of the existing libvirt group. It will allow this user to interact with the hypervisor. Will take effect after a logout
# usermod -a -G libvirt test
# load kernel modules in grub. Add `intel_iommu=on intel_iommu=pt` for intel processors, `amd_iommu=on` for amd processors. Add `i915.enable_guc=0` too.
# See here for explanation : # See here : https://wiki.archlinux.org/title/Intel_graphics#Enable_GuC_/_HuC_firmware_loading. Only useful for nested virtualization
# sed -i 's/\(quiet\)/\1 intel_iommu=on/i' /etc/default/grub
#
# sed -i 's/\(intel_iommu=on\)/\1 intel_iommu=pt/i' /etc/default/grub
# Load kernel modules by adding vfio, vfio_pci, vfio_iommu_type1, vfio_virqfd, kvmgt, vfio-mdev. Only useful for nested-virtualization