Oops, typo.
I corrected the code above.
------------------------------
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
------------------------------
Original Message:
Sent: Jun 06, 2024 12:43 PM
From: MattG
Subject: Enable PCI Passthrough for NIC cards?
Lucd,
THANKS as always!
I had to change:
$pciPass.UpdatePassthruConfig(@($config))
to
$pciPass.UpdatePassthruConfig(@($pci))
-MattG
Original Message:
Sent: Jun 06, 2024 10:40 AM
From: LucD
Subject: Enable PCI Passthrough for NIC cards?
You need to know the Id of the device, then you could do something like this
$esxName = 'MyEsx'$tgtDevice = 'bus:slot.function'$esx = Get-VMHost -Name $esxName$dev = $esx.ExtensionData.Config.PciPassthruInfo | where{$_.Id -eq $tgtDevice}$pciPass = Get-View -Id $esx.ExtensionData.ConfigManager.pciPassthruSystem$pci = New-Object -TypeName VMware.Vim.HostPciPassthruConfig$pci.ApplyNow = $true$pci.PassthruEnabled = $true$pci.Id = $dev.Id$pciPass.UpdatePassthruConfig(@($config))
------------------------------
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Original Message:
Sent: Jun 06, 2024 09:50 AM
From: MattG
Subject: Enable PCI Passthrough for NIC cards?
Cant figure out how to toggle/enable PCI Passthrough capable physical NICs. I found this thread:
Automation
Broadcom | remove preview |
| Automation | HelloI'm trying to find a way to enable 2 Graphic Cards I have on the host for passthrough so I can use them in the VMsI'm familiar with the GUI way to do it an | View this on Broadcom > |
|
|
But cant make sense of what is needed to enable PCI Passthrough.
Thanks,
-MattG