Installation guide

Troubleshooting SR-IOV
121
Device pci_0000_0b_10_0 dettached
10. Add the Virtual Function to the guest
a. Shut down the guest.
b. Use the output from the virsh nodedev-dumpxml pci_8086_10ca_0 command to
calculate the values for the configuration file. Convert slot and function values to hexadecimal
values (from decimal) to get the PCI bus addresses. Append "0x" to the beginning of the
output to tell the computer that the value is a hexadecimal number.
The example device has the following values: bus = 3, slot = 16 and function = 1. Use the
printf utility to convert decimal values to hexadecimal values.
$ printf %x 3
3
$ printf %x 16
10
$ printf %x 1
1
This example would use the following values in the configuration file:
bus='0x03'
slot='0x10'
function='0x01'
c. Open the XML configuration file with the virsh edit command. This example edits a guest
named MyGuest.
# virsh edit MyGuest
d. The default text editor will open the libvirt configuration file for the guest. Add the new device
to the devices section of the XML configuration file.
<hostdev mode='subsystem' type='pci'>
<source>
<address bus='0x03' slot='0x10' function='0x01'/>
</source>
</hostdev>
e. Save the configuration.
11. Restart
Restart the guest to complete the installation.
# virsh start MyGuest
The guest should start successfully and detect a new network interface card. This new card is the
Virtual Function of the SR-IOV device.
13.3. Troubleshooting SR-IOV
This section contains some issues and solutions for problems which may affect SR-IOV.