Skip to content

peterge1998/vfio-setup-libvirt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 

Repository files navigation

vfio-setup-libvirt-xml

/etc/default/grub
GRUB_CMDLINE_LINUX_DEFAULT="amd_iommu=on iommu=pt ..."

(Check with dmesg | grep -i -e DMAR -e IOMMU after reboot)

/boot/loader/entries/arch.conf
options ... amd_iommu=on iommu=pt
/etc/modprobe.d/vfio.conf
options vfio-pci ids=10de:1b80,10de:10f0
/etc/mkinitcpio.conf
MODULES=(vfio_pci vfio vfio_iommu_type1 vfio_virqfd)
mkinitcpio -p linux
reboot

(Check with dmesg | grep -i vfio after reboot)

sudo pacman -S qemu libvirt ovmf virt-manager dnsmasq sudo systemctl enable libvirtd sudo systemctl start libvirtd Virtual Machine Manage starten, File -> Add Connection Qemu/KVM

wget https://raw.githubusercontent.com/peterge1998/vfio-setup-libvirt/master/etc/libvirt/qemu/win11.xml
sudo virsh define ./win11.xml
sudo vim /etc/modprobe.d/kvm.conf
options kvm ignore_msrs=1

Error reading input/Permission Denied:

Source

Edit /etc/libvirt/qemu.conf:

user = "$USERNAME"
group = "kvm"

Replace with your path:

cgroup_device_acl = [
    "/dev/kvm",
    "/dev/input/by-id/KEYBOARD_NAME",
    "/dev/input/by-id/MOUSE_NAME",
    "/dev/input/by-id/usb-Logitech_Gaming_Mouse_G502_0E8736563037-event-mouse",
    "/dev/input/by-id/usb-HyperX_Alloy_Elite_RGB_HyperX_Alloy_Elite_RGB-if01-event-kbd",
    "/dev/null", "/dev/full", "/dev/zero",
    "/dev/random", "/dev/urandom",
    "/dev/ptmx", "/dev/kvm", "/dev/kqemu",
    "/dev/rtc","/dev/hpet", "/dev/sev"
]

usermod -a -G input $USERNAME

systemctl restart libvirtd

VM not booting, just displaying booloader info

Source

echo 1 > /sys/module/kvm/parameters/ignore_msrs

To make it permanently you can create a modprobe file kvm.conf:

options kvm ignore_msrs=1

About

VFIO Windows 10 Setup

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published