feature #2911: Solve snapshot bugs in vCenter

This commit is contained in:
Tino Vazquez authored and Ruben S. Montero committed 2014-10-10 10:26:14 +02:00
1 parent ef91387f7a
commit 8fb8560bae
3 files changed
+7 -5

No files matched your search

+2 -2
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 " +
+1 -1
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
@@ -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
########################################################################