Bug 1751461
Summary: | Setting "managed=no" in hostdev virtual network do not work | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux Advanced Virtualization | Reporter: | yalzhang <yalzhang> |
Component: | libvirt | Assignee: | Daniel Berrangé <berrange> |
Status: | CLOSED ERRATA | QA Contact: | jiyan <jiyan> |
Severity: | unspecified | Docs Contact: | |
Priority: | unspecified | ||
Version: | 8.1 | CC: | berrange, jdenemar, knoel, lmen, xuzhang |
Target Milestone: | rc | Keywords: | Regression |
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | libvirt-5.9.0-1.el8 | Doc Type: | If docs needed, set a value |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2020-05-05 09:49:41 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: | 1585087 |
Description
yalzhang@redhat.com
2019-09-12 04:57:29 UTC
Patch proposed upstream https://www.redhat.com/archives/libvir-list/2019-September/msg00496.html Merged upstream in commit e0cb57c552b79016535199021dca5296c0ca89a3 Author: Daniel P. Berrangé <berrange> Date: Thu Sep 12 16:04:20 2019 +0100 conf: correctly convert 'managed' attribute from network port The virNetworkPortDef config stores the 'managed' attribute as the virTristateBool type. The virDomainDef config stores the 'managed' attribute as the bool type. Reviewed-by: Michal Privoznik <mprivozn> Signed-off-by: Daniel P. Berrangé <berrange> Reproduce this bug with libvirt-5.6.0-7.module+el8.2.0+4673+ff4b3b61.x86_64. Verified this bug with libvirt-5.9.0-1.module+el8.2.0+4682+acceb91e.x86_64 and libvirt-6.0.0-1.module+el8.2.0+5453+31b2b136.x86_64. Version: libvirt-5.6.0-7.module+el8.2.0+4673+ff4b3b61.x86_64 qemu-kvm-4.1.0-14.module+el8.2.0+4673+ff4b3b61.x86_64 kernel-4.18.0-171.el8.x86_64 Steps: 1. Setup vfs on physical hosts # virsh nodedev-dumpxml pci_0000_82_00_1 <device> <name>pci_0000_82_00_1</name> <path>/sys/devices/pci0000:80/0000:80:02.0/0000:82:00.1</path> <parent>pci_0000_80_02_0</parent> <driver> <name>ixgbe</name> </driver> <capability type='pci'> <class>0x020000</class> <domain>0</domain> <bus>130</bus> <slot>0</slot> <function>1</function> <product id='0x10fb'>82599ES 10-Gigabit SFI/SFP+ Network Connection</product> <vendor id='0x8086'>Intel Corporation</vendor> <capability type='virt_functions' maxCount='63'> <address domain='0x0000' bus='0x82' slot='0x10' function='0x1'/> <address domain='0x0000' bus='0x82' slot='0x10' function='0x3'/> <address domain='0x0000' bus='0x82' slot='0x10' function='0x5'/> <address domain='0x0000' bus='0x82' slot='0x10' function='0x7'/> <address domain='0x0000' bus='0x82' slot='0x11' function='0x1'/> </capability> <iommuGroup number='42'> <address domain='0x0000' bus='0x82' slot='0x00' function='0x1'/> </iommuGroup> <numa node='1'/> <pci-express> <link validity='cap' port='0' speed='5' width='8'/> <link validity='sta' speed='5' width='8'/> </pci-express> </capability> </device> 2. Create virtual network with the vfs above and managed=no # cat network.xml <network> <name>pt</name> <forward mode='hostdev' managed='no'> <driver name='vfio'/> <address type='pci' domain='0x0000' bus='0x82' slot='0x10' function='0x1'/> <address type='pci' domain='0x0000' bus='0x82' slot='0x10' function='0x3'/> <address type='pci' domain='0x0000' bus='0x82' slot='0x10' function='0x5'/> </forward> </network> # virsh net-define network.xml Network pt defined from network.xml # virsh net-start pt Network pt started # virsh net-dumpxml pt <network> <name>pt</name> <uuid>22e3cc60-e126-438c-aca7-2993ec2174d8</uuid> <forward mode='hostdev' managed='no'> <driver name='vfio'/> <address type='pci' domain='0x0000' bus='0x82' slot='0x10' function='0x1'/> <address type='pci' domain='0x0000' bus='0x82' slot='0x10' function='0x3'/> <address type='pci' domain='0x0000' bus='0x82' slot='0x10' function='0x5'/> </forward> </network> 3. Start VM with interface whose source network is the virtual network above # virsh domstate test82 shut off # virsh dumpxml test82 --inactive | grep "<interface" -A9 <interface type='network'> <mac address='52:54:00:0a:98:80'/> <source network='pt'/> <model type='virtio'/> <address type='pci' domain='0x0000' bus='0x07' slot='0x00' function='0x0'/> </interface> # virsh start test82 Domain test82 started # virsh dumpxml test82 | grep "<interface" -A9 <interface type='hostdev' managed='yes'> <mac address='52:54:00:0a:98:80'/> <driver name='vfio'/> <source> <address type='pci' domain='0x0000' bus='0x82' slot='0x10' function='0x1'/> </source> <model type='virtio'/> <alias name='hostdev0'/> <address type='pci' domain='0x0000' bus='0x07' slot='0x00' function='0x0'/> </interface> 4. Update the libvrit # yum update libvirt* -y # systemctl restart libvirtd # rpm -qa libvirt libvirt-5.9.0-1.module+el8.2.0+4682+acceb91e.x86_64 5. Restart VM and check the interface dumpxml again # virsh destroy test82 ;virsh start test82 Domain test82 destroyed Domain test82 started # virsh dumpxml test82 |grep "<interface" -A9 <interface type='hostdev'> <mac address='52:54:00:0a:98:80'/> <driver name='vfio'/> <source> <address type='pci' domain='0x0000' bus='0x82' slot='0x10' function='0x1'/> </source> <model type='virtio'/> <alias name='hostdev0'/> <address type='pci' domain='0x0000' bus='0x07' slot='0x00' function='0x0'/> </interface> 6. Update the libvirt to libvirt-6.0.0-1.module+el8.2.0+5453+31b2b136.x86_64, and then repeat the step-4 and step-5. The result is same with step-5. All the test results are as expected, move this bug to be verified. Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2020:2017 |