Setting up the host
Make sure to turn off the virtual machine before proceeding.
- Get a list of partitionable GPUs (optional):
- Windows 10:
Get-VMPartitionableGpu
- Windows 11:
Get-VMHostPartitionableGpu
- Windows 10:
- Remove any existing partitioned GPU (optional):
Remove-VMGpuPartitionAdapter -VMName "VM name"
- Prepare VM:
$vm = "VM name"
Set-VM -GuestControlledCacheTypes $true -VMName $vm
Set-VM -LowMemoryMappedIoSpace 1Gb -VMName $vm
Set-VM -HighMemoryMappedIoSpace 32Gb -VMName $vm
Add-VMGpuPartitionAdapter -VMName $vm
- Add the GPU:
- Remove the
-InstancePath
argument for automatic GPU selection
- Remove the
Add-VMGpuPartitionAdapter -VMName $vm -InstancePath "Path from step 1"
Preparing the guest
- Create the following directory path inside the guest:
C:\Windows\System32\HostDriverStore\FileRepository
- Copy driver files from the host driver store at
C:\Windows\System32\DriverStore\FileRepository
- For AMD: Driver folder starts with
u0387352.inf
- For NVIDIA: Driver folder starts with
nvlt.inf
- For AMD: Driver folder starts with
- Reboot the guest machine and confirm that the GPU is enabled in device manager inside the guest.
- To go beyond the default 1080p resolution in guest, issue the following command:
Set-VMVideo -VMName $vm -HorizontalResolution 2560 -VerticalResolution 1600 -ResolutionType Maximum
Leave a Reply