Installation guide
Chapter 12. PCI passthrough
110
$ readlink /sys/bus/pci/devices/0000\:00\:1a.7/driver
../../../bus/pci/drivers/ehci_hcd
7. Detach the device:
$ virsh nodedev-dettach pci_8086_3a6c
8. Verify it is now under the control of pci_stub:
$ readlink /sys/bus/pci/devices/0000\:00\:1d.7/driver
../../../bus/pci/drivers/pci-stub
9. Set a sebool to allow the management of the PCI device from the guest:
$ setsebool -P virt_manage_sysfs 1
10. Start the guest system :
# virsh start win2k3
The PCI device should now be successfully attached to the guest and accessible to the guest
operating system.
12.2. Adding a PCI device with virt-manager
PCI devices can be added to guests using the graphical virt-manager tool. The following procedure
adds a 2 port USB controller to a virtualized guest.
1. Identify the device
Identify the PCI device designated for passthrough to the guest. The virsh nodedev-list
command lists all devices attached to the system. The --tree option is useful for identifying
devices attached to the PCI device (for example, disk controllers and USB controllers).
# virsh nodedev-list --tree
For a list of only PCI devices, run the following command:
# virsh nodedev-list | grep pci
In the output from this command, each PCI device is identified by a string, as shown in the
following example output:
pci_0000_00_00_0
pci_0000_00_02_0
pci_0000_00_02_1
pci_0000_00_03_0
pci_0000_00_03_2
pci_0000_00_03_3
pci_0000_00_19_0
pci_0000_00_1a_0
pci_0000_00_1a_1
pci_0000_00_1a_2