Bug 1012824
Summary: | the virtual interface can't be hotpluged with command "attach-interface" while the guest contains VF | |||
---|---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | Xuesong Zhang <xuzhang> | |
Component: | libvirt | Assignee: | Laine Stump <laine> | |
Status: | CLOSED CURRENTRELEASE | QA Contact: | Virtualization Bugs <virt-bugs> | |
Severity: | medium | Docs Contact: | ||
Priority: | medium | |||
Version: | 7.0 | CC: | acathrow, bili, dyuan, honzhang, jiahu | |
Target Milestone: | rc | |||
Target Release: | --- | |||
Hardware: | Unspecified | |||
OS: | Unspecified | |||
Whiteboard: | ||||
Fixed In Version: | libvirt-1.1.1-9.el7 | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | ||
Clone Of: | ||||
: | 1012834 (view as bug list) | Environment: | ||
Last Closed: | 2014-06-13 10:08:29 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: | ||||
Bug Depends On: | ||||
Bug Blocks: | 1012834 |
Description
Xuesong Zhang
2013-09-27 08:33:11 UTC
Fix posted upstream: https://www.redhat.com/archives/libvir-list/2013-October/msg00152.html Pushed upstream: commit 9881bfed2541faa428372b4513518b4b9ae1ab15 Author: Laine Stump <laine> Date: Thu Oct 3 13:02:35 2013 +0300 qemu: check actual netdev type rather than config netdev type during init I can reproduce it with libvirt-1.1.1-8.el7.x86_64, can not reproduce it with libvirt-1.1.1-9.el7.x86_64. version: libvirt-1.1.1-9.el7.x86_64 qemu-kvm-rhev-1.5.3-9.el7.x86_64 kernel-3.10.0-33.el7.x86_64 Verifying steps: 1. Define below two virtual networks. [root@sriov2 ~]# virsh net-dumpxml hostnet <network> <name>hostnet</name> <uuid>c1fb4ead-21b8-4d69-8ad9-669c55b3dfc7</uuid> <forward mode='hostdev' managed='yes'> <address type='pci' domain='0x0000' bus='0x11' slot='0x10' function='0x1'/> <address type='pci' domain='0x0000' bus='0x11' slot='0x10' function='0x0'/> </forward> </network> [root@sriov2 ~]# virsh net-dumpxml default <network> <name>default</name> <uuid>10f211a3-5f62-4f17-8a74-feb385446629</uuid> <forward mode='nat'> <nat> <port start='1024' end='65535'/> </nat> </forward> <bridge name='virbr0' stp='on' delay='0' /> <mac address='52:54:00:b9:c9:28'/> <ip address='192.168.122.1' netmask='255.255.255.0'> <dhcp> <range start='192.168.122.2' end='192.168.122.254' /> </dhcp> </ip> </network> 2. Prepare one running guest, cold-plug the vf to the guest like following: [root@sriov2 ~]# virsh start r7 Domain r7 started [root@sriov2 ~]# virsh dumpxml r7 | grep interface -A10 <interface type='network'> <mac address='52:54:00:f1:17:cc'/> <source network='hostnet'/> <model type='rtl8139'/> <alias name='hostdev0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> </interface> ... 3. hot-plug the interface of default network to the guest [root@sriov2 ~]# virsh attach-interface r7 network default Interface attached successfully [root@sriov2 ~]# virsh dumpxml r7 | grep interface -A10 <interface type='network'> <mac address='52:54:00:f1:17:cc'/> <source network='hostnet'/> <model type='rtl8139'/> <alias name='hostdev0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> </interface> <interface type='network'> <mac address='52:54:00:2a:70:fa'/> <source network='default'/> <target dev='vnet0'/> <model type='rtl8139'/> <alias name='net0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/> </interface> ... 4. hot-plug the interface of hostdev network to the guest [root@sriov2 ~]# virsh attach-interface r7 network hostnet Interface attached successfully [root@sriov2 ~]# virsh dumpxml r7 | grep interface -A10 <interface type='network'> <mac address='52:54:00:f1:17:cc'/> <source network='hostnet'/> <model type='rtl8139'/> <alias name='hostdev0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> </interface> <interface type='network'> <mac address='52:54:00:2a:70:fa'/> <source network='default'/> <target dev='vnet0'/> <model type='rtl8139'/> <alias name='net0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/> </interface> <interface type='network'> <mac address='52:54:00:a8:f1:ec'/> <source network='hostnet'/> <model type='rtl8139'/> <alias name='hostdev1'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x0'/> </interface> ... 5. hot-plug the interface of default network to the guest again [root@sriov2 ~]# virsh attach-interface r7 network default Interface attached successfully [root@sriov2 ~]# virsh dumpxml r7 | grep interface -A10 <interface type='network'> <mac address='52:54:00:f1:17:cc'/> <source network='hostnet'/> <model type='rtl8139'/> <alias name='hostdev0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> </interface> <interface type='network'> <mac address='52:54:00:2a:70:fa'/> <source network='default'/> <target dev='vnet0'/> <model type='rtl8139'/> <alias name='net0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/> </interface> <interface type='network'> <mac address='52:54:00:a8:f1:ec'/> <source network='hostnet'/> <model type='rtl8139'/> <alias name='hostdev1'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x0'/> </interface> <interface type='network'> <mac address='52:54:00:ab:f5:d9'/> <source network='default'/> <target dev='vnet1'/> <model type='rtl8139'/> <alias name='net1'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x09' function='0x0'/> </interface> ... 6. hot-plug the interface of hostdev network to the guest again, due to there are only two VFs in the pool, so we just cold-plug/hot-plug twice. [root@sriov2 ~]# virsh attach-interface r7 network hostnet error: Failed to attach interface error: internal error: network 'hostnet' requires exclusive access to interfaces, but none are available 7. hot-plug the interface of default network to the guest, after this step, we will get three interfaces that source network is default. [root@sriov2 ~]# virsh attach-interface r7 network default Interface attached successfully [root@sriov2 ~]# virsh dumpxml r7 | grep interface -A10 <interface type='network'> <mac address='52:54:00:f1:17:cc'/> <source network='hostnet'/> <model type='rtl8139'/> <alias name='hostdev0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> </interface> <interface type='network'> <mac address='52:54:00:2a:70:fa'/> <source network='default'/> <target dev='vnet0'/> <model type='rtl8139'/> <alias name='net0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/> </interface> <interface type='network'> <mac address='52:54:00:a8:f1:ec'/> <source network='hostnet'/> <model type='rtl8139'/> <alias name='hostdev1'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x0'/> </interface> <interface type='network'> <mac address='52:54:00:ab:f5:d9'/> <source network='default'/> <target dev='vnet1'/> <model type='rtl8139'/> <alias name='net1'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x09' function='0x0'/> </interface> <interface type='network'> <mac address='52:54:00:55:49:48'/> <source network='default'/> <target dev='vnet2'/> <model type='rtl8139'/> <alias name='net2'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x0a' function='0x0'/> </interface> ... We can get expected results, so changed to verified. This request was resolved in Red Hat Enterprise Linux 7.0. Contact your manager or support representative in case you have further questions about the request. |