>From 87f448fc8b3243ad5d01acb65efb0c710d811a93 Mon Sep 17 00:00:00 2001 From: Shahar Havivi Date: Tue, 20 Jan 2015 14:41:23 +0200 Subject: [PATCH] v2v: -o vdsm should assume data domain at -os path Unlike -o rhev which have only one data domin, -o rhev can and usually does have multiple data domain. The path to vdsm is pre mounted so no need to assume nfs path with -os Example: -o vdsm -os /rhev/data-center// Bug-Url: https://bugzilla.redhat.com/1176591 Signed-off-by: Shahar Havivi --- v2v/output_vdsm.ml | 10 +++++----- v2v/virt-v2v.pod | 3 ++- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/v2v/output_vdsm.ml b/v2v/output_vdsm.ml index 492f586..17f10a5 100644 --- a/v2v/output_vdsm.ml +++ b/v2v/output_vdsm.ml @@ -63,9 +63,8 @@ object * name of the target files that eventually get written by the main * code. * - * 'os' is the output storage (-os nfs:/export). 'source' contains a - * few useful fields such as the guest name. 'targets' describes the - * destination files. We modify and return this list. + * 'os' is the output storage domain (-os /rhev/data//) + * this is already mounted path. * * Note it's good to fail here (early) if there are any problems, since * the next time we are called (in {!create_metadata}) we have already @@ -78,8 +77,9 @@ object error (f_"the number of '--vdsm-image-uuid' and '--vdsm-vol-uuid' parameters passed on the command line has to match the number of guest disk images (for this guest: %d)") (List.length targets); - let mp, uuid = - Output_rhev.mount_and_check_storage_domain verbose (s_"Data Domain") os in + let pos = (String.length os) - 36 in + let mp = String.sub os 0 (pos-1) in + let uuid = String.sub os pos 36 in dd_mp <- mp; dd_uuid <- uuid; if verbose then diff --git a/v2v/virt-v2v.pod b/v2v/virt-v2v.pod index a48bf59..cfd55fc 100644 --- a/v2v/virt-v2v.pod +++ b/v2v/virt-v2v.pod @@ -456,7 +456,8 @@ See L below. Set the output method to I. -This mode is similar to I<-o rhev> but is only used by RHEV VDSM +This mode is similar to I<-o rhev> but assume data domain as well +as data center /rhev/data-center// when it runs virt-v2v under VDSM control. =item B<-oa sparse> -- 1.9.3