[Libguestfs] [PATCH] v2v: -o libvirt: dump XML for libvirt if verbose
Richard W.M. Jones
rjones at redhat.com
Thu Oct 22 15:36:42 UTC 2015
On Thu, Oct 22, 2015 at 02:40:49PM +0200, Pino Toscano wrote:
> When running in verbose mode, dump the XML we created for libvirt:
> this way it is easier to debug mismatches between what we want to setup
> in libvirt, and what actually gets defined.
> ---
> v2v/output_libvirt.ml | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/v2v/output_libvirt.ml b/v2v/output_libvirt.ml
> index abdd410..f86f336 100644
> --- a/v2v/output_libvirt.ml
> +++ b/v2v/output_libvirt.ml
> @@ -407,6 +407,12 @@ class output_libvirt oc output_pool = object
> DOM.doc_to_chan chan doc;
> close_out chan;
>
> + if verbose () then (
> + printf "resulting XML for libvirt:\n%!";
> + DOM.doc_to_chan stdout doc;
> + printf "\n%!";
> + );
> +
> (* Define the domain in libvirt. *)
> let cmd =
> match oc with
ACK.
Rich.
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
Fedora Windows cross-compiler. Compile Windows programs, test, and
build Windows installers. Over 100 libraries supported.
http://fedoraproject.org/wiki/MinGW
More information about the Libguestfs
mailing list