[libvirt-users] Can't specify filename.xml when using virsh dumpxml

Eric Blake eblake at redhat.com
Wed Oct 29 16:53:56 UTC 2014

On 10/29/2014 10:44 AM, Allen Qiu wrote:
> Hi all,
> Do you have any idea about this error?
> virsh # dumpxml csg01win7test > domain.xml
> error: unexpected data '>'

You are running virsh in interactive mode.  Right now, dumpxml only
outputs to stdout, and '>' only works as a redirection for shell mode.
So, instead of:

$ virsh
virsh # dumpxml ...

you want to do:

$ virsh dumpxml ... > file

But yes, it would be nice to write a patch to virsh to add an optional
--output=file for each of the dumpxml family of functions, to write
there instead of stdout, so that you can get interactive virsh to output
xml to a file.  Would you like to try your hand at the patch?

Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 539 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvirt-users/attachments/20141029/3a413f44/attachment.sig>

More information about the libvirt-users mailing list