Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 769506 - Need to improve virsh domxml-*-native command docs
Need to improve virsh domxml-*-native command docs
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt (Show other bugs)
6.3
x86_64 Linux
medium Severity medium
: rc
: ---
Assigned To: Alex Jia
Virtualization Bugs
:
: 782935 (view as bug list)
Depends On:
Blocks: 783001 783240 818039 852442 869585 878463
  Show dependency treegraph
 
Reported: 2011-12-21 00:19 EST by Alex Jia
Modified: 2012-11-20 08:45 EST (History)
10 users (show)

See Also:
Fixed In Version: libvirt-0.9.9-1.el6
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 783001 783240 (view as bug list)
Environment:
Last Closed: 2012-06-20 02:39:44 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2012:0748 normal SHIPPED_LIVE Low: libvirt security, bug fix, and enhancement update 2012-06-19 15:31:38 EDT

  None (edit)
Description Alex Jia 2011-12-21 00:19:09 EST
Description of problem:
As usual, users are very confused for what's the 'format' argument for 'domxml-from-native' and 'domxml-to-native' commands, then they often try some obvious values of 'xen' or 'xm' for a xen domain, 'qemu' for a qemu domain, however, they don't work. 

Because libvirt defines some internal 'format' value, but virsh help or virsh man page doesn't tell users these, so we need to improve virsh document, this bug is used for tracing the issue.

Version-Release number of selected component (if applicable):
# rpm -q libvirt-client
libvirt-client-0.9.8-1.el6.x86_64

How reproducible:
always

Steps to Reproduce:
1. virsh help virsh domxml-[from|to]-native
2. man virsh and see 'domxml-from-native' and 'domxml-to-native' section
3.
  
Actual results:
Users can't understand what's the 'format' argument.

Expected results:
Tell users value of 'format' for different hypervisor.


Additional info:
Comment 1 Alex Jia 2011-12-21 00:20:07 EST
In POST:

commit fbdfda14a1128b114dbdb608b60d6caf24c2489a
Author: Alex Jia <ajia@redhat.com>
Date:   Tue Dec 20 18:59:01 2011 +0800

    docs: improve virsh domxml-*-native command docs
    
    * tools/virsh.pod: improve virsh man page for domxml-from-native and
    domxml-to-native commands.
    
    Signed-off-by: Alex Jia <ajia@redhat.com>
Comment 2 Eric Blake 2011-12-21 08:27:44 EST
Also suggested on the mailing list:
https://www.redhat.com/archives/libvir-list/2011-December/msg00899.html

Someday, I'd like an API that allows introspection; something like:

int virConnectDomainXMLNativeFormats(virConnectPtr conn, char **names,
int *nnames, unsigned int flags)

where nnames of 0 queries the number of formats, and otherwise tells the
size of *names on input and tells how many entries in *names were
allocated on output.
Comment 4 tingting zheng 2012-01-09 22:20:39 EST
Verified the bug with:
libvirt-0.9.9-1.el6.x86_64
libvirt-client-0.9.9-1.el6.x86_64

# man virsh
       domxml-from-native format config
           Convert the file config in the native guest configuration
           format named by format to a domain XML format. For QEMU/KVM
           hypervisor, the format argument must be qemu-argv. For Xen
           hypervisor, the format argument may be xen-xm or xen-sxpr.

       domxml-to-native format xml
           Convert the file xml in domain XML format to the native
           guest configuration format named by format. For QEMU/KVM
           hypervisor, the format argument must be qemu-argv. For Xen
           hypervisor, the format argument may be xen-xm or xen-sxpr.
Comment 5 Eric Blake 2012-01-18 16:48:04 EST
*** Bug 782935 has been marked as a duplicate of this bug. ***
Comment 6 Eric Blake 2012-01-18 16:50:37 EST
An additional upstream patch idea was proposed for further improving things:

https://www.redhat.com/archives/libvir-list/2012-January/msg00604.html

This would add the 'virsh domxml-formats' command to list the formats supported by each hypervisor.  The v1 proposal added a new API, but comments on that thread suggested that using hypervisor capability xml would be sufficient instead, and I am still working on a v2 proposal.  Should we reopen this bug to include those improvements?
Comment 8 Dave Allan 2012-01-18 21:42:25 EST
(In reply to comment #6)
> An additional upstream patch idea was proposed for further improving things:
> 
> https://www.redhat.com/archives/libvir-list/2012-January/msg00604.html
> 
> This would add the 'virsh domxml-formats' command to list the formats supported
> by each hypervisor.  The v1 proposal added a new API, but comments on that
> thread suggested that using hypervisor capability xml would be sufficient
> instead, and I am still working on a v2 proposal.  Should we reopen this bug to
> include those improvements?

No, open a separate BZ.
Comment 10 Eric Blake 2012-01-19 13:19:40 EST
(In reply to comment #8)
> > instead, and I am still working on a v2 proposal.  Should we reopen this bug to
> > include those improvements?
> 
> No, open a separate BZ.

Done: bug 783240
Comment 12 errata-xmlrpc 2012-06-20 02:39:44 EDT
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.

http://rhn.redhat.com/errata/RHSA-2012-0748.html

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