[Libguestfs] [PATCH] v2v: -i libvirt: use precheck also for xen+ssh sources

Pino Toscano ptoscano at redhat.com
Tue Oct 17 12:22:00 UTC 2017


Updates commit f87f254b2bcda09713d908451f29512ec4286626.
---
 v2v/input_libvirt_xen_ssh.ml | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/v2v/input_libvirt_xen_ssh.ml b/v2v/input_libvirt_xen_ssh.ml
index a1b1dfa1e..545a8f5da 100644
--- a/v2v/input_libvirt_xen_ssh.ml
+++ b/v2v/input_libvirt_xen_ssh.ml
@@ -34,16 +34,16 @@ class input_libvirt_xen_ssh password libvirt_uri parsed_uri scheme server guest
 object
   inherit input_libvirt password libvirt_uri guest
 
+  method precheck () =
+    if backend_is_libvirt () then
+      error (f_"because of libvirt bug https://bugzilla.redhat.com/1140166 you must set this environment variable:\n\nexport LIBGUESTFS_BACKEND=direct\n\nand then rerun the virt-v2v command.");
+    error_if_libvirt_does_not_support_json_backingfile ();
+    error_if_no_ssh_agent ()
+
   method source () =
     debug "input_libvirt_xen_ssh: source: scheme %s server %s"
           scheme server;
 
-    if backend_is_libvirt () then (
-      error (f_"because of libvirt bug https://bugzilla.redhat.com/1140166 you must set this environment variable:\n\nexport LIBGUESTFS_BACKEND=direct\n\nand then rerun the virt-v2v command.")
-    );
-    error_if_libvirt_does_not_support_json_backingfile ();
-    error_if_no_ssh_agent ();
-
     (* Get the libvirt XML.  This also checks (as a side-effect)
      * that the domain is not running.  (RHBZ#1138586)
      *)
-- 
2.13.6




More information about the Libguestfs mailing list