KVM
KVM (Kernel-based Virtual Machine) is a hypervisor built into the Linux kernel.
- Install
libvirt
Packagesyay -S qemu libvirt edk2-ovmf virt-manager nfs-utils virtio-win # optional dependencies iptables-nft dnsmasq # for default NAT/DHCP networking bridge-utils # for bridged networking openbsd-netcat # for remote management over SSH
- Add user to
libvirt
groupssudo usermod -aG libvirt,kvm,input $USER
- Start
libvirtd
daemonsudo systemctl enable --now libvirtd
- Create network bridge with
nmcli
nmcli connection add type bridge ifname br0 con-name "Netzwerkbrücke" stp no nmcli connection add type bridge-slave ifname enp39s0 con-name "Ethernet" master br0 nmcli connection down "Kabelgebundene Verbindung 1" nmcli connection up "Netzwerkbrücke"
- Define bridge network XML file, e.g. as
br0.xml
<network> <name>br0</name> <forward mode='bridge'/> <bridge name='br0'/> </network>
- Add bridge network to
virt-manager
virsh -c qemu:///system net-define br0.xml virsh -c qemu:///system net-autostart br0
- Disable COW on Btrfs (optional, recommended)
sudo chattr +C /var/lib/libvirt/images