diff --git a/src/datastore_mad/remotes/vcenter/cp b/src/datastore_mad/remotes/vcenter/cp index 9ec3fd4830..abc273fcaa 100755 --- a/src/datastore_mad/remotes/vcenter/cp +++ b/src/datastore_mad/remotes/vcenter/cp @@ -57,9 +57,15 @@ md5 = drv_action["/DS_DRIVER_ACTION_DATA/IMAGE/TEMPLATE/MD5"] sha1 = drv_action["/DS_DRIVER_ACTION_DATA/IMAGE/TEMPLATE/SHA1"] nodecomp = drv_action["/DS_DRIVER_ACTION_DATA/DATASTORE/TEMPLATE/NO_DECOMPRESS"] limit_bw = drv_action["/DS_DRIVER_ACTION_DATA/DATASTORE/TEMPLATE/LIMIT_TRANSFER_BW"] +format = drv_action["IMAGE/TEMPLATE/FORMAT"] check_valid img_path, "img_path" +if format != 'vmdk' && format != 'iso' + one_img = VCenterDriver::VIHelper.one_item(OpenNebula::Image, id) + one_img.replace({'FORMAT' => 'vmdk'}) +end + # if image is already in a vCenter datastore return the path if img_path.start_with? "vcenter://" img_path = img_path.sub("vcenter://", "")