1
0
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:
Tino Vazquez 2014-09-26 18:22:26 +02:00
parent 3872deb3e8
commit 3ab34851fb
3 changed files with 7 additions and 5 deletions

View File

@ -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 " +

View File

@ -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

View File

@ -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
########################################################################