Code Monkey home page Code Monkey logo

rbvmomi's Introduction

VMware has ended active development of this project, this repository will no longer be updated.

RbVmomi

gem-version Test Lint

This is a community-supported, open source project at VMware. It is built and maintained by programmers like you!

Introduction

RbVmomi is a Ruby interface to the vSphere API. Like the Perl and Java SDKs, you can use it to manage ESX and vCenter servers. The current release supports the vSphere 7.0 API. RbVmomi specific documentation is online and is meant to be used alongside the official documentation.

Installation

gem install rbvmomi

Usage

A simple example of turning on a VM:

require 'rbvmomi'

vim = RbVmomi::VIM.connect(host: 'foo', user: 'bar', password: 'baz')
dc = vim.serviceInstance.find_datacenter('my_datacenter') || fail('datacenter not found')
vm = dc.find_vm('my_vm') || fail('VM not found')
vm.PowerOnVM_Task.wait_for_completion

This code uses several RbVmomi extensions to the vSphere API for concision. The expanded snippet below uses only standard API calls and should be familiar to users of the Java SDK:

require 'rbvmomi'

vim = RbVmomi::VIM.connect(host: 'foo', user: 'bar', password: 'baz')
root_folder = vim.serviceInstance.content.rootFolder
dc = root_folder.childEntity.grep(RbVmomi::VIM::Datacenter).find { |x| x.name == 'mydatacenter' } || fail('datacenter not found')
vm = dc.vmFolder.childEntity.grep(RbVmomi::VIM::VirtualMachine).find { |x| x.name == 'my_vm' } || fail('VM not found')
task = vm.PowerOnVM_Task
filter = vim.propertyCollector.CreateFilter(
  spec: {
    propSet: [{ type: 'Task', all: false, pathSet: ['info.state']}],
    objectSet: [{ obj: task }]
  },
  partialUpdates: false
)
ver = ''
loop do
  result = vim.propertyCollector.WaitForUpdates(version: ver)
  ver = result.version
  break if ['success', 'error'].member?(task.info.state)
end
filter.DestroyPropertyFilter
raise(task.info.error) if task.info.state == 'error'

As you can see, the extensions RbVmomi adds can dramatically decrease the code needed to perform simple tasks while still letting you use the full power of the API when necessary. RbVmomi extensions are often more efficient than a naive implementation; for example, the find_vm method on VIM::Datacenter used in the first example uses the SearchIndex for fast lookups.

A few important points:

  • All class, method, parameter, and property names match the official documentation.
  • Properties are exposed as accessor methods.
  • Data object types can usually be inferred from context, so you may use a hash instead.
  • Enumeration values are simply strings.
  • Example code is included in the examples/ directory.
  • A set of helper methods for Optimist is included to speed up development of command line apps. See the included examples for usage.
  • If you don't have trusted SSL certificates installed on the host you're connecting to, you'll get an OpenSSL::SSL::SSLError "certificate verify failed". You can work around this by using the :insecure option to RbVmomi::VIM.connect.
  • This is a side project of a VMware employee and is entirely unsupported by VMware.

Built-in extensions are under lib/rbvmomi/vim/. You are encouraged to reopen VIM classes in your applications and add extensions of your own. If you write something generally useful please open a pull request so it can be merged back in

Development

Open an issue on the issues page or fork the project on GitHub and send a pull request.

Support

You can chat on Gitter or join the VMware {code} Slack team and join the #rbvmomi channel.

rbvmomi's People

Contributors

agrare avatar bortels avatar cdickmann avatar danielrife avatar darkarnium avatar dekz avatar dependabot[bot] avatar djberg96 avatar domcleal avatar dougm avatar dstefka avatar fryguy avatar hartsock avatar howels avatar jrgarcia avatar kumabuchi avatar nanliu avatar nirvdrum avatar picatz avatar pmenglund avatar puneetkatyal avatar rebyn avatar rlane avatar rmahique avatar scottjg avatar seandilda avatar tae8838 avatar tas50 avatar thanhngn avatar tomgiordano avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

rbvmomi's Issues

Vmware Customization doesn't (seem to) pick up run-once commands

Coming from a problem noticed in foreman vpshere integration, through fog-vsphere, ending over here.
See:
fog/fog-vsphere#37 (comment)
http://projects.theforeman.org/issues/14979

The following hash get's passed from foreman, through fog-vsphere, but never makes it to the customization. (at least, it doesn't execute the commands, and no evidence of them is found in any of the run once parts in windows.

hash that get's passed to rbvmomi

{"customization_spec"=>{},
 "globalIPSettings"=>{"dnsServerList"=>["8.8.8.8"], "dnsSuffixList"=>["local.lan"]},
 "identity"=>
  {"Sysprep"=>
    {"guiRunOnce"=>nil,
     "commandList"=>
      ["%SystemRoot%\\System32\\WindowsPowerShell\\v1.0\\powershell.exe -ExecutionPolicy Unrestricted -NoLogo -NoProfile -Command \"echo wood > C:\\test.txt\"",
       "%SystemRoot%\\System32\\WindowsPowerShell\\v1.0\\powershell.exe -ExecutionPolicy Unrestricted -NoLogo -NoProfile -Command \"(New-Object System.Net.WebClient).DownloadFile(\\\"http://yum.beheer.lan/windows/puppet/installpuppet.ps1\\\", \\\"c:\\installpuppet.ps1\\\")\"",
       "%SystemRoot%\\System32\\WindowsPowerShell\\v1.0\\powershell.exe -ExecutionPolicy Unrestricted -NoLogo -NoProfile -Command \"& \\\".\\installpuppet.ps1 -PuppetVersion 3.8.7-x64\\\"\"",
       "%SystemRoot%\\System32\\WindowsPowerShell\\v1.0\\powershell.exe -ExecutionPolicy Unrestricted -NoLogo -NoProfile -Command \"(New-Object System.Net.WebClient).DownloadFile(\\\"http://foreman.local.lan/unattended/built?token=\\\", \\\"c:\\foremaninstalled.txt\\\")\""],
     "guiUnattended"=>{"autoLogon"=>true, "autoLogonCount"=>1, "password"=>{"plainText"=>true, "value"=>"password"}, "timeZone"=>110},
     "identification"=>{"joinWorkgroup"=>"WORKGROUP"},
     "licenseFilePrintData"=>{"autoMode"=>"perSeat"},
     "userData"=>{"computerName"=>"w2k8r2-test", "fullName"=>"fullname", "orgName"=>"Organization", "productId"=>"Valid VLK license"}}},
 "nicSettingMap"=>
  [{"adapter"=>
     {"dnsDomain"=>"beheer.lan", "dnsServerList"=>["8.8.8.8"], "gateway"=>["1.2.3.4"], "ip"=>"1.2.3.5", "subnetMask"=>"255.255.255.0"}}],
 "options"=>{"changeSID"=>true, "deleteAccounts"=>"false`"}}

Any idea what's going on?

find_vm() fails for some VM's and not others

I have a bunch of identical VMs named ac-dev-01, ac-dev-02, ac-dev-03, ac-dev-04 ...
and what i'm seeing is that for one of them, dc.find_vm() fails to find the VM ... no idea why....

Add a xsd:int support

By default, all integer types are serialized with xsi:type="xsd:long", but "xsd:int" is required to remove ClusterRuleSpec with ReconfigureComputeResource_Task. For example, this will fail:

<spec xsi:type="ClusterConfigSpecEx">
<rulesSpec xsi:type="ClusterRuleSpec">
<operation>remove</operation>
<removeKey xsi:type="xsd:long">1</removeKey>
<info xsi:type="ClusterAntiAffinityRuleSpec">
<key>1</key>
<name>rul1</name>
<vm type="VirtualMachine">vm-387</vm>
<vm type="VirtualMachine">vm-64</vm>
<vm type="VirtualMachine">vm-8435</vm>
<vm type="VirtualMachine">vm-8434</vm>
</info>
</rulesSpec>
</spec>

and this will work:

<spec xsi:type="ClusterConfigSpecEx">
<rulesSpec xsi:type="ClusterRuleSpec">
<operation>remove</operation>
<removeKey xsi:type="xsd:int">1</removeKey>
<info xsi:type="ClusterAntiAffinityRuleSpec">
<key>1</key>
<name>rul1</name>
<vm type="VirtualMachine">vm-387</vm>
<vm type="VirtualMachine">vm-64</vm>
<vm type="VirtualMachine">vm-8435</vm>
<vm type="VirtualMachine">vm-8434</vm>
</info>
</rulesSpec>
</spec>

PerformanceManager.rb redefines Time.to_datetime

Why does PerformanceManager redefine this std library method? I can get the fractional second but the UTC offset looks plain wrong. This makes it difficult to use this library in any application that uses this method!

PBM methods are missing from vmodl.db

Starting with v1.9.0 all of our PBM calls are failing:

