8

I've recently set up a Hyper-V virtual machine that runs Windows 10 Pro 64 Bit, the host OS is also running Windows 10 Pro 64 bit

I want the VM to be able to play games, I tried to play a game but it's painfully slow, and the textures failed to load

after researching the issue, I think what I need to do is enable GPU acceleration, my GPU is AMD Radeon RX 570 4 GBs

I can't use RemoteFX 3D Adapter because apparently Microsoft doesn't support it anymore, and since this is a newer VM I can't add it, and I can't find "Physical GPUs" option in Hyper-V settings, so what do I do to enable GPU Acceleration?

Edit: I also don't want the VM to have exclusive access to the GPU, I want both host OS and VM to be able to use it

InfinityVive
  • 81
  • 1
  • 1
  • 4

3 Answers3

2

By far this video is the best walkthrough of how to do exactly what you are looking to do.

https://www.youtube.com/watch?v=XLLcc29EZ_8

It basically use the following script as the meat of the process...

$vm = "MyVMsName"

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

Put all the above in a ps1 (powershell) script file and run it as admin then your VM will be sharing the GPU with the host system.

Arvo Bowen
  • 486
  • 3
  • 9
  • 26
  • I followed this. I can see my 4080 in Device Manager. There's no code 43, it appears to be working. However the VM isn't using the device. I have no acceleration (GPU-Z shows me, and no GPU in task manager on the VM). This is Hyper-V on Windows 11. – Robinson Aug 10 '23 at 12:57
  • Make sure the drivers are EXACTLY the same on the host system and the guest system. Make sure you have them all in the correct folder structure as well (this is VERY important). If you have done this correctly, your device manager will show you an actual GPU rather than a generic GPU. – Arvo Bowen Aug 15 '23 at 21:42
  • I am unable to install NVidia drivers into the guest system. The installer refuses saying there's no compatible hardware. The GPU shows up in the Device Manager with code 43. – LOST Aug 23 '23 at 17:25
  • You need to disable dynamic memory and copy drivers. – LOST Aug 23 '23 at 17:51
  • Ahh yeah I always set my memory manually and stay away from dynamic memory. I can see why that would not have happened to me. Thanks for the additional info for others! – Arvo Bowen Aug 24 '23 at 13:39
0

Using Powershell:

  1. start PowerShell as Administrator

  2. run command: Get-VMRemoteFXPhysicalVideoAdapter

  3. Enabled attribute set to False

note the name of the graphic card

  1. run command: Enable-VMRemoteFXPhysicalVideoAdapter -Name “<graphic card name>”

Now try again and your virtual machine with RemoteFX adapter should be starting ok.

If you want to add new RemoteFX adapter, check out powershell command Add-VMRemoteFx3dVideoAdapter.

You can read more here

Ramhound
  • 41,734
  • 35
  • 103
  • 130
oMG
  • 145
  • 6
-1

There is no way to do exactly what you are asking for. The closest you will get is to pass the GPU as a PCI passtgrough device and give the VM exclusive access to it.

Gordan Bobić
  • 3,330
  • 1
  • 18
  • 23