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

bug #3998: fix shutdown --hard for vcenter drivers

This commit is contained in:
Javi Fontan 2015-09-23 15:53:56 +02:00
parent 1177538744
commit 06c81c838a

View File

@ -784,7 +784,7 @@ class VCenterVm
case lcm_state
when "SHUTDOWN_POWEROFF", "SHUTDOWN_UNDEPLOY"
shutdown(deploy_id, hostname, lcm_state)
when "CANCEL", "LCM_INIT", "CLEANUP_RESUBMIT"
when "CANCEL", "LCM_INIT", "CLEANUP_RESUBMIT", "SHUTDOWN"
hid = VIClient::translate_hostname(hostname)
connection = VIClient.new(hid)
vm = connection.find_vm_template(deploy_id)
@ -797,9 +797,12 @@ class VCenterVm
end
detach_all_disks(vm) if keep_disks
vm.Destroy_Task.wait_for_completion
else
raise "LCM_STATE #{lcm_state} not supported for cancel"
end
end
############################################################################
# Saves a VM
# @param deploy_id vcenter identifier of the VM