Module: VMWareRevert
- Defined in:
- lib/vmware-revert.rb,
lib/vmware-revert/version.rb
Constant Summary collapse
- VERSION =
"0.0.5"
Instance Method Summary collapse
Instance Method Details
#revert(host, user, password, vmName) ⇒ Object
5 6 7 8 9 10 11 12 |
# File 'lib/vmware-revert.rb', line 5 def revert host, user, password, vmName vim = RbVmomi::VIM.connect({ :host => host, :user => user, :password => password, :insecure => true }) root = vim.serviceInstance.content.rootFolder dc = root.childEntity[0] vm = dc.find_vm(vmName) vm.RevertToCurrentSnapshot_Task.wait_for_completion vm.PowerOnVM_Task.wait_for_completion end |