question

JianSun-8674 avatar image
0 Votes"
JianSun-8674 asked XiaoweiHe-MSFT commented

Failed to passthrough PCIe device with DDA and Hyper-V

I am trying to assign a PCIe device to a VM using DDA with Hyper-V using Windows Server 2019. I already have ACS and ASPM enabled in BIOS. Both dismount and add assigned device to VM are successful (no errors are shown). However when I start the VM, I got the error:

Failed to Power on with Error 'The hypervisor could not perform the operation because the object or value was either already in use or being used for a purpose that would not permit completing the operation.'.


Any suggestions where I should look into?

Below is the complete command sequence:

PS C:\Users\Administrator> $vmName = 'Ubuntu'
PS C:\Users\Administrator> $instanceId = 'PCI\VEN_8086&DEV_43A2&SUBSYS_72708086&REV_00\3&11583659&0&F5'
PS C:\Users\Administrator> $vm = Get-VM -Name $vmName
PS C:\Users\Administrator> $dev = (Get-PnpDevice -PresentOnly).Where{ $_.InstanceId -like $instanceId }
PS C:\Users\Administrator> Disable-PnpDevice -InstanceId $dev.InstanceId -Confirm:$false
PS C:\Users\Administrator> $locationPath = (Get-PnpDeviceProperty -KeyName DEVPKEY_Device_LocationPaths -InstanceId $dev.InstanceId).Data[0]
PS C:\Users\Administrator> Dismount-VmHostAssignableDevice -LocationPath $locationPath -Force -Verbose
VERBOSE: Dismount-VmHostAssignableDevice will dismount an assignable device so it can be assigned to a virtual machine.
PS C:\Users\Administrator> Get-VMHostAssignableDevice

InstanceID : PCIP\VEN_8086&DEV_43A2&SUBSYS_72708086&REV_00\3&11583659&0&F5
LocationPath : PCIROOT(0)#PCI(1E05)
CimSession : CimSession: .
ComputerName : WIN-66HJJTFH7EH
IsDeleted : False

PS C:\Users\Administrator> Set-VM -VM $vm -DynamicMemory -MemoryMinimumBytes 1024MB -MemoryMaximumBytes 4096MB -MemoryStartupBytes 1024MB -AutomaticStopAction TurnOff
PS C:\Users\Administrator> Add-VMAssignableDevice -VM $vm -LocationPath $locationPath -Verbose
VERBOSE: Add-VMAssignableDevice will add an assignable device to virtual machine "Ubuntu".
PS C:\Users\Administrator> Start-VM -vm $vm
Start-VM : 'Ubuntu' failed to start.
Virtual Pci Express Port (Instance ID B123BE62-FAAF-441B-8C03-C33751A01E59): Failed to Power on with Error 'The
hypervisor could not perform the operation because the object or value was either already in use or being used for a
purpose that would not permit completing the operation.'.
'Ubuntu' failed to start. (Virtual machine ID 50065806-E76A-4894-BC07-71FCB8EB1EB3)
'Ubuntu' Virtual Pci Express Port (Instance ID B123BE62-FAAF-441B-8C03-C33751A01E59): Failed to Power on with Error
'The hypervisor could not perform the operation because the object or value was either already in use or being used
for a purpose that would not permit completing the operation.' (0xC0350019). (Virtual machine ID
50065806-E76A-4894-BC07-71FCB8EB1EB3)
At line:1 char:1
+ Start-VM -vm $vm
+ ~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Start-VM], VirtualizationException
+ FullyQualifiedErrorId : OperationFailed,Microsoft.HyperV.PowerShell.Commands.StartVM





windows-serverwindows-server-hyper-v
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

XiaoweiHe-MSFT avatar image
0 Votes"
XiaoweiHe-MSFT answered XiaoweiHe-MSFT commented

Hi,

Please check the following article and your the script in the article to check if the device is supported to pass-though to the VM:

https://docs.microsoft.com/en-us/virtualization/community/team-blog/2015/20151120-discrete-device-assignment-machines-and-devices

46000-image.png

Thanks for your time!
Best Regards,
Anne


If the Answer is helpful, please click "Accept Answer" and upvote it.

Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.



image.png (30.9 KiB)
· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Thanks for the reply!

I should have mentioned that I already run the DDA survey script and verified that the device is assignable:

Ethernet Controller
Embedded Endpoint -- less secure.
And it has no interrupts at all -- assignment can work.
PCIROOT(0)#PCI(1E05)


0 Votes 0 ·

Hi,

Since we have limited information and experience about this issue, if you want to get further help, it's recommended to open a case with MS. Thanks for your understanding!

Below is the link to open a case with MS:

https://support.microsoft.com/en-us/gp/customer-service-phone-numbers

Best Regards,
Anne


0 Votes 0 ·