[CentOS-virt] Setting up a pci passthrough device

James B. Byrne byrnejb at harte-lyne.ca
Fri Feb 3 11:32:01 EST 2012

Evidently I should be using


Which I had looked for but google apparently does not
report.  I had to search the RedHat web site using their
search interface to locate it.  The other site purports to
be a rhel6 essentials book.

Nonetheless, while the inconsistencies of the previous
documents are resolved in this new reference the example
edit of the virtual guest configuration still fails to
provide a context for the insertion:

# virsh edit guest1-rhel6-64
<hostdev mode='subsystem' type='pci' managed='yes'>
     <address domain='0x000' bus='0x03' slot='0x00'

Where does this go inside the rest of the guest

<domain type='kvm'>
  <description>Inet08  [] virtual hosts:
    <type arch='x86_64' machine='rhel6.2.0'>hvm</type>
    <boot dev='hd'/>
  <clock offset='utc'/>
    <disk type='block' device='disk'>
      <driver name='qemu' type='raw' cache='none'
      <target dev='vda' bus='virtio'/>
      <address type='pci' domain='0x0000' bus='0x00'
slot='0x05' function='0x0'/>
    <disk type='block' device='cdrom'>
      <driver name='qemu' type='raw'/>
      <target dev='hdc' bus='ide'/>
      <address type='drive' controller='0' bus='1' unit='0'/>
    <controller type='ide' index='0'>
      <address type='pci' domain='0x0000' bus='0x00'
slot='0x01' function='0x1'/>
    <interface type='bridge'>
      <mac address='52:54:00:bf:e9:ac'/>
      <source bridge='br0'/>
      <model type='virtio'/>
      <address type='pci' domain='0x0000' bus='0x00'
slot='0x03' function='0x0'/>
    <serial type='pty'>
      <target port='0'/>
    <serial type='dev'>
      <source path='/dev/ttyS0'/>
      <target port='1'/>
    <console type='pty'>
      <target type='serial' port='0'/>
    <input type='tablet' bus='usb'/>
    <input type='mouse' bus='ps2'/>
    <graphics type='vnc' port='-1' autoport='yes'/>
    <sound model='ich6'>
      <address type='pci' domain='0x0000' bus='0x00'
slot='0x04' function='0x0'/>
      <model type='cirrus' vram='9216' heads='1'/>
      <address type='pci' domain='0x0000' bus='0x00'
slot='0x02' function='0x0'/>
    <memballoon model='virtio'>
      <address type='pci' domain='0x0000' bus='0x00'
slot='0x06' function='0x0'/>

I have tried placing the <hostdev> tags after the
<devices> tag but the changes simply disappear.

***          E-Mail is NOT a SECURE channel          ***
James B. Byrne                mailto:ByrneJB at Harte-Lyne.ca
Harte & Lyne Limited          http://www.harte-lyne.ca
9 Brockley Drive              vox: +1 905 561 1241
Hamilton, Ontario             fax: +1 905 561 0757
Canada  L8E 3C3

More information about the CentOS-virt mailing list