Bug 757097 - virt-xml-validate fails for VirtualBox domain
Summary: virt-xml-validate fails for VirtualBox domain
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Virtualization Tools
Classification: Community
Component: libvirt
Version: unspecified
Hardware: All
OS: All
unspecified
low
Target Milestone: ---
Assignee: Libvirt Maintainers
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-11-25 13:30 UTC by Lorin Hochstein
Modified: 2011-11-28 16:23 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-11-28 16:23:51 UTC
Embargoed:


Attachments (Terms of Use)

Description Lorin Hochstein 2011-11-25 13:30:49 UTC
Description of problem:

When validating against a domain file of type 'vbox', virt-xml-validate will return an error.


How reproducible:

Always


Steps to Reproduce:
1. Create a valid domain file with type 'vbox'. For example (simple.xml):

<domain type='vbox'>
  <name>vbox</name>
  <os><type>hvm</type></os>
  <memory>654321</memory>
</domain>


2. Run virt-xml-validate  simple.xml 

  
Actual results:

simple.xml:1: element domain: Relax-NG validity error : Element domain failed to validate attributes
simple.xml fails to validate

Expected results:

simple.xml validates

Comment 1 Lorin Hochstein 2011-11-25 13:49:27 UTC
Looks like the issue is in docs/schemas/domaincommon.rng, there is no vbox option:


  <define name="hvs">
    <attribute name="type">
      <choice>
        <value>xen</value>
        <value>kvm</value>
        <value>kqemu</value>
        <value>qemu</value>
        <value>lxc</value>
        <value>openvz</value>
        <value>test</value>
      </choice>
    </attribute>
  </define>

Comment 2 Dave Allan 2011-11-28 01:25:26 UTC
Lorin, you should mention this on the libvirt upstream list as well, if you haven't already.  I'm not sure how much attention the people who work on the vbox driver pay to bugzilla.

Comment 3 Lorin Hochstein 2011-11-28 14:29:24 UTC
(In reply to comment #2)
> Lorin, you should mention this on the libvirt upstream list as well, if you
> haven't already.  I'm not sure how much attention the people who work on the
> vbox driver pay to bugzilla.

Thanks for the heads-up, Dave. 

I posted it here:  https://www.redhat.com/archives/libvir-list/2011-November/msg01501.html

Comment 4 Eric Blake 2011-11-28 16:23:51 UTC
Now committed:

commit 8078a90a24fc9bb4dd0aa8bfd3fde15fe5f3d149
Author: Lorin Hochstein <lorin>
Date:   Mon Nov 28 09:26:57 2011 -0500

    conf: make virt-xml-validate work with vbox domains
    
    virt-xml-validate fails when run on a domain XML file of type 'vbox'.
    
    For failing test case, see https://bugzilla.redhat.com/show_bug.cgi?id=757097
    
    This patch updates the XML schema to accept all valid hypervisor
    types, as well as dropping hypervisor types that are not in use
    by the current code base.
    
    Signed-off-by: Eric Blake <eblake>


Note You need to log in before you can comment on or make changes to this bug.