[libvirt] PCI devices passthough to LXC containers using libvirt

Devendra K. Modium dmodium at isi.edu
Wed Jul 27 21:13:13 UTC 2011


Hi All

Please let me know if anyone have given access to
PCI devices for a LXC container.

I have tried getting the xml from 
"virsh nodedev-dumpxml pci_device" and 
added to the libvirt xml file as shown below

<device>
  <name>pci_0000_03_00_0</name>
  <parent>pci_0000_00_03_0</parent>
  <driver>
    <name>nvidia</name>
  </driver>
  <capability type='pci'>
    <domain>0</domain>
    <bus>3</bus>
    <slot>0</slot>
    <function>0</function>
    <product id='0x06fd' />
    <vendor id='0x10de'>nVidia Corporation</vendor>
  </capability>
</device>


But it didn't work. I see the logs and it says 
couldn't get physical and virtual functions of these devices with error

get_physical_function_linux:323 : Attempting to get SR IOV physical function for device with sysfs path '/sys/devices/pci0000:00/0000:00:00.0'
16:48:34.033: 13802: debug : get_sriov_function:270 : Attempting to resolve device path from device link '/sys/devices/pci0000:00/0000:00:00.0/physfn'
16:48:34.033: 13802: debug : get_sriov_function:274 : SR IOV function link '/sys/devices/pci0000:00/0000:00:00.0/physfn' does not exist
16:48:34.033: 13802: debug : get_virtual_functions_linux:348 : Attempting to get SR IOV virtual functions for devicewith sysfs path '/sys/devices/pci0000:00/0000:00:00.0'


If anyone got some guidelines how to debug, please let me know.


Thanks in advance

Regards
Devendra





  




More information about the libvir-list mailing list