Show Table of Contents
15.3. PCI passthrough with virt-install
To use PCI passthrough with the virt-install parameter, use the additional
--host-device parameter.
Identify the PCI device
Identify the PCI device designated for passthrough to the guest. Thevirsh nodedev-listcommand lists all devices attached to the system. The--treeoption 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
Each PCI device is identified by a string in the following format (where 8086 is a variable that in this case represents Intel equipment, and **** is a four digit hexadecimal code specific to each device):pci_8086_****
Note
Comparinglspcioutput tolspci -n(which turns off name resolution) output can assist in deriving which device has which device identifier code.Add the device
Use the PCI identifier output from thevirsh nodedevcommand as the value for the--host-deviceparameter.# virt-install \ -n hostdev-test -r 1024 --vcpus 2 \ --os-variant fedora11 -v --accelerate \ -l http://download.fedoraproject.org/pub/fedora/linux/development/x86_64/os \ -x 'console=ttyS0 vnc' --nonetworks --nographics \ --disk pool=default,size=8 \ --debug --host-device=pci_8086_10bdComplete the installation
Complete the guest installation. The PCI device should be attached to the guest.

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.