Failed to passthrough PCIe device with DDA and Hyper-V

Jian Sun 1 Reputation point
2020-12-08T03:12:51.617+00:00

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 Server
Windows Server
A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.
12,205 questions
Hyper-V
Hyper-V
A Windows technology providing a hypervisor-based virtualization solution enabling customers to consolidate workloads onto a single server.
2,560 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Xiaowei He 9,871 Reputation points
    2020-12-08T07:20:53.927+00:00

    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://learn.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.