Bug 757097

Summary: virt-xml-validate fails for VirtualBox domain
Product: [Community] Virtualization Tools Reporter: Lorin Hochstein <lorinh>
Component: libvirtAssignee: Libvirt Maintainers <libvirt-maint>
Status: CLOSED UPSTREAM QA Contact:
Severity: low Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: crobinso, dallan, eblake, xen-maint
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-11-28 16:23:51 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

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>