mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-20 10:50:08 +03:00
feature #2911: Solve snapshot bugs in vCenter
This commit is contained in:
parent
3872deb3e8
commit
3ab34851fb
@ -34,8 +34,8 @@ snapshot_name = ARGV[1]
|
||||
host = ARGV[3]
|
||||
|
||||
begin
|
||||
VCenterDriver::VCenterVm.create_snapshot(deploy_id,
|
||||
host,
|
||||
puts VCenterDriver::VCenterVm.create_snapshot(deploy_id,
|
||||
host,
|
||||
snapshot_name)
|
||||
rescue Exception => e
|
||||
STDERR.puts "Snapshot of VM #{deploy_id} on host #{host} failed " +
|
||||
|
@ -38,7 +38,7 @@ begin
|
||||
host,
|
||||
snapshot_name)
|
||||
rescue Exception => e
|
||||
STDERR.puts "Snapshot of VM #{deploy_id} on host #{host} could not be " +
|
||||
STDERR.puts "Snapshot of VM #{deploy_id} on host #{host} could not be " +
|
||||
"reverted due to \"#{e.message}\""
|
||||
exit -1
|
||||
end
|
||||
|
@ -560,6 +560,8 @@ class VCenterVm
|
||||
vm = connection.find_vm_template(deploy_id)
|
||||
|
||||
vm.CreateSnapshot_Task(snapshot_hash).wait_for_completion
|
||||
|
||||
return snapshot_name
|
||||
end
|
||||
|
||||
############################################################################
|
||||
@ -583,7 +585,7 @@ class VCenterVm
|
||||
:removeChildren => true
|
||||
}
|
||||
|
||||
vm.RemoveSnapshot_Task(delete_snapshot_hash).wait_for_completion
|
||||
snapshot.RemoveSnapshot_Task(delete_snapshot_hash).wait_for_completion
|
||||
end
|
||||
|
||||
############################################################################
|
||||
@ -606,7 +608,7 @@ class VCenterVm
|
||||
:_this => snapshot
|
||||
}
|
||||
|
||||
vm.RevertToSnapshot_Task(revert_snapshot_hash).wait_for_completion
|
||||
snapshot.RevertToSnapshot_Task(revert_snapshot_hash).wait_for_completion
|
||||
end
|
||||
|
||||
########################################################################
|
||||
|
Loading…
x
Reference in New Issue
Block a user