lib/esx.rb in esx-0.2.1 vs lib/esx.rb in esx-0.2.3

- old
+ new

@@ -4,11 +4,11 @@ require 'net/scp' require 'net/ssh' module ESX - VERSION = '0.2.1' + VERSION = '0.2.3' class Host attr_reader :address, :user, :password @@ -132,14 +132,17 @@ :key => 'bios.bootOrder', :value => 'ethernet0' } ] } + + # VMDK provided, replace the empty vmdk vm_cfg[:deviceChange].push(create_disk_spec(:disk_file => spec[:disk_file], :disk_type => spec[:disk_type], :disk_size => spec[:disk_size], :datastore => spec[:datastore])) + VM.wrap(@_datacenter.vmFolder.CreateVM_Task(:config => vm_cfg, :pool => @_datacenter.hostFolder.children.first.resourcePool).wait_for_completion) end def create_net_dev(spec) h = { @@ -333,9 +336,13 @@ # ] # } # vm_object.ReconfigVM_Task(:spec => spec).wait_for_completion #end vm_object.Destroy_Task.wait_for_completion + end + + def reset + vm_object.ResetVM_Task.wait_for_completion end def guest_info GuestInfo.wrap(vm_object.guest) end