A
A
arekusei3222022-03-17 07:30:57
Virtualization
arekusei322, 2022-03-17 07:30:57

Why is Hyper-V GPU Partitioning not working (sharing video cards per host and guest VM)?

I have one AMD RX470 video card in a Mini-ITX SFF system (there will be no second video card, as well as a slot for it), the host system is Windows 10 Pro, with Hyper-V,
I need to make one VM with GPU acceleration.
I did everything for Hyper-V GPU-P, but that's bad luck, from under VM in Device Manager 43 error on the video card, everything is ok on the host.
Done:
GPU checked for split capability, here's what I got from Powershell:

PS C:\Windows\system32> Get-VMPartitionableGpu


Name                    : \\?\PCI#VEN_1002&DEV_67DF&SUBSYS_E3661DA2&REV_FF#4&1fc990d7&0&0019#{064092b3-625e-43bf-9eb5-d
                          c845897dd59}\GPUPARAV
ValidPartitionCounts    : {32}
PartitionCount          : 32
TotalVRAM               : 1000000000
AvailableVRAM           : 1000000000
MinPartitionVRAM        : 0
MaxPartitionVRAM        : 1000000000
OptimalPartitionVRAM    : 1000000000
TotalEncode             : 18446744073709551615
AvailableEncode         : 18446744073709551615
MinPartitionEncode      : 0
MaxPartitionEncode      : 18446744073709551615
OptimalPartitionEncode  : 18446744073709551615
TotalDecode             : 1000000000
AvailableDecode         : 1000000000
MinPartitionDecode      : 0
MaxPartitionDecode      : 1000000000
OptimalPartitionDecode  : 1000000000
TotalCompute            : 1000000000
AvailableCompute        : 1000000000
MinPartitionCompute     : 0
MaxPartitionCompute     : 1000000000
OptimalPartitionCompute : 1000000000
CimSession              : CimSession: .
ComputerName            : DESKTOP-C3BK5VE
IsDeleted               : False



PS C:\Windows\system32>

Created a VM on Hyper-V, 2-gen, no checkpoints, no extended session

Installed Windows, official ISO image from Mike's website.

Duplication of video card drivers from the host to the VM, each file from the list of drivers for the video card from under the host is copied to System32, SysWOW64, System32/drivers, the necessary directories are created.

A number of commands from under the admin Powershell on the Partitioning GPU, the script:

$vm = "01"
Remove-VMGpuPartitionAdapter -VMName $vm
Add-VMGpuPartitionAdapter -VMName $vm
Set-VMGpuPartitionAdapter -VMName $vm -MinPartitionVRAM 1
Set-VMGpuPartitionAdapter -VMName $vm -MaxPartitionVRAM 500000000
Set-VMGpuPartitionAdapter -VMName $vm -OptimalPartitionVRAM 499999999
Set-VMGpuPartitionAdapter -VMName $vm -MinPartitionEncode 1
Set-VMGpuPartitionAdapter -VMName $vm -MaxPartitionEncode 9223372036854775807
Set-VMGpuPartitionAdapter -VMName $vm -OptimalPartitionEncode 9223372036854775807
Set-VMGpuPartitionAdapter -VMName $vm -MinPartitionDecode 1
Set-VMGpuPartitionAdapter -VMName $vm -MaxPartitionDecode 500000000
Set-VMGpuPartitionAdapter -VMName $vm -OptimalPartitionDecode 499999999
Set-VMGpuPartitionAdapter -VMName $vm -MinPartitionCompute 1
Set-VMGpuPartitionAdapter -VMName $vm -MaxPartitionCompute 500000000
Set-VMGpuPartitionAdapter -VMName $vm -OptimalPartitionCompute 499999999
Set-VM -GuestControlledCacheTypes $true -VMName $vm
Set-VM -LowMemoryMappedIoSpace 1Gb -VMName $vm
Set-VM -HighMemoryMappedIoSpace 8GB -VMName $vm

An attempt to give half the power of the video card to the VM is like this, but as a result: I used

6232b63487eac941070654.png

this one too:
https://gist.github.com/neg2led/e35793da476095beac...

I don’t understand what I actually need to do now and how can I get the desired system behavior , what am I doing wrong?
Please help.

UPD 1.
I turned the output of partitions on Encode, the system wound up differently, still code 43, but in DXDiag everything is as it should be. 6232db2ade01a152586176.png

UPD 2.
With the config as in the screenshot, the system does not boot, it spins endlessly, but at least it throws an error that it cannot complete, because. GPUP partition assigned
6232e27a75d77873816019.png

Answer the question

In order to leave comments, you need to log in

3 answer(s)
C
CityCat4, 2022-03-17
@CityCat4

And they said that AMD cards do not block ... If you rummage around on the net, you can find threads where they say that this is a deliberate blocking of manufacturers who see that the card is in a virtual machine and block it. NVidia was seen in this, I didn’t hear anything about AMD.
Although I have never heard of forwarding a vidyuhi to a virtual machine inside Windows, but here it turns out that everything doesn’t work exactly the same ...

R
rootkie, 2022-03-18
@rootkie

!!! PLEASE NOTE THAT IF YOU HAVE UPDATED THE VIDEO DRIVERS OF YOUR HOST YOU WILL HAVE TO RE-COPY ALL DRIVERS TO YOUR VIRTUAL MACHINE OR THE CODE 43 WILL APPEAR AGAIN!!!

https://forum.level1techs.com/t/2-gamers-1-gpu-wit...

L
llliax, 2022-04-27
@llliax

Useful scripts and comments of the author on the operation of graphics adapters in GPU-P mode. I advise you to read the whole https://github.com/jamesstringerparsec/Easy-GPU-PV

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question