Description of problem: virt-xml-validate fail to validate network port xml Version-Release number of selected component (if applicable): libvirt-5.6.0-2.virtcov.el8.x86_64 How reproducible: 100% Steps to Reproduce: 1. check the network port xml: # virsh net-port-list bridge-test UUID --------------------------------------- f3d6e7fe-a08b-4351-96c4-3a1046c32a6f # virsh net-port-dumpxml bridge-test f3d6e7fe-a08b-4351-96c4-3a1046c32a6f <networkport> <uuid>f3d6e7fe-a08b-4351-96c4-3a1046c32a6f</uuid> <owner> <name>rhel</name> <uuid>6fc9e4e3-980c-43df-8d62-673cd69b00e3</uuid> </owner> <mac address='52:54:00:eb:6f:8d'/> <plug type='bridge' bridge='br0'/> </networkport> 2. validate the port xml by virt-xml-validate: # virsh net-port-dumpxml bridge-test f3d6e7fe-a08b-4351-96c4-3a1046c32a6f > port.xml # virt-xml-validate port.xml port.xml:1: element networkport: Relax-NG validity error : Expecting element network, got networkport port.xml fails to validate Actual results: virt-xml-validate fail to validate network port xml Expected results: the xml should pass the virt-xml-validate Additional info:
Patch proposed upstream https://www.redhat.com/archives/libvir-list/2019-September/msg00482.html
Merged upstream as: commit 2e3e942f99f29483c328f5ddafda37782bc2d43e Author: Daniel P. Berrangé <berrange> Date: Thu Sep 12 14:12:02 2019 +0100 tools: fix XML validator detection of network port XML schema Reviewed-by: Michal Privoznik <mprivozn> Signed-off-by: Daniel P. Berrangé <berrange>
Verified with libvirt-6.0.0-1.module+el8.2.0+5453+31b2b136.x86_64 & qemu-kvm-4.2.0-6.module+el8.2.0+5453+31b2b136.x86_64 # virsh net-port-list default UUID --------------------------------------- 2cb1346e-c46a-42e2-a3c7-7cea06409cf4 # virsh net-port-dumpxml default 2cb1346e-c46a-42e2-a3c7-7cea06409cf4 <networkport> <uuid>2cb1346e-c46a-42e2-a3c7-7cea06409cf4</uuid> <owner> <name>avocado-vt-vm1</name> <uuid>d5bc4702-a7d9-444a-9978-d31f63d4e716</uuid> </owner> <mac address='52:54:00:58:15:eb'/> <plug type='network' bridge='virbr0'/> </networkport> # virsh net-port-dumpxml default 2cb1346e-c46a-42e2-a3c7-7cea06409cf4 > ~/port.xml # virt-xml-validate ~/port.xml /root/port.xml validates
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