Installation guide

bus='0'
slot='25'
function='0'
If you want to convert to hexadecimal values, you can use the pri ntf utility to convert from
decimal values, as shown in the following example:
$ printf %x 0
0
$ printf %x 25
19
$ printf %x 0
0
The example device would use the following hexadecimal values in the configuration file:
bus='0x0'
slot='0x19'
function='0x0'
4. Add con f ig u rat io n det ails
Run vi rsh ed i t, specifying the virtual machine name, and add a device entry in the
<so urce> section to assign the PCI device to the guest virtual machine.
# virsh edit guest1-rhel6-64
<hostdev mode='subsystem' type='pci' managed='yes'>
<source>
<address domain='0x0' bus='0x0' slot='0x19' function='0x0'/>
</source>
</hostdev>
Alternately, run vi rsh attach-d evi ce, specifying the virtual machine name and the
guest's XML file:
virsh attach-device guest1-rhel6-64 fi l e. xml
5. Allo w d evice man ag emen t
Set an SELinux boolean to allow the management of the PCI device from the virtual machine:
# setsebool -P virt_use_sysfs 1
6. St art t h e virt u al mach in e
# virsh start guest1-rhel6-64
The PCI device should now be successfully assigned to the virtual machine, and accessible to the
guest operating system.
12.2. Assigning a PCI device wit h virt -manager
Red Hat Ent erp rise Linux 6 Virt ualiz at ion Host Configurat ion and G uest Inst allat ion G uide
98