mirror of
https://github.com/OpenNebula/one.git
synced 2026-11-23 05:04:56 +09:00
F #2320: change image format when converting to vmdk
This commit is contained in:
1 parent
441cf1f7f9
commit
002aabc41b
1 file changed
+6
@@ -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://", "")
|
||||
|
||||
Reference in new issue
Block a user