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

Matthias Bolte matthias.bolte at googlemail.com
Mon Oct 4 10:03:23 UTC 2010


2010/10/1 Stanley, Jon [Tech] <Jon.Stanley at 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 at etc752365a ~]# virsh list
>  Id Name                 State
> ----------------------------------
>  2 rhel55               running
>  3 rhel53               running
>
> [root at etc752365a ~]# virsh dumpxml rhel55 > foo.xml
> [root at 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




More information about the libvirt-users mailing list