vim = RbVmomi::VIM.connect(vim_connect_opts)
pbm = RbVmomi::PBM.connect(vim, pbm_connect_opts)
resourceType = RbVmomi::PBM::PbmProfileResourceType(:resourceType => "STORAGE")
NoMethodError: undefined method `PbmProfileResourceType' for RbVmomi::PBM:Class
    from /var/lib/gems/2.3.0/gems/rbvmomi-1.9.2/lib/rbvmomi/connection.rb:260:in `method_missing'

None of the PBM methods are defined in vmodl.db anymore, git bisect points to 5ed2c41

git bisect start v1.9.0 v1.8.2
git bisect run grep PbmQueryProfile vmodl.db
5ed2c41516a066907dc2b807152cf505469dfdca is the first bad commit

It looks like when vmodl.db was updated for 6.0 all SPBM types and methods got dropped.

Add a Gemfile for the gemspec

To make it easier for devs to help, include a Gemfile (no Gemfile.lock) so they can run "bundle install" to get all the dependencies.

Invalid argument @ rb_sysopen when deploygin ovf files on Windows

While PR are not merged, I just wanted to document a problem on Windows and a possible fix.

After generating box in the ovf format, if you try to use them to create new vagrant boxes on a Windows machine, you will encounter the following error:

$ vagrant up
...
An unexpected error occurred when executing the action on the
'centos65-build-1' machine. Please report this as a bug:

Invalid argument @ rb_sysopen - file://C:/Users/mpereira/.vagrant.d/boxes/centos65-build/0/vmware_ovf/centos65-build.ovf

C:/HashiCorp/Vagrant/embedded/lib/ruby/2.2.0/open-uri.rb:36:in `initialize'
C:/HashiCorp/Vagrant/embedded/lib/ruby/2.2.0/open-uri.rb:36:in `open'
C:/HashiCorp/Vagrant/embedded/lib/ruby/2.2.0/open-uri.rb:36:in `open'
C:/Users/mpereira/.vagrant.d/gems/gems/vagrant-rbvmomi-1.8.1/lib/rbvmomi/utils/deploy.rb:118:in `upload_ovf_as_template'
C:/Users/mpereira/.vagrant.d/gems/gems/vagrant-vcenter-0.3.2/lib/vagrant-vcenter/action/inventory_check.rb:82:in `vcenter_upload_box'
C:/Users/mpereira/.vagrant.d/gems/gems/vagrant-vcenter-0.3.2/lib/vagrant-vcenter/action/inventory_check.rb:122:in `vcenter_check_inventory'
C:/Users/mpereira/.vagrant.d/gems/gems/vagrant-vcenter-0.3.2/lib/vagrant-vcenter/action/inventory_check.rb:21:in `call'
C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/warden.rb:34:in `call'
C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/warden.rb:95:in `block in finalize_action'
C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/warden.rb:34:in `call'
C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/warden.rb:34:in `call'
C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/builtin/handle_box.rb:56:in `call'
C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/warden.rb:34:in `call'
C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/warden.rb:95:in `block in finalize_action'
C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/warden.rb:34:in `call'
C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/warden.rb:34:in `call'
C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/builder.rb:116:in `call'
C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/runner.rb:66:in `block in run'
C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/util/busy.rb:19:in `busy'
C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/runner.rb:66:in `run'
C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/builtin/call.rb:53:in `call'
C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/warden.rb:34:in `call'
C:/Users/mpereira/.vagrant.d/gems/gems/vagrant-vcenter-0.3.2/lib/vagrant-vcenter/action/connect_vcenter.rb:32:in `call'
C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/warden.rb:34:in `call'
C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/builtin/config_validate.rb:25:in `call'
C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/warden.rb:34:in `call'
C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/builder.rb:116:in `call'
C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/runner.rb:66:in `block in run'
C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/util/busy.rb:19:in `busy'
C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/runner.rb:66:in `run'
C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/machine.rb:224:in `action_raw'
C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/machine.rb:199:in `block in action'
C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/environment.rb:561:in `lock'
C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/machine.rb:185:in `call'
C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/machine.rb:185:in `action'
C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/batch_action.rb:82:in `block (2 levels) in run'

This is due to a bug in lib/rbvmomi/utils/deploy.rb which treats windows path names as URI and discards the "host" part which removes the root driver letter from the file path.

I fixed this problem in my fork with this commit: f4f397f
But as it requires the os gem, I'm waiting on the PR #33 to be resolved before creating a proper PR. For the moment, you need to add the os gem yourself with:

$ vagrant plugin install os --plugin-version 0.9.6

Ruby 1.9.3p392 (and probably any 1.9 Ruby) incorrectly stringify `RbVmomi::Fault` in `raise`

One of the semantic changes in Ruby 1.9 was to start using methods like String#to_str blindly, and relying on the MethodMissing exception to determine that the facility isn't supported.

This, in turn, leads to calling raise on an explicitly created instance of RbVmomi::Fault (from 1.6.0) raising a RuntimeError instance - because RbVmomi::Fault delegates to_str to the @fault member, and that responds with a string, so Kernel#raise treats it as if you called raise RbVmomi::Fault.new(...).to_s instead.

1.9.3p392 :002 > begin
1.9.3p392 :003 >     raise RbVmomi::Fault.new('foo', 'bar')
1.9.3p392 :004?>   rescue Exception => e
1.9.3p392 :005?>     e.class
1.9.3p392 :006?>   end
 => RuntimeError

I discovered this in a test where we stubbed out raising the exception class, but it would also apply to all the instances in the gem that raise on a manually created RbVmomi::Fault class - they will throw RuntimeError, and bypass explicit catching in at least some versions of Ruby 1.9.3.

The easiest resolution to this is to exclude to_str from the method_missing implementation, allowing it to raise the traditional NoMethodError exception, and through that cause the Ruby runtime to behave as expected.

Vsphere answers to some request with binary blobs

Greetings !

I have a little issue with rbvmomi.
It might actually come from the vsphere provider for all I know, but it turns out that some specific request, regardless of the context in which they're made, get answered with binary blobs.

I slightly modified trivial_soap.rb to output the response.body.
It usually contains XML, as is expected, but when I am trying to get the config attribute of a VirtualMachine managed object, it only contains unreadable data.

These are the headers from the failing requests:

<env:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <env:Body>
    <RetrieveProperties xmlns="urn:vim25">
      <_this type="PropertyCollector">propertyCollector</_this>
      <specSet xsi:type="PropertyFilterSpec">
        <propSet xsi:type="PropertySpec">
          <type>VirtualMachine</type>
          <pathSet>config</pathSet>
        </propSet>
        <objectSet xsi:type="ObjectSpec">
          <obj type="VirtualMachine">vm-447</obj>
        </objectSet>
      </specSet>
    </RetrieveProperties>
  </env:Body>
</env:Envelope>

I wonder why is this happening to me ?

I also wonder if it would be a good idea to add a check after all requests to check whether the vsphere sdk answer is intact ? That would allow to raise a more explicit exception (right now it's just Nokogiri freaking out because he can't find soapenv:Body in the response).

"host_mo_ref.config.storageDevice.plugStoreTopology.device.lun" returns nil

try to get key of mapped Lun device by calling host_mo_ref.config.storageDevice.plugStoreTopology.device.lun, but keep got nil. according to VIM development guidence, this should return an object of Lun(ScsiLun). should I change to some other way with Rbvimomi function invocation to reach the goal? Looking forward to suggestions on this problem and sharing of best dev practice with Rbvmomi.

Can't retrieve configuration property from HostSnmpSystem

Hi

I'm trying to pull our SNMP configuration (specifically communities) from the API. The HostSnmpSystem documentation says that there should be a configuration property to return a HostSnmpConfigSpec object. I see this exposed by the API but when I try and call it I get a failure saying missing property. I'm connected using an administrative user with global permissions.

