Bug 1078080
| Summary: | Fail to start guest with normal PCI device | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | tingting zheng <tzheng> | ||||||
| Component: | libvirt | Assignee: | Jiri Denemark <jdenemar> | ||||||
| Status: | CLOSED NOTABUG | QA Contact: | Virtualization Bugs <virt-bugs> | ||||||
| Severity: | high | Docs Contact: | |||||||
| Priority: | high | ||||||||
| Version: | 7.0 | CC: | acathrow, dyuan, jdenemar, lcui, mzhan, tzheng, xuzhang | ||||||
| Target Milestone: | rc | ||||||||
| Target Release: | --- | ||||||||
| Hardware: | Unspecified | ||||||||
| OS: | Unspecified | ||||||||
| Whiteboard: | |||||||||
| Fixed In Version: | Doc Type: | Bug Fix | |||||||
| Doc Text: | Story Points: | --- | |||||||
| Clone Of: | Environment: | ||||||||
| Last Closed: | 2014-03-19 12:19:09 UTC | Type: | Bug | ||||||
| Regression: | --- | Mount Type: | --- | ||||||
| Documentation: | --- | CRM: | |||||||
| Verified Versions: | Category: | --- | |||||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||||
| Embargoed: | |||||||||
| Attachments: |
|
||||||||
PCI passthrough works normally for me (both coldplug and hotplug). Could you attach the complete domain XML, output of "virsh nodedev-dumpxml pci_0000_00_19_0" command, and most importantly debug logs from libvirtd generated while you tried to start the domain? (In reply to Jiri Denemark from comment #1) > PCI passthrough works normally for me (both coldplug and hotplug). Could you > attach the complete domain XML, output of "virsh nodedev-dumpxml > pci_0000_00_19_0" command, and most importantly debug logs from libvirtd > generated while you tried to start the domain? # virsh nodedev-dumpxml pci_0000_00_19_0 <device> <name>pci_0000_00_19_0</name> <path>/sys/devices/pci0000:00/0000:00:19.0</path> <parent>computer</parent> <driver> <name>e1000e</name> </driver> <capability type='pci'> <domain>0</domain> <bus>0</bus> <slot>25</slot> <function>0</function> <product id='0x10de'>82567LM-3 Gigabit Network Connection</product> <vendor id='0x8086'>Intel Corporation</vendor> <iommuGroup number='3'> <address domain='0x0000' bus='0x00' slot='0x19' function='0x0'/> </iommuGroup> </capability> </device> Created attachment 876320 [details]
xml file of guest
Created attachment 876321 [details]
libvirt log file
In the domain XML, I can see
<interface type='direct'>
<mac address='52:54:00:0a:99:26'/>
<source dev='enp0s25' mode='vepa'/>
<model type='rtl8139'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
</interface>
where enp0s25 corresponds to the error message you got. Are you trying to passthrough a the same network card that you use in the <interface> element above?
(In reply to Jiri Denemark from comment #5) > In the domain XML, I can see > > <interface type='direct'> > <mac address='52:54:00:0a:99:26'/> > <source dev='enp0s25' mode='vepa'/> > <model type='rtl8139'/> > <address type='pci' domain='0x0000' bus='0x00' slot='0x03' > function='0x0'/> > </interface> > > where enp0s25 corresponds to the error message you got. Are you trying to > passthrough a the same network card that you use in the <interface> element > above? Yes,so the error info is caused by the interface. This is not a bug then. Attaching the PCI device removes it from the host and thus enp0s25 disappears so it's logical the start fails because it cannot find the device to connect the domain's interface with. Hotplug succeeds because the network interface is there when the domain is started, it the disappears as a result of its PCI device being passed through to the domain, which succeeds although domain's network connectivity will be broken since then. |
Description: Fail to start guest with normal PCI device Version: libvirt-1.1.1-28.el7.x86_64 virt-manager-0.10.0-18.el7.noarch How reproducible: 100% Steps to Reproduce: 1.Enable intel_iommu on host. 2.Prepare a guest with shutdown status. 3.Launch virt-manager,Open the guest,click show details->"Add Hardware"->select 'PCI Host Device' in hardware type list->select a NIC in device list to coldplug the PCI device to the vm,in my case,it is normal network card:00:19:0 82567LM-3 Gigabit Network Connection 4.Try to boot the guest,will get the below error. Error starting domain: Unable to get index for interface enp0s25: No such device Traceback (most recent call last): File "/usr/share/virt-manager/virtManager/asyncjob.py", line 100, in cb_wrapper callback(asyncjob, *args, **kwargs) File "/usr/share/virt-manager/virtManager/asyncjob.py", line 122, in tmpcb callback(*args, **kwargs) File "/usr/share/virt-manager/virtManager/domain.py", line 1220, in startup self._backend.create() File "/usr/lib64/python2.7/site-packages/libvirt.py", line 698, in create if ret == -1: raise libvirtError ('virDomainCreate() failed', dom=self) libvirtError: Unable to get index for interface enp0s25: No such device 5.Check the xml of the guest,the pci part will shows as: <hostdev mode='subsystem' type='pci' managed='yes'> <source> <address domain='0x0000' bus='0x00' slot='0x19' function='0x0'/> </source> <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/> </hostdev> 6.I can hotplug the PCI device to guest successfully when the guest is running. Actual results: As described. Expected results: Step 5,guest can be started successfully. Additional info: The issue only occurs for normal PCI devices,and guest with VF can be started successfully.