mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-21 14:50:08 +03:00
F #2320: change image format when converting to vmdk
This commit is contained in:
parent
441cf1f7f9
commit
002aabc41b
@ -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://", "")
|
||||
|
Loading…
x
Reference in New Issue
Block a user