[4] pry(#<Puppet::Type::Esx_snmp_community::ProviderDefault>)> ls conf.snmpSystem
RbVmomi::BasicTypes::ManagedObject#methods: ==  []  _call  _connection  _get_property  _ref  _set_property  collect  collect!  eql?  hash  pretty_print  to_s  wait_until
RbVmomi::VIM::HostSnmpSystem#methods: ReconfigureSnmpAgent  ReconfigureSnmpAgent!  SendTestNotification  SendTestNotification!  configuration  configuration=  limits  limits=
instance variables: @connection  @ref  @soap

Trying to access the configuration property generates....

[3] pry(#<Puppet::Type::Esx_snmp_community::ProviderDefault>)> conf.snmpSystem.configuration
RbVmomi::Fault: SystemError:
from /opt/puppetlabs/puppet/lib/ruby/gems/2.1.0/gems/rbvmomi-1.9.2/lib/rbvmomi/basic_types.rb:198:in `_get_property'

I've traced it down to the _get_property call in basic_types.rb and have been trying to get more information out of it, here's what I've got so far;

When calling configManager.snmpSystem.configuration ....

From: /opt/puppetlabs/puppet/lib/ruby/gems/2.1.0/gems/rbvmomi-1.8.2/lib/rbvmomi/basic_types.rb @ line 189 RbVmomi::BasicTypes::ManagedObject#_get_property:

    182:   def _get_property sym
    183:     ret = @connection.propertyCollector.RetrieveProperties(:specSet => [{
    184:       :propSet => [{ :type => self.class.wsdl_name, :pathSet => [sym.to_s] }],
    185:       :objectSet => [{ :obj => self }],
    186:     }])[0]
    187:
    188: require 'pry'
 => 189: binding.pry

Stop here and see what was returned....

[7] pry(#<HostSnmpSystem>)> ret
=> ObjectContent(
  dynamicProperty: [],
  missingSet: [MissingProperty(
     dynamicProperty: [],
     fault: LocalizedMethodFault( fault: SystemError( faultMessage: [], reason: "unexpected error reading property" ), localizedMessage: "" ),
     path: "configuration"
   )],
  obj: HostSnmpSystem("snmpSystem-63"),
  propSet: []
)

And the values used in the above call...

[8] pry(#<HostSnmpSystem>)> self
=> HostSnmpSystem("snmpSystem-63")
[9] pry(#<HostSnmpSystem>)> self.class.wsdl_name
=> "HostSnmpSystem"
[10] pry(#<HostSnmpSystem>)> sym
=> :configuration
[11] pry(#<HostSnmpSystem>)>

Any ideas?

Dependency Management

rbVmomi's Rakefile needs yard and jeweler to bootstrap. It seems like these dependencies should be expressed ahead of time somehow.

(TODO: fix this or learn why we don't need to)

EDIT:

I'm basing the need for this on the following session:

hartsocks@ShawnH:~/RubymineProjects/rbvmomi$ rvm use 1.9.3
Using /Users/hartsocks/.rvm/gems/ruby-1.9.3-p547
hartsocks@ShawnH:~/RubymineProjects/rbvmomi$ gem install yard
Fetching: yard-0.8.7.4.gem (100%)
Successfully installed yard-0.8.7.4
Installing ri documentation for yard-0.8.7.4
1 gem installed
hartsocks@ShawnH:~/RubymineProjects/rbvmomi$ rake install --trace
Jeweler not available. Install it with: gem install jeweler
Rcov not available. Install it with: gem install rcov
rake aborted!
Don't know how to build task 'install'
/Users/hartsocks/.rvm/gems/ruby-1.9.3-p547@global/gems/rake-10.3.2/lib/rake/task_manager.rb:62:in `[]'
/Users/hartsocks/.rvm/gems/ruby-1.9.3-p547@global/gems/rake-10.3.2/lib/rake/application.rb:149:in `invoke_task'
/Users/hartsocks/.rvm/gems/ruby-1.9.3-p547@global/gems/rake-10.3.2/lib/rake/application.rb:106:in `block (2 levels) in top_level'
/Users/hartsocks/.rvm/gems/ruby-1.9.3-p547@global/gems/rake-10.3.2/lib/rake/application.rb:106:in `each'
/Users/hartsocks/.rvm/gems/ruby-1.9.3-p547@global/gems/rake-10.3.2/lib/rake/application.rb:106:in `block in top_level'
/Users/hartsocks/.rvm/gems/ruby-1.9.3-p547@global/gems/rake-10.3.2/lib/rake/application.rb:115:in `run_with_threads'
/Users/hartsocks/.rvm/gems/ruby-1.9.3-p547@global/gems/rake-10.3.2/lib/rake/application.rb:100:in `top_level'
/Users/hartsocks/.rvm/gems/ruby-1.9.3-p547@global/gems/rake-10.3.2/lib/rake/application.rb:78:in `block in run'
/Users/hartsocks/.rvm/gems/ruby-1.9.3-p547@global/gems/rake-10.3.2/lib/rake/application.rb:176:in `standard_exception_handling'
/Users/hartsocks/.rvm/gems/ruby-1.9.3-p547@global/gems/rake-10.3.2/lib/rake/application.rb:75:in `run'
/Users/hartsocks/.rvm/gems/ruby-1.9.3-p547@global/gems/rake-10.3.2/bin/rake:33:in `<top (required)>'
/Users/hartsocks/.rvm/gems/ruby-1.9.3-p547@global/bin/rake:23:in `load'
/Users/hartsocks/.rvm/gems/ruby-1.9.3-p547@global/bin/rake:23:in `<main>'
/Users/hartsocks/.rvm/gems/ruby-1.9.3-p547/bin/ruby_executable_hooks:15:in `eval'
/Users/hartsocks/.rvm/gems/ruby-1.9.3-p547/bin/ruby_executable_hooks:15:in `<main>'
hartsocks@ShawnH:~/RubymineProjects/rbvmomi$ gem install jeweler
Fetching: git-1.2.8.gem (100%)

After yard and jeweler are in place the gem bootstraps properly.

Add support for CD-ROMs / ISOs

A common approach to creating a new VM is to mount an ISO from a datastore and mark it as connected at power on. There's a few places where direct support for this would be handy. E.g., if VirtualMachine had utility method a la disks for CD-ROMs.

Gem install error on 1.9.0

On a new Ubuntu 16.04.1 install I see the following errors:

# gem install rbvmomi -v '1.9.0'
Building native extensions.  This could take a while...
ERROR:  Error installing rbvmomi:
    ERROR: Failed to build gem native extension.

    current directory: /var/lib/gems/2.3.0/gems/rbvmomi-1.9.0/ext
/usr/bin/ruby2.3 mkrf_conf.rb
Writing fake Rakefile

current directory: /var/lib/gems/2.3.0/gems/rbvmomi-1.9.0/ext
/usr/bin/ruby2.3 -rubygems /usr/share/rubygems-integration/all/gems/rake-10.5.0/bin/rake RUBYARCHDIR=/var/lib/gems/2.3.0/extensions/x86_64-linux/2.3.0/rbvmomi-1.9.0 RUBYLIBDIR=/var/lib/gems/2.3.0/extensions/x86_64-linux/2.3.0/rbvmomi-1.9.0
/usr/bin/ruby2.3: No such file or directory -- /usr/share/rubygems-integration/all/gems/rake-10.5.0/bin/rake (LoadError)

rake failed, exit code 1

Gem files will remain installed in /var/lib/gems/2.3.0/gems/rbvmomi-1.9.0 for inspection.
Results logged to /var/lib/gems/2.3.0/extensions/x86_64-linux/2.3.0/rbvmomi-1.9.0/gem_make.out

Contents of the log file: /var/lib/gems/2.3.0/extensions/x86_64-linux/2.3.0/rbvmomi-1.9.0/gem_make.out

current directory: /var/lib/gems/2.3.0/gems/rbvmomi-1.9.0/ext
/usr/bin/ruby2.3 mkrf_conf.rb
Writing fake Rakefile

current directory: /var/lib/gems/2.3.0/gems/rbvmomi-1.9.0/ext
/usr/bin/ruby2.3 -rubygems /usr/share/rubygems-integration/all/gems/rake-10.5.0/bin/rake RUBYARCHDIR=/var/lib/gems/2.3.0/extensions/x86_64-linux/2.3.0/rbvmomi-1.9.0 RUBYLIBDIR=/var/lib/gems/2.3.0/extensions/x86_64-linux/2.3.0/rbvmomi-1.9.0
/usr/bin/ruby2.3: No such file or directory -- /usr/share/rubygems-integration/all/gems/rake-10.5.0/bin/rake (LoadError)

rake failed, exit code 1

Basic Travis-CI support

As the community contributes code, it would be nice to have an integration with Travic-CI that would tell us if a given change breaks the build or not. Incorporating Travis-CI in a similar way to how pyVmomi has done can help evaluate the quality of contributions in a dispassionate and consistent way.

RuntimeError while deserializing returnval

I keep getting this almost randomly, I can't nail down what the cause is. It happens with task messages, or Vm responses anything.

There doesn't seem to be any issue with the XML either. I understand it may be a nokogiri error and not exactly RbVmomi.

Anyone else has any issues?

Nokogiri::XML::XPath::SyntaxError: Undefined namespace prefix: //soapenv:Body/*

ruby 2.0.0p576

vim = RbVmomi::VIM.connect host: '****', user: '***', password: '***', ssl: false

Nokogiri::XML::XPath::SyntaxError: Undefined namespace prefix: //soapenv:Body/*
from /Users/losingle/.rvm/rubies/ruby-2.0.0-p576/lib/ruby/gems/2.0.0/gems/nokogiri-1.6.6.2/lib/nokogiri/xml/searchable.rb:165:in evaluate' from /Users/losingle/.rvm/rubies/ruby-2.0.0-p576/lib/ruby/gems/2.0.0/gems/nokogiri-1.6.6.2/lib/nokogiri/xml/searchable.rb:165:inblock in xpath'
from /Users/losingle/.rvm/rubies/ruby-2.0.0-p576/lib/ruby/gems/2.0.0/gems/nokogiri-1.6.6.2/lib/nokogiri/xml/searchable.rb:156:in map' from /Users/losingle/.rvm/rubies/ruby-2.0.0-p576/lib/ruby/gems/2.0.0/gems/nokogiri-1.6.6.2/lib/nokogiri/xml/searchable.rb:156:inxpath'
from /Users/losingle/.rvm/rubies/ruby-2.0.0-p576/lib/ruby/gems/2.0.0/gems/rbvmomi-1.8.2/lib/rbvmomi/trivial_soap.rb:112:in request' from /Users/losingle/.rvm/rubies/ruby-2.0.0-p576/lib/ruby/gems/2.0.0/gems/rbvmomi-1.8.2/lib/rbvmomi/connection.rb:87:incall'
from /Users/losingle/.rvm/rubies/ruby-2.0.0-p576/lib/ruby/gems/2.0.0/gems/rbvmomi-1.8.2/lib/rbvmomi/basic_types.rb:205:in _call' from /Users/losingle/.rvm/rubies/ruby-2.0.0-p576/lib/ruby/gems/2.0.0/gems/rbvmomi-1.8.2/lib/rbvmomi/basic_types.rb:74:inblock (2 levels) in init'
from /Users/losingle/.rvm/rubies/ruby-2.0.0-p576/lib/ruby/gems/2.0.0/gems/rbvmomi-1.8.2/lib/rbvmomi/vim.rb:68:in serviceContent' from /Users/losingle/.rvm/rubies/ruby-2.0.0-p576/lib/ruby/gems/2.0.0/gems/rbvmomi-1.8.2/lib/rbvmomi/vim.rb:38:inblock in connect'
from /Users/losingle/.rvm/rubies/ruby-2.0.0-p576/lib/ruby/gems/2.0.0/gems/rbvmomi-1.8.2/lib/rbvmomi/vim.rb:36:in tap' from /Users/losingle/.rvm/rubies/ruby-2.0.0-p576/lib/ruby/gems/2.0.0/gems/rbvmomi-1.8.2/lib/rbvmomi/vim.rb:36:inconnect'
from (irb):13
from /Users/losingle/.rvm/rubies/ruby-2.0.0-p576/bin/irb:12:in `

'

expected xsd:anyType for 'value', got array - error while using vmware API

Hi,
I'm trying to apply host profile using vmware APIs.

execute_result = profile.ExecuteHostProfile(host: mob)
apply_task = @client.connection.serviceInstance.content.hostProfileManager.ApplyHostConfig_Task(host: mob, configSpec: execute_result.configSpec)

I got the following error while applying the profile:
expected xsd:anyType for 'value', got array

Also, the complete configSpec is being displayed.
I tried to convert it into string and still its not working.

Name clash with exterior class

First off, awesome project, was very happy I found this.

So I'm trying to use with a rails application and running into a name clash. I'm trying to get a virtual machine object, which has a network attribute that is of type Network[]. I have a model in my rails application called Network. This is causing an error in the deserialization. (Ensured this by removing the model and it worked properly)

RuntimeError: unexpected type Network (Network/#<Module:0x007fe9c893b368>/IpRanged/Group/CarrierWave ... )
    from /Users/charlesrudolph/.rvm/gems/ruby-1.9.3-p194/gems/rbvmomi-1.6.0/lib/rbvmomi/deserialization.rb:211:in `deserialize'
    from /Users/charlesrudolph/.rvm/gems/ruby-1.9.3-p194/gems/rbvmomi-1.6.0/lib/rbvmomi/deserialization.rb:174:in `block in deserialize'

Easier for me if I don't have to move this to an exterior script my rails app calls as having access to the models makes it easier. Just wondering if there is an easy fix to prevent clashes from outside classes

Cannot Clone to 2nd Cluster in a Datacenter

I have a VSphere datacenter with two clusters. I'm actually using Chef "knife vsphere" specifically, but the bug I'm running into seems to be related to RbVmomi.

I am unable to 'knife vsphere vm clone' any templates to the hosts in the second cluster. I get this error whenever I attempt.

/Users/matt/.rvm/gems/ruby-1.9.3-p125/gems/rbvmomi-1.5.1/lib/rbvmomi/vim/Task.rb:11:in `wait_for_completion': CannotAccessVmComponent: A component of the virtual machine is not accessible on the host. (RbVmomi::Fault)
    from /Users/matt/.rvm/gems/ruby-1.9.3-p125/gems/knife-vsphere-0.3.0/lib/chef/knife/vsphere_vm_clone.rb:195:in `run'
    from /Users/matt/.rvm/gems/ruby-1.9.3-p125/gems/chef-10.16.2/lib/chef/knife.rb:408:in `run_with_pretty_exceptions'
    from /Users/matt/.rvm/gems/ruby-1.9.3-p125/gems/chef-10.16.2/lib/chef/knife.rb:168:in `run'
    from /Users/matt/.rvm/gems/ruby-1.9.3-p125/gems/chef-10.16.2/lib/chef/application/knife.rb:123:in `run'
    from /Users/matt/.rvm/gems/ruby-1.9.3-p125/gems/chef-10.16.2/bin/knife:25:in `<top (required)>'
    from /Users/matt/.rvm/gems/ruby-1.9.3-p125/bin/knife:23:in `load'
    from /Users/matt/.rvm/gems/ruby-1.9.3-p125/bin/knife:23:in `<main>'

I can clone the template from the VSphere Client and it works fine. If I migrate the template to a host in the first cluster, then the 'knife vsphere vm clone' command works fine to a host in the first cluster.

Matt

PerformanceManager helper maps wrong counter

The 20s metrics return valid results, even for extended periods of time, but the 300s result sets are always empty:

irb(main):163:0> pm.retrieve_stats([hosts[2]], ['cpu.usagemhz'], {max_samples: 72, interval: '300', start_time: '2013-07-30 10:25:00PM'})
=> {HostSystem("host-254")=>{:sampleInfo=>[#<RbVmomi::VIM::PerfSampleInfo:0x00000004750540 @props={:dynamicProperty=>[], :timestamp=>2013-07-30 22:30:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x00000003a83e48 @props={:dynamicProperty=>[], :timestamp=>2013-07-30 22:35:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x00000003c32050 @props={:dynamicProperty=>[], :timestamp=>2013-07-30 22:40:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x00000003642f00 @props={:dynamicProperty=>[], :timestamp=>2013-07-30 22:45:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x00000003a08b30 @props={:dynamicProperty=>[], :timestamp=>2013-07-30 22:50:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x00000002f763e8 @props={:dynamicProperty=>[], :timestamp=>2013-07-30 22:55:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x0000000334bfe0 @props={:dynamicProperty=>[], :timestamp=>2013-07-30 23:00:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x00000003490220 @props={:dynamicProperty=>[], :timestamp=>2013-07-30 23:05:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x000000037e4a70 @props={:dynamicProperty=>[], :timestamp=>2013-07-30 23:10:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x000000036c2b10 @props={:dynamicProperty=>[], :timestamp=>2013-07-30 23:15:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x000000034d6ae0 @props={:dynamicProperty=>[], :timestamp=>2013-07-30 23:20:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x000000034c0358 @props={:dynamicProperty=>[], :timestamp=>2013-07-30 23:25:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x00000003bbbdd8 @props={:dynamicProperty=>[], :timestamp=>2013-07-30 23:30:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x00000003bbe588 @props={:dynamicProperty=>[], :timestamp=>2013-07-30 23:35:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x000000033b2f10 @props={:dynamicProperty=>[], :timestamp=>2013-07-30 23:40:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x000000033b9810 @props={:dynamicProperty=>[], :timestamp=>2013-07-30 23:45:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x000000033c6858 @props={:dynamicProperty=>[], :timestamp=>2013-07-30 23:50:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x0000000345b638 @props={:dynamicProperty=>[], :timestamp=>2013-07-30 23:55:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x0000000346f958 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 00:00:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x00000003475150 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 00:05:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x000000039fde88 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 00:10:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x00000003a0b178 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 00:15:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x0000000378b420 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 00:20:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x000000037a0eb0 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 00:25:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x00000003a722b0 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 00:30:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x000000034bd978 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 00:35:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x000000039cb320 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 00:40:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x00000003376cb8 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 00:45:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x000000038a9140 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 00:50:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x00000003950850 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 00:55:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x00000003990428 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 01:00:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x000000038fc340 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 01:05:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x00000003682420 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 01:10:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x00000003718920 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 01:15:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x00000003b06690 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 01:20:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x00000003b0b028 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 01:25:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x00000003b204a0 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 01:30:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x000000038543c0 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 01:35:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x0000000349c930 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 01:40:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x0000000372eb80 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 01:45:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x000000037232d0 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 01:50:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x00000003ad6530 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 01:55:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x00000003ad3628 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 02:00:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x00000003ad8d58 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 02:05:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x000000039ed2b8 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 02:10:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x000000035cccb0 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 02:15:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x00000003980848 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 02:20:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x000000039a8870 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 02:25:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x000000039adbb8 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 02:30:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x000000039aa468 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 02:35:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x000000036a6460 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 02:40:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x000000036f0100 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 02:45:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x00000003906188 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 02:50:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x000000036082b0 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 02:55:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x000000036051f0 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 03:00:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x0000000360a1a0 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 03:05:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x0000000362a9c8 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 03:10:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x00000003386e38 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 03:15:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x0000000338bfa0 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 03:20:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x00000003388f58 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 03:25:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x000000036461c8 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 03:30:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x000000036431a8 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 03:35:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x00000003a94428 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 03:40:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x00000003a99608 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 03:45:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x00000003c089a8 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 03:50:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x00000003c05a50 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 03:55:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x00000003c0e0d8 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 04:00:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x000000034319f0 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 04:05:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x000000036946c0 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 04:10:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x00000003691380 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 04:15:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x000000036962b8 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 04:20:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x000000035509a8 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 04:25:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x0000000355c0a0 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 04:30:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x00000003669510 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 04:35:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x000000036664a0 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 04:40:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x00000003746d48 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 04:45:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x0000000374c158 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 04:50:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x000000035e79c0 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 04:55:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x000000035e4680 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 05:00:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x000000035edc08 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 05:05:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x00000003b300f8 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 05:10:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x00000003b3c150 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 05:15:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x00000003b69498 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 05:20:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x00000003b6f5a0 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 05:25:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x00000003b6c788 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 05:30:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x00000003a76428 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 05:35:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x00000003a7c580 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 05:40:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x00000003bdf378 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 05:45:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x00000003bdc560 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 05:50:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x00000003be1e48 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 05:55:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x00000003bea5e8 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 06:00:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x00000003be7668 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 06:05:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x00000003bf5240 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 06:10:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x00000003518d78 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 06:15:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x00000003520b40 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 06:20:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x00000003528368 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 06:25:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x0000000352cf80 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 06:30:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x00000003529cb8 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 06:35:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x000000037f52f8 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 06:40:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x000000037fa168 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 06:45:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x00000003807f70 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 06:50:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x0000000380f270 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 06:55:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x0000000380c070 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 07:00:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x00000003814720 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 07:05:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x000000038c3db0 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 07:10:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x000000038ca818 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 07:15:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x000000038d9368 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 07:20:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x000000038d6528 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 07:25:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x000000038dcc48 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 07:30:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x00000003b8b2f0 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 07:35:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x00000003b90570 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 07:40:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x00000003b8d578 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 07:45:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x00000003b94a58 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 07:50:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x00000003ba2608 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 07:55:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x00000003ba8c38 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 08:00:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x00000003ba5d80 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 08:05:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x00000003c1ae00 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 08:10:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x00000003c21b88 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 08:15:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x00000003c33ae0 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 08:20:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x00000003c30bb0 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 08:25:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x00000003c35e30 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 08:30:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x00000003c3da90 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 08:35:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x00000003c3ac28 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 08:40:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x00000003c484e0 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 08:45:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x00000003c4e9d0 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 08:50:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x00000003c605e0 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 08:55:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x00000003c5d598 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 09:00:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x00000003c627f0 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 09:05:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x00000003c6a900 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 09:10:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x00000003c78668 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 09:15:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x00000003c758a0 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 09:20:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x00000003c886f8 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 09:25:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x00000003c7e928 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 09:30:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x00000003ce4d90 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 09:35:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x00000003ce1d20 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 09:40:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x00000003cea678 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 09:45:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x00000003cf79b8 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 09:50:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x00000003d004f0 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 09:55:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x00000003cfd688 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 10:00:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x00000003d0abf8 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 10:05:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x00000003d11700 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 10:10:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x00000003d0e910 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 10:15:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x00000003793c60 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 10:20:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x00000003790d30 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 10:25:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x00000003f2c9e0 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 10:30:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x00000004096290 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 10:35:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x000000045d05a8 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 10:40:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x00000004581228 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 10:45:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x00000003e18d10 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 10:50:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x00000003e15d18 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 10:55:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x000000035a78c0 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 11:00:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x00000004149480 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 11:05:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x00000004323fd0 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 11:10:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x00000004320ee8 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 11:15:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x000000039d8728 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 11:20:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x00000003ebc500 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 11:25:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x0000000432b780 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 11:30:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x00000004328788 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 11:35:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x000000045bd390 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 11:40:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x00000003d191a8 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 11:45:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x00000003a849d8 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 11:50:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x00000003a81490 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 11:55:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x000000036add78 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 12:00:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x000000036aac40 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 12:05:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x00000003a9dbe0 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 12:10:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x0000000467b200 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 12:15:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x000000041200f8 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 12:20:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x0000000411cca0 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 12:25:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x00000003c82398 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 12:30:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x00000004aff678 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 12:35:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x000000035565d8 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 12:40:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x00000003553798 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 12:45:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x000000038e3660 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 12:50:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x00000004a583c8 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 12:55:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x000000040a4cf0 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 13:00:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x000000040a1eb0 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 13:05:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x00000004ac7c78 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 13:10:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x00000004334498 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 13:15:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x00000004331590 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 13:20:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x00000004ab4da8 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 13:25:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x0000000465c800 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 13:30:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x000000049365d0 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 13:35:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x00000004933790 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 13:40:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x00000004855440 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 13:45:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x00000004a9fb60 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 13:50:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x0000000290a298 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 13:55:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x00000002907430 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 14:00:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x00000004816f60 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 14:05:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x0000000481c190 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 14:10:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x000000048194b8 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 14:15:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x00000003ebf548 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 14:20:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x00000003ec47f0 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 14:25:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x00000004832df0 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 14:30:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x000000048300c8 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 14:35:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x00000004835488 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 14:40:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x00000003d27050 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 14:45:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x00000003d24288 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 14:50:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x00000003d29580 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 14:55:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x00000003e9eed8 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 15:00:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x00000003e9c2c8 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 15:05:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x00000003ea1548 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 15:10:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x00000003ea67a0 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 15:15:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x00000003eccea0 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 15:20:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x00000003eca0b0 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 15:25:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x00000003ecf3f8 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 15:30:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x00000003ed4650 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 15:35:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x00000003ed1810 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 15:40:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x00000004682848 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 15:45:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x00000004687a78 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 15:50:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x0000000468cde8 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 15:55:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x0000000468a0c0 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 16:00:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x000000040705e0 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 16:05:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x0000000498c980 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 16:10:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x00000004989b18 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 16:15:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x0000000498ee60 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 16:20:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x00000004994090 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 16:25:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x00000004983da8 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 16:30:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x00000004980f18 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 16:35:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x0000000494c0d8 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 16:40:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x00000004951330 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 16:45:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x0000000494e4a0 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 16:50:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x00000004953680 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 16:55:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x00000004751120 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 17:00:00 UTC, :interval=>300}>, #<RbVmomi::VIM::PerfSampleInfo:0x000000049cc8a0 @props={:dynamicProperty=>[], :timestamp=>2013-07-31 17:05:00 UTC, :interval=>300}>],
 :metrics=>{}}}

Is there a requirement on the vCenter side to pull these metrics properly?
The host's storage charts (built on the 5 min historic data) populates properly:
http://imgur.com/Cd1NPLM

Thanks

Can't set manual MAC address when using template

I am cloning from a template and not a VM in order to create Vagrant machines; when attempting to set an address type I get a NotSupportedException and when attempting to set a MAC address I'm getting "The resource '###' is in use." I think this is because in clone.rb add_custom_address_type and add_custom_mac_address are being called on the template before the new VM has been created.

I changed my copy of clone.rb to clone first, with powerOn: false, then call add_custom_* on new_vm, all of which use ReconfigVM_Tasks. Then a PowerOnVM_Task starts the new machine. This approach has been working quite well in my testing; is there any reason it's not generally applicable? I'd be happy to open a pull request for review, but it may take some time as I'm not very proficient with Ruby and right now a number of extraneous ReconfigVM_Tasks are being executed which could be batched together. It might be better for someone more familiar with Ruby and this plugin to craft a more elegant solution.

Investigate alternative higher-performance XML processors

This is a low priority wishlist item from an IRC conversation in #rbvmomi-dev on freenode.

Based on pain points in nokogiri, around memory use, performance, and installation problems it's been suggested that we consider a different XML library. XML parser performance problems are not trivial and are not necessarily easily solved by simply swapping out a library. Some problems are endemic to a library's internal design and others are caused by poor a understanding of what performance characteristics we need to design our utility code for.

Background Research:

Possible candidates:

Possible courses of action:

  • Continue with Nokogiri but alter code so it is more efficient
  • Implement an alternative XML parser in a branch and bench mark it against the master
  • Alter the codebase to allow people to supply their own XML parsing module based on their performance needs
  • Do NOTHING. Because, really... is it worth the effort?

TODO:

  • Before doing anything: create unit tests to automatically and deterministically cover all XML document use-cases this establishes rbVmomi's current expected behavior. Do nothing before doing this as this base-test work allows us to evaluate fairly alternative implementations.
  • create performance metrics to evaluate XML processing speed fairly
  • develop multiple candidates for consideration in their own branches

NOTE:

  • This is a large change and should not be attempted lightly (it may be best to not even attempt the effort but we can at least document things here)
  • This library feeds a large ecosystem and many quirks may have become embedded as expectations and features
  • If someone really feels strongly that they need to do this then we can discuss it and coordinate efforts with other core developers.

Make this the default repository

It would be great to see this become the default repository in favour of rlane/rbvmomi. This repository being a fork means it is not as high on the search results when searching in git. People could be forgiven to think that rbvmomi is dead when looking at the source repo which was last updated 5 years ago. Given that at the time rlane was a vmware employee, one would hope that there is some hope for making this the default repo.

bug in utils/admission_control.rb

Module "VIM" is not undefined. Replace "VIM" by "RbVmomi::VIM" for the lines:
80/84/101/104/115/119/134/148/171/176/182/183/186/205/209/217/303/333/

For example:
L84:
@vm_folder ||= datacenter.vmFolder.traverse!(@vm_folder_path, VIM::Folder)
shouldn't that instead be:
@vm_folder ||= datacenter.vmFolder.traverse!(@vm_folder_path, RbVmomi::VIM::Folder)

vsphere 6.0 specific objects do not exist

vSphere 6.0 introduced cross vcenter migrations. The support for this feature was added by introducing service and folder attributes in VirtualMachineRelocateSpec. However, an attempt to create the spec ends with RuntimeError: unexpected property name service.

Used rbvmomi 1.8.2. Is there something I am missing or vmodl.db needs to be updated for vSphere 6.0?

Release 1.8.2

based on helpful input on #rbvmomi-dev I've pushed v1.8.2.pre to rubygems please test away. I'll keep the release as a prerelease until next Wednesday to allow for someone to yell stop if needed. I'll follow the same pattern on any subsequent releases.

Going forward I'll build a release issue to capture any conversations.

Not works with 5.1 API

It not works with 5.1 API version, that my hosting-provider has.

Example fails event before user is authenticated:

$ RBVMOMI_DEBUG=true RUBYOPT="-I./lib -rubygems" ruby examples/readme-1.rb           
Request:
<env:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><env:Body><RetrieveServiceContent xmlns="urn:vim25"><_this type="ServiceInstance">ServiceInstance</_this></RetrieveServiceContent></env:Body></env:Envelope>

Response (in 0.082 s)
<?xml version="1.0"?>

/Users/macbookpro/.rvm/gems/ruby-1.9.3-p327/gems/nokogiri-1.5.6/lib/nokogiri/xml/node.rb:159:in `evaluate': Undefined namespace prefix: //soapenv:Body/* (Nokogiri::XML::XPath::SyntaxError)
    from /Users/macbookpro/.rvm/gems/ruby-1.9.3-p327/gems/nokogiri-1.5.6/lib/nokogiri/xml/node.rb:159:in `block in xpath'
    from /Users/macbookpro/.rvm/gems/ruby-1.9.3-p327/gems/nokogiri-1.5.6/lib/nokogiri/xml/node.rb:150:in `map'
    from /Users/macbookpro/.rvm/gems/ruby-1.9.3-p327/gems/nokogiri-1.5.6/lib/nokogiri/xml/node.rb:150:in `xpath'
    from /Users/macbookpro/rails_proj/rbvmomi/lib/rbvmomi/trivial_soap.rb:112:in `request'
    from /Users/macbookpro/rails_proj/rbvmomi/lib/rbvmomi/connection.rb:87:in `call'
    from /Users/macbookpro/rails_proj/rbvmomi/lib/rbvmomi/basic_types.rb:203:in `_call'
    from /Users/macbookpro/rails_proj/rbvmomi/lib/rbvmomi/basic_types.rb:74:in `block (2 levels) in init'
    from /Users/macbookpro/rails_proj/rbvmomi/lib/rbvmomi/vim.rb:64:in `serviceContent'
    from /Users/macbookpro/rails_proj/rbvmomi/lib/rbvmomi/vim.rb:35:in `block in connect'
    from /Users/macbookpro/rails_proj/rbvmomi/lib/rbvmomi/vim.rb:34:in `tap'
    from /Users/macbookpro/rails_proj/rbvmomi/lib/rbvmomi/vim.rb:34:in `connect'
    from examples/readme-1.rb:39:in `<main>'

It fails here: https://github.com/vmware/rbvmomi/blob/master/lib/rbvmomi/trivial_soap.rb#L90 . It gets 404 when doing POST /sdk.

Search Folder by uuid => Instance

The code for searching a folder in the method findByUuid allows for searching by instanceUuid which is the only unchanging and completely unique identifier for a VM. However, this implementation of it forces the instanceUuid to always be false. It would be nice if we could pass in a parameter to allow usage of instance Uuid.

Relevant code: (In VIM/Folder.rb)
def findByUuid uuid, type=RbVmomi::VIM::VirtualMachine, dc=nil
propSpecs = {
:entity => self, :uuid => uuid, :instanceUuid => false,
:vmSearch => type == RbVmomi::VIM::VirtualMachine
}
propSpecs[:datacenter] = dc if dc
x = _connection.searchIndex.FindByUuid(propSpecs)
x if x.is_a? type
end

Note the force set of :instanceUuid to false with no option to make it true

after update to 1.8.1: unknown VMODL type AnyType

It happens while deserializing RetrieveProperties response

result =  connection.propertyCollector.RetrieveProperties(:specSet => [filter_spec]))
Response (in 0.006 s)
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<RetrievePropertiesResponse xmlns="urn:vim25">
<returnval><obj type="Folder">group-d1</obj><propSet><name>name</name><val xsi:type="xsd:string">Datacenters</val></propSet></returnval>
<returnval><obj type="Folder">group-h4</obj><propSet><name>name</name><val xsi:type="xsd:string">host</val></propSet>
<propSet><name>parent</name><val type="Datacenter" xsi:type="ManagedObjectReference">datacenter-2</val></propSet></returnval>
<returnval><obj type="ClusterComputeResource">domain-c788</obj><propSet><name>name</name><val xsi:type="xsd:string">ZBX</val></propSet>
<propSet><name>parent</name><val type="Folder" xsi:type="ManagedObjectReference">group-h4</val></propSet></returnval>
<returnval><obj type="ClusterComputeResource">domain-c7</obj><propSet><name>name</name><val xsi:type="xsd:string">CL01</val></propSet>
<propSet><name>parent</name><val type="Folder" xsi:type="ManagedObjectReference">group-h4</val></propSet></returnval>
<returnval><obj type="Folder">group-h12429</obj><propSet><name>name</name><val xsi:type="xsd:string">test</val></propSet>
<propSet><name>parent</name><val type="Folder" xsi:type="ManagedObjectReference">group-h4</val></propSet></returnval></RetrievePropertiesResponse>
</soapenv:Body>
</soapenv:Envelope>

/usr/lib64/ruby/gems/1.8/gems/rbvmomi-1.8.1/lib/rbvmomi/type_loader.rb:103:in `make_type': unknown VMODL type AnyType (RuntimeError)
        from /usr/lib64/ruby/gems/1.8/gems/rbvmomi-1.8.1/lib/rbvmomi/type_loader.rb:65:in `get'
        from /usr/lib/ruby/1.8/monitor.rb:242:in `synchronize'
        from /usr/lib64/ruby/gems/1.8/gems/rbvmomi-1.8.1/lib/rbvmomi/type_loader.rb:63:in `get'
        from /usr/lib64/ruby/gems/1.8/gems/rbvmomi-1.8.1/lib/rbvmomi/deserialization.rb:78:in `deserialize'
        from /usr/lib64/ruby/gems/1.8/gems/rbvmomi-1.8.1/lib/rbvmomi/deserialization.rb:116:in `traverse_data'
        from /usr/lib64/ruby/gems/1.8/gems/rbvmomi-1.8.1/lib/rbvmomi/deserialization.rb:98:in `each'
        from /usr/lib64/ruby/gems/1.8/gems/rbvmomi-1.8.1/lib/rbvmomi/deserialization.rb:98:in `traverse_data'
        from /usr/lib64/ruby/gems/1.8/gems/rbvmomi-1.8.1/lib/rbvmomi/deserialization.rb:81:in `deserialize'
        from /usr/lib64/ruby/gems/1.8/gems/rbvmomi-1.8.1/lib/rbvmomi/deserialization.rb:111:in `traverse_data'
        from /usr/lib64/ruby/gems/1.8/gems/rbvmomi-1.8.1/lib/rbvmomi/deserialization.rb:98:in `each'
        from /usr/lib64/ruby/gems/1.8/gems/rbvmomi-1.8.1/lib/rbvmomi/deserialization.rb:98:in `traverse_data'
        from /usr/lib64/ruby/gems/1.8/gems/rbvmomi-1.8.1/lib/rbvmomi/deserialization.rb:81:in `deserialize'
        from /usr/lib64/ruby/gems/1.8/gems/rbvmomi-1.8.1/lib/rbvmomi/connection.rb:68:in `parse_response'
        from /usr/lib64/ruby/gems/1.8/gems/rbvmomi-1.8.1/lib/rbvmomi/connection.rb:68:in `map'
        from /usr/lib64/ruby/gems/1.8/gems/rbvmomi-1.8.1/lib/rbvmomi/connection.rb:68:in `parse_response'
        from /usr/lib64/ruby/gems/1.8/gems/rbvmomi-1.8.1/lib/rbvmomi/connection.rb:90:in `call'
        from /usr/lib64/ruby/gems/1.8/gems/rbvmomi-1.8.1/lib/rbvmomi/basic_types.rb:205:in `_call'
        from /usr/lib64/ruby/gems/1.8/gems/rbvmomi-1.8.1/lib/rbvmomi/basic_types.rb:74:in `RetrieveProperties'
        from ./rclib.rb:355:in `get_all_clusters'
        from ./aar.rb:135

Single Sign-On Support

The library requires to provide username and password explicitly in the script body.
So I have to either store user credentials in version control, or configure them at runtime.

vCenter already supports single sign on, so that would be great if rbvmomi does it too.

Does not work with JRuby

Seems to be flat out broken under jruby

$ gem list 

*** LOCAL GEMS ***

rbvmomi (1.6.0, 1.5.1)
$ jruby -v
jruby 1.6.7.2 (ruby-1.9.2-p312) (2012-05-01 26e08ba) (Java HotSpot(TM) 64-Bit Server VM 1.6.0_37 [darwin-x86_64-java]
$ jirb
jruby-1.6.7.2 :001 > require 'rubygems'
jruby-1.6.7.2 :002 > require 'rbvmomi'
ArgumentError: invalid encoding in marshaling stream: I"
                                                    va
from org/jruby/RubyMarshal.java:148:in `load'
from /Users/kolbrich/.rvm/gems/jruby-1.6.7.2@adaptor-vmware/gems/rbvmomi-1.6.0/lib/rbvmomi/type_loader.rb:16:in `initialize'
from org/jruby/RubyIO.java:1139:in `open'
from /Users/kolbrich/.rvm/gems/jruby-1.6.7.2@adaptor-vmware/gems/rbvmomi-1.6.0/lib/rbvmomi/type_loader.rb:16:in `initialize'
from /Users/kolbrich/.rvm/gems/jruby-1.6.7.2@adaptor-vmware/gems/rbvmomi-1.6.0/lib/rbvmomi/connection.rb:251:in `load_vmodl'
from /Users/kolbrich/.rvm/gems/jruby-1.6.7.2@adaptor-vmware/gems/rbvmomi-1.6.0/lib/rbvmomi/vim.rb:92:in `VIM'
from /Users/kolbrich/.rvm/gems/jruby-1.6.7.2@adaptor-vmware/gems/rbvmomi-1.6.0/lib/rbvmomi/vim.rb:8:in `RbVmomi'
from /Users/kolbrich/.rvm/gems/jruby-1.6.7.2@adaptor-vmware/gems/rbvmomi-1.6.0/lib/rbvmomi/vim.rb:4:in `(root)'
from org/jruby/RubyKernel.java:1042:in `require'
from /Users/kolbrich/.rvm/rubies/jruby-1.6.7.2/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:55:in `require'
from /Users/kolbrich/.rvm/gems/jruby-1.6.7.2@adaptor-vmware/gems/rbvmomi-1.6.0/lib/rbvmomi/vim.rb:12:in `(root)'
from org/jruby/RubyKernel.java:1042:in `require'
from /Users/kolbrich/.rvm/gems/jruby-1.6.7.2@adaptor-vmware/gems/rbvmomi-1.6.0/lib/rbvmomi.rb:60:in `require'
from (irb):2:in `evaluate'
from org/jruby/RubyKernel.java:1088:in `eval'
from org/jruby/RubyKernel.java:1410:in `loop'
from org/jruby/RubyKernel.java:1197:in `catch'
from org/jruby/RubyKernel.java:1197:in `catch'

can't find Datastore without known name for Datacenter.find_datastore(name)

Using a fresh install of vsphere v5, i can browse with rvc and see my data store:

~ $ rvc 10.2.0.12
Install the "ffi" gem for better tab completion.
No VMRC available for OS darwin11.0
Using default username "root".
password: 
VMRC is not installed. You will be unable to view virtual machine consoles. Use the vmrc.install command to install it.
/10.2.0.12/ha-datacenter/vm> cd ..
/10.2.0.12/ha-datacenter> ls
0 datastores [datastore]/
1 computers [host]/
2 networks [network]/
3 vms [vm]/
/10.2.0.12/ha-datacenter> cd datastore
/10.2.0.12/ha-datacenter/datastore> ls
0 datastore1: 994.82GB 0.1%
/10.2.0.12/ha-datacenter/datastore> 

However using the ruby gem rbvmomi with the following code does not work:

vim = RbVmomi::VIM.connect(:host => HOST, :user => USER, :password => PASS, :insecure => true )
dc = vim.serviceInstance.find_datacenter(nil) or fail "datacenter not found"
puts dc.pretty_path
dataStore = dc.find_datastore("/")
puts dataStore 

Output is always nil no matter what I pass to dc.find_datastore, dc.find_compute_resource(...) works as expected as does dc.find_vm(...).

Why do I need to explicitly know the exact name of the datastore beforehand? Isn't "find" a search for something? I've been un able to find a way to walk a path to derive a name...

ManagedObjectReference type support is incomplete

When I try to create cluster vm antiaffinity rule, I need to fill AntiAffinityRuleSpec vm property with the list of ManagedObjectReference that points to VMs involved.
I try it like this:
moref = RbVmomi::BasicTypes::ManagedObjectReference(
:type => "VirtualMachine",
:value => vm_instance._ref )

But that doesn't work. Can you please help with this?

bug in utils/perfdump.rb

Line 339:

hosts_props = inventory.select{|k, v| k.is_a?(VIM::HostSystem)}

Shouldn't that instead be:

hosts_props = inventory.select{|k, v| k.is_a?(RbVmomi::VIM::HostSystem)}

selectedVnic method returns corrupted data?

Hi,

My environment:
ESXi 5.1 + vCenter 5.1
CentOS 6.4 x64 + ruby 1.9.3p448 + RbVmomi 1.6.0

I've successfully tryed to execute following commands (rails console with rbvmomi library):

opt = {:host=>'myvcenterhost',:user=>'myuser',:password=>'mypassword',:insecure=>true}
vim = RbVmomi::VIM.connect opt
dc = vim.serviceInstance.find_datacenter("datacenter_name") or fail "datacenter not found"
cluster = dc.hostFolder.childEntity.find { |x| x.name == 'cluster_name' } or fail "cluster not found"
host = cluster.host.find { |x| x.name == 'host_name' } or fail 'host not found'
hostvnicmanager = host.config.virtualNicManagerInfo
hostnetconfig = hostvnicmanager.netConfig
hostmgmt = hostnetconfig.find { |x| x.nicType == 'management' } or fail 'not found'
hostmgmtvnics = hostmgmt.selectedVnic

But all I've got at the last step is array of data which doesn't tell me anything to identify management vmk-s:

irb(main):009:0> hostmgmtvnics = hostmgmt.selectedVnic
[2014-06-03 13:09:36 +0300] => [#<RbVmomi::VIM::HostVirtualNic:0x000000094c0168 @props={:dynamicProperty=>[]}>, #<RbVmomi::VIM::HostVirtualNic:0x000000094bf768 @props={:dynamicProperty=>[]}>]

irb(main):010:0> hostmgmtvnics = hostmgmt.selectedVnic[0]
[2014-06-03 13:16:01 +0300] => #<RbVmomi::VIM::HostVirtualNic:0x000000094c0168 @props={:dynamicProperty=>[]}>

irb(main):011:0> hostmgmtvnics = hostmgmt.selectedVnic[0].key
[2014-06-03 13:19:10 +0300] => nil

Although I can see management interfaces with the MOB browser:

selectedVnic string[]

"management.key-vim.host.VirtualNic-vmk0"
"management.key-vim.host.VirtualNic-vmk1"

It seems there's a bug in retrieving list of strings in selectedVnic.

Not enough details when faulting

For example, I have "NoPermission: Permission to perform this operation was denied.". But the missing permission is in the XML response ref.

This should probably be done in Connection::parse_response.

I can propose a PR, but I need more info on the XML format of 'detail'.

deploymentOption support in OvfManager

Please add the deploymentOption value to parameters of DeployOVF, in OvfManager. This currently prevents rbvmomi from deploying useful OVAs like the vCenter Server Appliance (VCSA).

Something like:

/lib/rbvmomi/vim/OvfManager.rb:27

   ovfImportSpec = RbVmomi::VIM::OvfCreateImportSpecParams(
++    :deploymentOption => opts[:deploymentOption] || '',
      :hostSystem => opts[:host],
      :locale => "US",
      :entityName => opts[:vmName],
      :networkMapping => opts[:networkMappings].map{|from, to| RbVmomi::VIM::OvfNetworkMapping(:name => from, :network => to)},
      :propertyMapping => opts[:propertyMappings].to_a,
      :diskProvisioning => opts[:diskProvisioning]
    )

Unable to fetch RootFolder - RuntimeError: unknown VMODL type AnyType

Getting runtime error while trying to fetch the rootfolder, below is my code

vim = RbVmomi::VIM.connect host: fqdn, user: user, password: password, insecure: true
rootFolder = vim.serviceInstance.content.rootFolder

RuntimeError: unknown VMODL type AnyType
from /home/logan/.rvm/gems/ruby-2.0.0-p451/gems/rbvmomi-1.8.1/lib/rbvmomi/type_loader.rb:103:in make_type' from /home/logan/.rvm/gems/ruby-2.0.0-p451/gems/rbvmomi-1.8.1/lib/rbvmomi/type_loader.rb:65:inblock in get'
from /home/logan/.rvm/rubies/ruby-2.0.0-p451/lib/ruby/2.0.0/monitor.rb:211:in mon_synchronize' from /home/logan/.rvm/gems/ruby-2.0.0-p451/gems/rbvmomi-1.8.1/lib/rbvmomi/type_loader.rb:63:inget'
from /home/logan/.rvm/gems/ruby-2.0.0-p451/gems/rbvmomi-1.8.1/lib/rbvmomi/deserialization.rb:78:in deserialize' from /home/logan/.rvm/gems/ruby-2.0.0-p451/gems/rbvmomi-1.8.1/lib/rbvmomi/deserialization.rb:116:inblock in traverse_data'
from /home/logan/.rvm/gems/ruby-2.0.0-p451/gems/rbvmomi-1.8.1/lib/rbvmomi/deserialization.rb:98:in each' from /home/logan/.rvm/gems/ruby-2.0.0-p451/gems/rbvmomi-1.8.1/lib/rbvmomi/deserialization.rb:98:intraverse_data'
from /home/logan/.rvm/gems/ruby-2.0.0-p451/gems/rbvmomi-1.8.1/lib/rbvmomi/deserialization.rb:81:in deserialize' from /home/logan/.rvm/gems/ruby-2.0.0-p451/gems/rbvmomi-1.8.1/lib/rbvmomi/deserialization.rb:111:inblock in traverse_data'
from /home/logan/.rvm/gems/ruby-2.0.0-p451/gems/rbvmomi-1.8.1/lib/rbvmomi/deserialization.rb:98:in each' from /home/logan/.rvm/gems/ruby-2.0.0-p451/gems/rbvmomi-1.8.1/lib/rbvmomi/deserialization.rb:98:intraverse_data'
from /home/logan/.rvm/gems/ruby-2.0.0-p451/gems/rbvmomi-1.8.1/lib/rbvmomi/deserialization.rb:81:in deserialize' from /home/logan/.rvm/gems/ruby-2.0.0-p451/gems/rbvmomi-1.8.1/lib/rbvmomi/connection.rb:68:inblock in parse_response'
from /home/logan/.rvm/gems/ruby-2.0.0-p451/gems/rbvmomi-1.8.1/lib/rbvmomi/connection.rb:68:in map' from /home/logan/.rvm/gems/ruby-2.0.0-p451/gems/rbvmomi-1.8.1/lib/rbvmomi/connection.rb:68:inparse_response'
from /home/logan/.rvm/gems/ruby-2.0.0-p451/gems/rbvmomi-1.8.1/lib/rbvmomi/connection.rb:90:in call' from /home/logan/.rvm/gems/ruby-2.0.0-p451/gems/rbvmomi-1.8.1/lib/rbvmomi/basic_types.rb:205:in_call'
from /home/logan/.rvm/gems/ruby-2.0.0-p451/gems/rbvmomi-1.8.1/lib/rbvmomi/basic_types.rb:74:in block (2 levels) in init' from /home/logan/.rvm/gems/ruby-2.0.0-p451/gems/rbvmomi-1.8.1/lib/rbvmomi/basic_types.rb:183:in_get_property'
from /home/logan/.rvm/gems/ruby-2.0.0-p451/gems/rbvmomi-1.8.1/lib/rbvmomi/basic_types.rb:35:in `block (2 levels) in i

Serialization error when trying to clone from a template using a DHCP IP generator

Below is the output provided by the error.

I might be doing something wrong here, but according to every doc and example I found this should be working. Also, the error is during serialization of the request customization settings, and not from the server.

Output:

RuntimeError while serializing ip (CustomizationIpGenerator):
CustomizationDhcpIpGenerator
RuntimeError while serializing adapter (CustomizationIPSettings):
CustomizationIPSettings( ip: CustomizationDhcpIpGenerator )
RuntimeError while serializing nicSettingMap (CustomizationAdapterMapping):
CustomizationAdapterMapping(
    adapter: CustomizationIPSettings( ip: CustomizationDhcpIpGenerator )
)
RuntimeError while serializing nicSettingMap (CustomizationAdapterMapping):
[CustomizationAdapterMapping(
    adapter: CustomizationIPSettings( ip: CustomizationDhcpIpGenerator )
)]
RuntimeError while serializing customization (CustomizationSpec):
CustomizationSpec(
    globalIPSettings: CustomizationGlobalIPSettings(  ),
    identity: CustomizationLinuxPrep(
        domain: "intg2.loc",
        hostName: CustomizationFixedName( name: "clone-dhcp" )
    ),
    nicSettingMap: [CustomizationAdapterMapping(
        adapter: CustomizationIPSettings( ip: CustomizationDhcpIpGenerator )
    )]
)
RuntimeError while serializing spec (VirtualMachineCloneSpec):
VirtualMachineCloneSpec(
    config: VirtualMachineConfigSpec(
        deviceChange: [VirtualDeviceConfigSpec(
            device: VirtualE1000(
                addressType: "assigned",
                backing: VirtualEthernetCardNetworkBackingInfo(
                    deviceName: "Vlan14",
                    dynamicProperty: [],
                    network: Network("network-20943"),
                    useAutoDetect: false
                ),
                connectable: VirtualDeviceConnectInfo(
                    allowGuestControl: true,
                    connected: false,
                    dynamicProperty: [],
                    startConnected: true,
                    status: "untried"
                ),
                controllerKey: 100,
                deviceInfo: Description(
                    dynamicProperty: [],
                    label: "Network adapter 1",
                    summary: "vlan2"
                ),
                dynamicProperty: [],
                key: 4000,
                macAddress: "00:50:56:8b:4a:69",
                unitNumber: 7,
                wakeOnLanEnabled: true
            ),
            operation: "edit"
        )],
        memoryMB: 4096,
        numCPUs: 1
    ),
    customization: CustomizationSpec(
        globalIPSettings: CustomizationGlobalIPSettings(  ),
        identity: CustomizationLinuxPrep(
            domain: "intg2.loc",
            hostName: CustomizationFixedName( name: "clone-dhcp" )
        ),
        nicSettingMap: [CustomizationAdapterMapping(
            adapter: CustomizationIPSettings( ip: CustomizationDhcpIpGenerator )
        )]
    ),
    location: VirtualMachineRelocateSpec(
        datastore: Datastore("datastore-23784"),
        pool: ResourcePool("resgroup-23573")
    ),
    powerOn: false,
    template: false
)

Rakefile update

The Rakefile for this project will not run on newer environments. This should be a minimal update to get the Rakefile in shape.

ERROR: 'rake/rdoctask' is obsolete and no longer supported. Use 'rdoc/task' (available in RDoc 2.4.2+) instead.

Provide a man page for rbvmomish

Hi,
I am packaging rbvmomi for Debian, because it is part of the GitLab dependency chain (through fog-vsphere). I saw that there exists a binary named rbvmomish in the repo. I have a doubt whether it should be packaged (mainly coz I don't see it mentioned in the readme).

So, should it be included in the package or can I skip it? If it has to be included, can you please provide a man file describing it's usage? It would be a great help. Thanks.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.