How to Set Up Hyper-V Paravirtualization #
PROMPT: You want your Windows VM to make use of a GPU, however your Hyper-V host is Windows 11/10 Pro so you cannot use DDA (requires Server 2016) or straight GPU-P (requires Server 2025).
Resources: #
Internet Archive: James’ Personal Site
^^ If unaccessible,
here is a PDF.
Prerequisites: #
- You have already created your Windows 11/10 Pro WM on your Windows 11/10 Pro Host
Notes: #
- Could we have run the Easy-GPU-PV scripts? Potentially, however that is not really fun or interesting. If that is something that sounds more appealing, you can look at them here (or the enhanced version here).
Steps: #
- Run the following command on your host to determine the available GPUs:
Get-VMHostPartitionableGpu
- By default, Hyper-V will use the GPU listed first. If this is not the GPU you wish to paravirtualize, make note of the
Name
Property. This will be used for theInstancePath
parameter later.
- By default, Hyper-V will use the GPU listed first. If this is not the GPU you wish to paravirtualize, make note of the
- On the host, open Device Manager and look for the GPU under ‘Display Adapters’. Right click the (desired) GPU and then click properties. Go to the ‘Drivers’ tab, then click the ‘Driver Details’ button.
- In this Driver File Details window, scroll down until you find a file that has this pattern:
[filename.inf]_amd64_[random_hex_number]
For me the file was named: ‘u0390451.inf_amd64_39377efdd62734d1’ You will likely see multiple instances of this file under this window. - Now that we know the name of our driver, we need to open File Explorer and Navigate to ‘C:\Windows\System32\DriverFileStore\FileRepository’ and look for the folder that matches the name of the file listed in the driver details page.
- Copy this folder onto the VM. This can be accomplished in a variety of ways:
- If you have Guest Services enabled you can use PowerShell
- If you have Guest Services enabled you can use a console window to attach local resources
- If you have set up a network for this VM, you could make use of RDP
- If you have an ISO creator, you can turn the folder into an ISO and attach to VM via console.
- Regardless of the means, the folder should now at least be on the Desktop of the VM. Let’s go ahead and move the folder inside of the following directory: ‘C:\Windows\System32\HostDriverStore\FileRepository’ If one of those folders does not exist, please be sure to create them.
- After the folder is moved, shut down the machine.
- Back on the host, open up a PowerShell window with administrator privileges and run the following command:
Set-VM -VMName 'name-of-vm' -GuestControlledCacheTypes $true -LowMemoryMappedIoSpace 3072MB -HighMemoryMappedIoSpace 30720MB
This will make some adjustments to the MIMO address space on the guest (also required for DDA). - Lastly, run this command to enable paravirtualization:
Add-VMGPuPartitionAdapter -VMName 'name-of-vm'
- If you needed to specify a GPU that was not the first listed GPU back in step 1, then run this command instead:
Add-VMGpuPartitionAdapter -VMName 'name-of-vm' -InstancePath 'name-of-path'
- If you needed to specify a GPU that was not the first listed GPU back in step 1, then run this command instead:
- Boot the VM back up and if you check Display Manager, you should now see your host’s GPU listed inside the guest!