[fedora-virt] PCI passthrough IDE DVD-ROM shares same PCI device as SATA HDD?

John Brier johnbrier at gmail.com
Sat Oct 2 19:49:00 UTC 2010


Hi, I'm on F13 x86_64 with KVM. I would like to build a Fedora 13
guest with wine and EAC (Exact Audio Copy) for ripping audio CDs. I
was hoping to use a newly installed DVD-ROM from an old system, but it
looks like it is on the same IDE Bus as one of my SATA drives that is
already in a RAID 5 array.. so I don't think this will work. It seems
odd to me that my motherboard would have a SATA bus and IDE bus share
the same PCI device.. take a look:

[root at trainwreck ~]# virsh nodedev-list --tree
computer
 |
  +- net_lo_00_00_00_00_00_00
  +- net_vnet0_0e_15_40_a9_a4_fb
  +- pci_0000_00_00_0
  +- pci_0000_00_01_0
  |   |
  |   +- pci_0000_01_05_0
  |   +- pci_0000_01_05_1
  |
  +- pci_0000_00_05_0
  |   |
  |   +- pci_0000_02_00_0
  |       |
  |       +- net_eth1_40_61_86_be_7d_d0
  |
  +- pci_0000_00_11_0
  |   |
  |   +- scsi_host0
  |   |   |
  |   |   +- scsi_target0_0_0
  |   |       |
  |   |       +- scsi_0_0_0_0
  |   |           |
  |   |           +- block_sda_WDC_WD2500YS_01SHB1_WD_WCANY3824770
  |   |
  |   +- scsi_host1
  |   |   |
  |   |   +- scsi_target1_0_0
  |   |       |
  |   |       +- scsi_1_0_0_0
  |   |           |
  |   |           +- block_sdb_WDC_WD2500YS_01SHB1_WD_WCANY1981711
  |   |
  |   +- scsi_host2
  |   |   |
  |   |   +- scsi_target2_0_0
  |   |       |
  |   |       +- scsi_2_0_0_0
  |   |           |
  |   |           +- block_sdc_SAMSUNG_HD203WI_S1UYJ1RZ603028
  |   |
  |   +- scsi_host3
  |       |
  |       +- scsi_target3_0_0
  |           |
  |           +- scsi_3_0_0_0
  |               |
  |               +- block_sdd_SAMSUNG_HD203WI_S1UYJ1RZ603027
  |
  +- pci_0000_00_12_0
  |   |
  |   +- usb_usb3
  |       |
  |       +- usb_3_0_1_0
  |       +- usb_3_2
  |           |
  |           +- usb_3_2_1_0
  |           +- usb_3_2_1_1
  |
  +- pci_0000_00_12_1
  |   |
  |   +- usb_usb4
  |       |
  |       +- usb_4_0_1_0
  |
  +- pci_0000_00_12_2
  |   |
  |   +- usb_usb1
  |       |
  |       +- usb_1_0_1_0
  |       +- usb_1_3
  |           |
  |           +- usb_1_3_1_0
  |               |
  |               +- scsi_host6
  |                   |
  |                   +- scsi_target6_0_0
  |                       |
  |                       +- scsi_6_0_0_0
  |                           |
  |                           +-
block_sdf_FANTOM_WD10EACS_00D6B0_57442D574341553430333035_0_0
  |
  +- pci_0000_00_13_0
  |   |
  |   +- usb_usb5
  |       |
  |       +- usb_5_0_1_0
  |
  +- pci_0000_00_13_1
  |   |
  |   +- usb_usb6
  |       |
  |       +- usb_6_0_1_0
  |
  +- pci_0000_00_13_2
  |   |
  |   +- usb_usb2
  |       |
  |       +- usb_2_0_1_0
  |
  +- pci_0000_00_14_0
  +- pci_0000_00_14_1
  |   |
  |   +- scsi_host4
  |   |   |
  |   |   +- scsi_target4_0_0
  |   |       |
  |   |       +- scsi_4_0_0_0
  |   |           |
  |   |           +- block_sr0
  |   |
  |   +- scsi_host5
  |       |
  |       +- scsi_target5_0_0
  |           |
  |           +- scsi_5_0_0_0
  |               |
  |               +- block_sde_SAMSUNG_HD203WI_S1UYJ1RZ603031
  |
  +- pci_0000_00_14_2
  +- pci_0000_00_14_3
  +- pci_0000_00_14_4
  |   |
  |   +- pci_0000_03_06_0
  |       |
  |       +- net_eth0_00_10_4b_1f_95_71
  |
  +- pci_0000_00_14_5
  |   |
  |   +- usb_usb7
  |       |
  |       +- usb_7_0_1_0
  |
  +- pci_0000_00_18_0
  +- pci_0000_00_18_1
  +- pci_0000_00_18_2
  +- pci_0000_00_18_3
  +- pci_0000_00_18_4

The PCI device I'm concerned with is pci_0000_00_14_1 which has
/dev/sr0 on it which is my IDE DVD ROM, but it also has my Samsung 2TB
hard drive on it, which is SATA

[root at trainwreck ~]# virsh nodedev-dumpxml pci_0000_00_14_1
<device>
  <name>pci_0000_00_14_1</name>
  <parent>computer</parent>
  <driver>
    <name>pata_atiixp</name>
  </driver>
  <capability type='pci'>
    <domain>0</domain>
    <bus>0</bus>
    <slot>20</slot>
    <function>1</function>
    <product id='0x439c'>SB700/SB800 IDE Controller</product>
    <vendor id='0x1002'>ATI Technologies Inc</vendor>
  </capability>
</device>

It would be better if it were on this which has the rest of my SATA
drives on it:

[root at trainwreck ~]# virsh nodedev-dumpxml pci_0000_00_11_0
<device>
  <name>pci_0000_00_11_0</name>
  <parent>computer</parent>
  <driver>
    <name>ahci</name>
  </driver>
  <capability type='pci'>
    <domain>0</domain>
    <bus>0</bus>
    <slot>17</slot>
    <function>0</function>
    <product id='0x4390'>SB700/SB800 SATA Controller [IDE mode]</product>
    <vendor id='0x1002'>ATI Technologies Inc</vendor>
  </capability>
</device>

Previously I had tried using attach-disk to add the device to a guest
but that seems impossible:

[root at trainwreck ~]# virsh attach-disk digweed /dev/sr0 hda --driver
file --type cdrom --mode readonly
error: Failed to attach disk
error: internal error Removable media not supported for cdrom device

It seems that is only usable for iso files? That seems a little
contradictory to the docs:
http://docs.fedoraproject.org/en-US/Fedora/13/html/Virtualization_Guide/sect-Virtualization-Virtualized_block_devices-Add_a_virtualized_CD_ROM_or_DVD_device_to_a_guest.html

What's the best way to achieve this? I suppose I could hook up a USB
IDE DVD ROM as I do have one of those, and it wouldn't share the same
PCI device.

John Brier


More information about the virt mailing list