Virtual machines configured with SR-IOV virtual NICs are unable to power on.
After a power-on failure, you will see an error similar to the following under the tasks section:
The Physical Function (PF) ID listed for the SR-IOV-mapped vmnic differs from the PF ID shown in the error for the failed task,
Failed to power on virtual machine example_vm, pciPassthru:14: No SR-IOV virtual function (VF) is available for given physical function (PF) (0000:04:00.1). Check here for more details
Environment
VMware vSphere ESXi 7.x
VMware vSphere ESXi 8.x
Cause
The VM was newly deployed, but the VMX file retained the incorrect Physical Function (PF) value from its previous configuration, such as 0000:04:00.1, instead of the correct value 0000:X8:00.1
Current Physical Function (PF) value can be checked from the vmx file of the VM,
The PF value in the vmx file and the error message would be the same which doesn't match the correct Physical Function (PF) listed for the SR-IOV-mapped vmnic adapters
Correct Physical Function (PF) value can be obtained by executing the following command
esxcli network sriovnic vf list -n vmnic*
Note: The PF ID provided above is for illustrative purposes only and may not reflect the actual ID for every event
Resolution
Need to Delete and recreate the SR-IOV vNIC to update the PF ID in the Virtual Machine.
Steps to remove the SR-IOV network adapter:
Power off the Virtual Machine
Right click the VM, select edit settings
Remove the SR-IOV network adapter
Click OK to save the configuration
Steps to add the SR-IOV network adapter:
Right click the Virtual Machine, select Edit Settings.
Select the Virtual Hardware tab in the dialog box displaying the settings.
From the Add new device drop-down menu, select Network Adapter.
The New Network section is added to the list in the Virtual Hardware tab.
Expand the New Network section and connect the virtual machine to a port group.
From the Adapter type drop-down menu, select SR-IOV passthrough.
From the Physical function drop-down menu, select the physical adapter to back the passthrough virtual machine adapter.
Power on the Virtual Machine
Additional Information
Reference Document to Assign a Virtual Function as SR-IOV Passthrough Adapter to a Virtual Machine: