Hello there!
This little guide aim to let you setup an Hyper-V Windows 10 VM with GPU Partioning to run FiveM.
No documentation is provided anywhere by Microsoft and an Hyper-V dev’s gist about that got taken down.
Do note that this guide is intended to be used with an Nvidia GPU, and haven’t been tested with an AMD GPU yet.
- Create a Hyper-V VM (no, for real?! :o) and name it
fivem
- Open a Powershell prompt as an admin
- Run this snippet while the VM being turned-off :
$vm = "fivem"
Add-VMGpuPartitionAdapter -VMName $vm
Set-VMGpuPartitionAdapter -VMName $vm -MinPartitionVRAM 80000000 -MaxPartitionVRAM 100000000 -OptimalPartitionVRAM 100000000 -MinPartitionEncode 80000000 -MaxPartitionEncode 100000000 -OptimalPartitionEncode 100000000 -MinPartitionDecode 80000000 -MaxPartitionDecode 100000000 -OptimalPartitionDecode 100000000 -MinPartitionCompute 80000000 -MaxPartitionCompute 100000000 -OptimalPartitionCompute 100000000
Set-VM -GuestControlledCacheTypes $true -VMName $vm
Set-VM -LowMemoryMappedIoSpace 1Gb -VMName $vm
Set-VM –HighMemoryMappedIoSpace 32GB –VMName $vm
- Then, on your host machine, browse to
C:\Windows\System32\DriverStore\FileRepository\
- Transfer the
nv_dispi.inf_amd64_<UNIQUEID>
folder toC:\Windows\System32\HostDriverStore\FileRepository\
on your VM (if folders doesn’t exist, create them.) - Then transfer the
C:\Windows\System32\nvapi64.dll
file from your host toC:\Windows\System32\
on your VM - Restart the VM
- Disable enhanced session and checkpoints in Hyper-V
- And voilà! You can now use FiveM with great FPS inside an Hyper-V VM !
Big thanks to @deterministic_bubble for his patience to figure this out.
HINT: You can expose a file share on your host PC to share the GTA V game install to the VM!