Skip to content

Windows VM running on Qemu/KVM with VirtIO drivers, cpu pinning, GVTg passthrought and hypervisor hydden from the guest

Notifications You must be signed in to change notification settings

FriedDede/KVM_GVTg_VM

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WIN10 Virtual Machine in QEMU/KVM with Gvtg vGPU

GVT-g_virt-manager Screenshot from 2021-04-21 20-48-07

Windows VM running on Qemu/KVM with cpu pinning, GVTg passthrought and hypervisor hydden from the guest.

Host setup

Assuming the host has never been set up for running a VM in qemu/kvm.

  1. sudo apt-get install qemu qemu-system-x86 qemu-kvm qemu-utils virt-manager libvirt-daemon-driver-qemu

  2. Kernel modules

    Add:

    • kvmgt
    • vfio-iommu-type1
    • vfio-mdev

    to:

    • /etc/modules

    Rebuild initramfs:

    • sudo update-initramfs -u
  3. Boot parameters

    Modify GRUB_CMDLINE_LINUX line in:

    • /etc/default/grub

    To match the one in "grub"

    update the bootloader:

    • sudo update-grub
  4. Libvirtd permissions

    add kvm and libvirtd-qemu to the root group:

    • usermod -a -G root kvm
    • usermod -a -G root libvirtd-qemu
  5. Gvtg hook

    copy the content of "qemu" in:

    • /etc/libvirtd/hooks/qemu

    make the hook executable:

    • sudo chmod +X /etc/libvirtd/hooks/qemu
  6. Create a virtual disk

    (40GB example):

    • qemu-img create -f qcow2 name.qcow2 40G
  7. Define VM

  • Create a .xml file and copy the content from "win10-virt.xml", or directly download the file instead
  • Open the xml file replace PATHTOHDD with the path to your virtual disk
  • Define VM:
    • sudo virsh define win10-virt.xml
  • Now the VM should be visible in Virt-manager
  1. For further performance optimization:

Guest setup

  1. First Boot, Windows install:

About

Windows VM running on Qemu/KVM with VirtIO drivers, cpu pinning, GVTg passthrought and hypervisor hydden from the guest

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages