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

F #1193: differentiate created templates on vCenter (#4394)

Signed-off-by: Carlos Herrera <cherrera@opennebula.systems>
This commit is contained in:
Carlos J. Herrera 2020-03-23 11:32:54 -04:00 committed by GitHub
parent 629a2a38d4
commit 9d40f595ad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 0 deletions

View File

@ -2050,6 +2050,8 @@ module VCenterDriver
# Add vCenter template name
new_template.update("VCENTER_TEMPLATE_NAME=#{@item.name}", true)
new_template.unlock()
end
def resize_unmanaged_disks

View File

@ -65,6 +65,13 @@ begin
vm = VCenterDriver::VirtualMachine.new_from_clone(vi_client,
drv_action,
vm_id)
if vm.instantiated_as_persistent?
template_id = vm.one_item['TEMPLATE/TEMPLATE_ID']
vm_template = OpenNebula::Template.new_with_id(template_id, OpenNebula::Client.new)
rc = vm_template.info()
raise if OpenNebula.is_error?(rc)
vm_template.lock(1)
end
end
if vm.is_powered_off?