[libvirt-users] virt-xml-validate b0rked?

It seems that virt-xml-validate doesn't validate what *has* to be valid XML, that generated by virsh dumpxml against a running domain: [root@etc752365a ~]# virsh list Id Name State ---------------------------------- 2 rhel55 running 3 rhel53 running [root@etc752365a ~]# virsh dumpxml rhel55 > foo.xml [root@etc752365a ~]# virt-xml-validate foo.xml foo.xml:8: element type: Relax-NG validity error : Invalid attribute arch for element type foo.xml:9: element boot: Relax-NG validity error : Element os failed to validate content foo.xml:8: element type: Relax-NG validity error : Error validating value foo.xml:8: element type: Relax-NG validity error : Element type failed to validate content foo.xml:1: element domain: Relax-NG validity error : Invalid sequence in interleave foo.xml:1: element domain: Relax-NG validity error : Element domain failed to validate content foo.xml fails to validate Is there something that I'm doing wrong here? This is the libvirt that comes with RHEL5.5

2010/10/1 Stanley, Jon [Tech] <Jon.Stanley@gs.com>:
It seems that virt-xml-validate doesn't validate what *has* to be valid XML, that generated by virsh dumpxml against a running domain:
[root@etc752365a ~]# virsh list Id Name State ---------------------------------- 2 rhel55 running 3 rhel53 running
[root@etc752365a ~]# virsh dumpxml rhel55 > foo.xml [root@etc752365a ~]# virt-xml-validate foo.xml foo.xml:8: element type: Relax-NG validity error : Invalid attribute arch for element type foo.xml:9: element boot: Relax-NG validity error : Element os failed to validate content foo.xml:8: element type: Relax-NG validity error : Error validating value foo.xml:8: element type: Relax-NG validity error : Element type failed to validate content foo.xml:1: element domain: Relax-NG validity error : Invalid sequence in interleave foo.xml:1: element domain: Relax-NG validity error : Element domain failed to validate content foo.xml fails to validate
Is there something that I'm doing wrong here? This is the libvirt that comes with RHEL5.5
I tested with current git head and I can reproduce validations errors for running domains. They come from the device alias element that is only in the XML for running domains, but missing in the domain.rng. I've fixed this device alias issue and will post the patch for it later today. But your validation errors refer to the arch attribute of the os element, so you're probably having a different problem. RHEL 5.5 comes with libvirt 0.6.3, latest version is 0.8.4. Maybe the problem has already be fixed in a newer version. Could you attach the dumpxml output that doesn't validate for you? So we can check in detail what the problem is. Maybe the problem is still there but I can't reproduce it with my setup. Matthias

-----Original Message----- From: Matthias Bolte [mailto:matthias.bolte@googlemail.com] Sent: Monday, October 04, 2010 6:03 AM To: Stanley, Jon [Tech] Cc: libvirt-users@redhat.com Subject: Re: [libvirt-users] virt-xml-validate b0rked?
But your validation errors refer to the arch attribute of the os element, so you're probably having a different problem.
RHEL 5.5 comes with libvirt 0.6.3, latest version is 0.8.4. Maybe the problem has already be fixed in a newer version.
After opening a support case, they had me replace 'rhel5.4.0' in the type element with 'pc' and it seemed to work well. I've attached the XML at any rate.

2010/10/4 Stanley, Jon [Tech] <Jon.Stanley@gs.com>:
-----Original Message----- From: Matthias Bolte [mailto:matthias.bolte@googlemail.com] Sent: Monday, October 04, 2010 6:03 AM To: Stanley, Jon [Tech] Cc: libvirt-users@redhat.com Subject: Re: [libvirt-users] virt-xml-validate b0rked?
But your validation errors refer to the arch attribute of the os element, so you're probably having a different problem.
RHEL 5.5 comes with libvirt 0.6.3, latest version is 0.8.4. Maybe the problem has already be fixed in a newer version.
After opening a support case, they had me replace 'rhel5.4.0' in the type element with 'pc' and it seemed to work well. I've attached the XML at any rate.
Yes, thats the problem. In your libvirt version "rhel5.4.0" is not allowed as machine attribute value by the domain XML schema. Until libvirt 0.7.6 the machine attribute was expected to have a value out of a small predefined set ("xenfv", "pc" or "isapc" for arch="x86_64"). Since 0.7.6 the machine attribute can contain basically any value. Matthias
participants (2)
-
Matthias Bolte
-
Stanley, Jon [Tech]