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

Hi all, Do you have any idea about this error? virsh # dumpxml csg01win7test > domain.xml error: unexpected data '>' Regards, Allen 2014-10-28 Allen Qiu

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
participants (2)
-
Allen Qiu
-
Eric Blake