Skip to content

Instantly share code, notes, and snippets.

@Ethorbit
Ethorbit / gpupv-acceleration-tut.md
Last active February 5, 2025 16:23
Hyper-V tutorial to partition GPU for virtualization + achieve full GPU acceleration with it and daily drive it.
@OlfillasOdikno
OlfillasOdikno / Linux_GPU_PV.md
Last active April 17, 2025 04:56
Hyperv Linux Guest GPU PV

Hyperv Linux Guest GPU PV

  • Create VM
$isopath = <iso location>
$vhdpath = <vhdx location>
$vmpath = <vm path>
$vmname = "Arch-dxgkrnl"
New-VM -Name $vmname -MemoryStartupBytes 8GB -BootDevice VHD -NewVHDPath $vhdpath -Path $vmpath -NewVHDSizeBytes 20GB -Generation 2 -Switch "Default Switch"
@krzys-h
krzys-h / Hyper-V GPU-PV with Linux guest.md
Last active June 1, 2025 12:49
Ubuntu 21.04 VM with GPU acceleration under Hyper-V...?

Ubuntu 21.04 VM with GPU acceleration under Hyper-V...?

Modern versions of Windows support GPU paravirtualization in Hyper-V with normal consumer graphics cards. This is used e.g. for graphics acceleration in Windows Sandbox, as well as WSLg. In some cases, it may be useful to create a normal VM with GPU acceleration using this feature, but this is not officially supported. People already figured out how to do it with Windows guests though, so why not do the same with Linux? It should be easy given that WSLg is open source and reasonably well documented, right?

Well... not quite. I managed to get it to run... but not well.

How to do it?

  1. Verify driver support