|
|
ffd6ed |
From 08eea12254c7c6d072028638965101e1a1c9448b Mon Sep 17 00:00:00 2001
|
|
|
ffd6ed |
From: Pino Toscano <ptoscano@redhat.com>
|
|
|
ffd6ed |
Date: Tue, 14 Apr 2015 16:37:55 +0200
|
|
|
ffd6ed |
Subject: [PATCH] v2v: pass libvirt connection URI to parse_libvirt_xml
|
|
|
ffd6ed |
|
|
|
ffd6ed |
This makes it possible to connect to the right libvirt.
|
|
|
ffd6ed |
|
|
|
ffd6ed |
(cherry picked from commit f7529522ab74d824c550d62953f0b8ecf1e61466)
|
|
|
ffd6ed |
---
|
|
|
ffd6ed |
v2v/input_libvirt_other.ml | 2 +-
|
|
|
ffd6ed |
v2v/input_libvirt_vcenter_https.ml | 2 +-
|
|
|
ffd6ed |
v2v/input_libvirt_xen_ssh.ml | 2 +-
|
|
|
ffd6ed |
v2v/input_libvirtxml.ml | 2 +-
|
|
|
ffd6ed |
v2v/input_libvirtxml.mli | 2 +-
|
|
|
ffd6ed |
5 files changed, 5 insertions(+), 5 deletions(-)
|
|
|
ffd6ed |
|
|
|
ffd6ed |
diff --git a/v2v/input_libvirt_other.ml b/v2v/input_libvirt_other.ml
|
|
|
ffd6ed |
index c704af6..e675427 100644
|
|
|
ffd6ed |
--- a/v2v/input_libvirt_other.ml
|
|
|
ffd6ed |
+++ b/v2v/input_libvirt_other.ml
|
|
|
ffd6ed |
@@ -70,7 +70,7 @@ object
|
|
|
ffd6ed |
*)
|
|
|
ffd6ed |
let xml = Domainxml.dumpxml ?password ?conn:libvirt_uri guest in
|
|
|
ffd6ed |
|
|
|
ffd6ed |
- let source, disks = Input_libvirtxml.parse_libvirt_xml ~verbose xml in
|
|
|
ffd6ed |
+ let source, disks = Input_libvirtxml.parse_libvirt_xml ?conn:libvirt_uri ~verbose xml in
|
|
|
ffd6ed |
let disks =
|
|
|
ffd6ed |
List.map (fun { Input_libvirtxml.p_source_disk = disk } -> disk) disks in
|
|
|
ffd6ed |
{ source with s_disks = disks }
|
|
|
ffd6ed |
diff --git a/v2v/input_libvirt_vcenter_https.ml b/v2v/input_libvirt_vcenter_https.ml
|
|
|
ffd6ed |
index 783b630..d0d860e 100644
|
|
|
ffd6ed |
--- a/v2v/input_libvirt_vcenter_https.ml
|
|
|
ffd6ed |
+++ b/v2v/input_libvirt_vcenter_https.ml
|
|
|
ffd6ed |
@@ -298,7 +298,7 @@ object
|
|
|
ffd6ed |
* that the domain is not running. (RHBZ#1138586)
|
|
|
ffd6ed |
*)
|
|
|
ffd6ed |
let xml = Domainxml.dumpxml ?password ?conn:libvirt_uri guest in
|
|
|
ffd6ed |
- let source, disks = parse_libvirt_xml ~verbose xml in
|
|
|
ffd6ed |
+ let source, disks = parse_libvirt_xml ?conn:libvirt_uri ~verbose xml in
|
|
|
ffd6ed |
|
|
|
ffd6ed |
(* Save the original source paths, so that we can remap them again
|
|
|
ffd6ed |
* in [#adjust_overlay_parameters].
|
|
|
ffd6ed |
diff --git a/v2v/input_libvirt_xen_ssh.ml b/v2v/input_libvirt_xen_ssh.ml
|
|
|
ffd6ed |
index cf5f1ae..ccb8bd0 100644
|
|
|
ffd6ed |
--- a/v2v/input_libvirt_xen_ssh.ml
|
|
|
ffd6ed |
+++ b/v2v/input_libvirt_xen_ssh.ml
|
|
|
ffd6ed |
@@ -46,7 +46,7 @@ object
|
|
|
ffd6ed |
* that the domain is not running. (RHBZ#1138586)
|
|
|
ffd6ed |
*)
|
|
|
ffd6ed |
let xml = Domainxml.dumpxml ?password ?conn:libvirt_uri guest in
|
|
|
ffd6ed |
- let source, disks = parse_libvirt_xml ~verbose xml in
|
|
|
ffd6ed |
+ let source, disks = parse_libvirt_xml ?conn:libvirt_uri ~verbose xml in
|
|
|
ffd6ed |
|
|
|
ffd6ed |
(* Map the <source/> filename (which is relative to the remote
|
|
|
ffd6ed |
* Xen server) to an ssh URI. This is a JSON URI looking something
|
|
|
ffd6ed |
diff --git a/v2v/input_libvirtxml.ml b/v2v/input_libvirtxml.ml
|
|
|
ffd6ed |
index 34f1bd1..357c46f 100644
|
|
|
ffd6ed |
--- a/v2v/input_libvirtxml.ml
|
|
|
ffd6ed |
+++ b/v2v/input_libvirtxml.ml
|
|
|
ffd6ed |
@@ -33,7 +33,7 @@ and parsed_source =
|
|
|
ffd6ed |
| P_source_file of string
|
|
|
ffd6ed |
| P_dont_rewrite
|
|
|
ffd6ed |
|
|
|
ffd6ed |
-let parse_libvirt_xml ~verbose xml =
|
|
|
ffd6ed |
+let parse_libvirt_xml ?conn ~verbose xml =
|
|
|
ffd6ed |
if verbose then
|
|
|
ffd6ed |
printf "libvirt xml is:\n%s\n" xml;
|
|
|
ffd6ed |
|
|
|
ffd6ed |
diff --git a/v2v/input_libvirtxml.mli b/v2v/input_libvirtxml.mli
|
|
|
ffd6ed |
index e450899..934c9c5 100644
|
|
|
ffd6ed |
--- a/v2v/input_libvirtxml.mli
|
|
|
ffd6ed |
+++ b/v2v/input_libvirtxml.mli
|
|
|
ffd6ed |
@@ -27,7 +27,7 @@ and parsed_source =
|
|
|
ffd6ed |
| P_source_file of string (** <source file> *)
|
|
|
ffd6ed |
| P_dont_rewrite (** s_qemu_uri is already set. *)
|
|
|
ffd6ed |
|
|
|
ffd6ed |
-val parse_libvirt_xml : verbose:bool -> string -> Types.source * parsed_disk list
|
|
|
ffd6ed |
+val parse_libvirt_xml : ?conn:string -> verbose:bool -> string -> Types.source * parsed_disk list
|
|
|
ffd6ed |
(** Take libvirt XML and parse it into a {!Types.source} structure and a
|
|
|
ffd6ed |
list of source disks.
|
|
|
ffd6ed |
|
|
|
ffd6ed |
--
|
|
|
ffd6ed |
1.8.3.1
|
|
|
ffd6ed |
|