[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Libguestfs] [PATCH] v2v: -o libvirt: dump XML for libvirt if verbose



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
-- 
2.1.0


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]