1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-16 22:50:10 +03:00

BugFix related to existings disks (#2174)

This commit is contained in:
Sergio Semedi Barranco 2018-06-12 14:38:55 +02:00 committed by Tino Vázquez
parent 42d08bf814
commit ba4a018a61

View File

@ -83,7 +83,7 @@ begin
vi_client = VCenterDriver::VIClient.new_from_host(host_id)
# Find disk info
disk = one_vm.retrieve_xmlelements("TEMPLATE/DISK[SOURCE=\"#{src_path_escaped}\"]").first rescue nil
disk = one_vm.retrieve_xmlelements("TEMPLATE/DISK[SOURCE=\"#{src_path_escaped}\"]").select{|e| e['DISK_ID'] == disk_id}.first rescue nil
raise "Cannot find disk element in vm template" if !disk