1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-21 14:50:08 +03:00

F #4913: Fix tm cpds bug

This commit is contained in:
mcabrerizo 2017-04-28 12:41:46 +02:00
parent f6f1905862
commit 83db00d485

View File

@ -82,8 +82,10 @@ begin
if disk["OPENNEBULA_MANAGED"] && disk["OPENNEBULA_MANAGED"].downcase == "no"
unmanaged_keys = vm.get_unmanaged_keys
device_key = unmanaged_keys["opennebula.disk.#{disk["DISK_ID"]}"].to_i
image_path, source_ds_ref = vm.get_device_filename_and_ds_from_key(device_key)
src_path = image_path.sub(/^\[(.*?)\] /, "")
vc_disks = vm.get_vcenter_disks
disk_hash = vm.get_device_filename_and_ds_from_key(device_key, vc_disks)
src_path = disk_hash[:path_wo_ds]
source_ds_ref = disk_hash[:datastore]._ref
else
# Get image source path
src_path = VCenterDriver::FileHelper.get_img_name(disk, vmid, vm['name'])