mirror of
https://github.com/OpenNebula/one.git
synced 2026-11-22 20:54:49 +09:00
M #-: Better handling of VMware running flag
This commit is contained in:
4 files changed
+5
-1
No files matched your search
@@ -57,6 +57,8 @@ begin
|
||||
vm = VCenterDriver::VirtualMachine.new(vi_client, vm_ref, vm_id)
|
||||
|
||||
vm.poweroff_hard
|
||||
|
||||
vm.set_running(false, true)
|
||||
rescue StandardError => e
|
||||
if (retries += 1) < CONFIG[:retries]
|
||||
message = "Cancel VM #{vm_ref} failed due to "\
|
||||
|
||||
@@ -49,7 +49,7 @@ begin
|
||||
vm = VCenterDriver::VirtualMachine.new_without_id(vi_client, vm_ref)
|
||||
|
||||
vm.poweron
|
||||
vm.set_running(true)
|
||||
vm.set_running(true, true)
|
||||
rescue StandardError => e
|
||||
message = "Restore of VM #{vm_ref} on vCenter cluster "\
|
||||
"#{vc_cluster_name} failed due to "\
|
||||
|
||||
@@ -60,6 +60,7 @@ begin
|
||||
vm = VCenterDriver::VirtualMachine.new_without_id(vi_client, vm_ref)
|
||||
|
||||
vm.suspend
|
||||
vm.set_running(false, true)
|
||||
rescue StandardError => e
|
||||
message = "Save of VM #{vm_ref} on vCenter cluster "\
|
||||
"#{vc_cluster_name} failed due to "\
|
||||
|
||||
@@ -71,6 +71,7 @@ begin
|
||||
vm = VCenterDriver::VirtualMachine.new_without_id(vi_client, vm_ref)
|
||||
|
||||
vm.shutdown # Undeploy, Poweroff or Terminate
|
||||
vm.set_running(false, true)
|
||||
rescue StandardError => e
|
||||
if (retries += 1) < CONFIG[:retries]
|
||||
message = "Shutdown of VM #{vm_ref} on vCenter cluster "\
|
||||
|
||||
Reference in new issue
Block a user