esxcli calls no longer work
klevron1 opened this issue · 8 comments
I received the following error when attempting to use the 'esxcli' call on a host.
NoMethodError: undefined method `RetrieveDynamicTypeManager' for #<RbVmomi::VIM::HostSystem:0x1af4955e>
from /opt/jruby-1.7.21/lib/ruby/gems/shared/gems/rbvmomi-1.11.3/lib/rbvmomi/vim/HostSystem.rb:13:in `dtm'
Here's a test script:
vim = RbVmomi::VIM.connect host: 'vcenter.domain.name', user: 'administrator@vsphere.local', password: 'vmware', insecure: true
hostview = vim.serviceContent.viewManager.CreateContainerView(
recursive: true, container: vim.serviceContent.rootFolder,
type: ['HostSystem'])
host = hostview.view.first
h = host.esxcli.system.version.get
puts h.inspect
Expected response (with rbvmomi 1.9.5)
#<RbVmomi::VIM::VimEsxCLIsystemversiongetVersionGet:0x7fab8e9a @props={:dynamicProperty=>[], :Build=>"Releasebuild-5251623", :Patch=>"53", :Product=>"VMware ESXi", :Update=>"2", :Version=>"6.0.0"}>
Received response (with rbvmomi 1.11.3)
NoMethodError: undefined method `RetrieveDynamicTypeManager' for #<RbVmomi::VIM::HostSystem:0x22f4f8f2>
dtm at /opt/jruby-1.7.21/lib/ruby/gems/shared/gems/rbvmomi-1.11.3/lib/rbvmomi/vim/HostSystem.rb:13
dti at /opt/jruby-1.7.21/lib/ruby/gems/shared/gems/rbvmomi-1.11.3/lib/rbvmomi/vim/HostSystem.rb:28
root at /opt/jruby-1.7.21/lib/ruby/gems/shared/gems/rbvmomi-1.11.3/lib/rbvmomi/vim/HostSystem.rb:58
esxcli at /opt/jruby-1.7.21/lib/ruby/gems/shared/gems/rbvmomi-1.11.3/lib/rbvmomi/vim/HostSystem.rb:8
(root) at test.rb:12
Experiencing the same issue....
@jrgarcia Any update on this issue?
Unfortunately, I haven't had a chance to look into this issue yet. I'll take a look at it today and see if I can find out what's happening.
@aimers1975 @klevron1 This should be fixed with 1.11.4. Sorry that took so long to get taken care of!
@jrgarcia with rbvmomi v1.11.4, I got this error output when attempting to bring up a VM with vagrant-vsphere (no issues with v1.11.3):
==> default: Calling vSphere CloneVM with the following settings:
==> default: -- Template VM: NSIDC/vm/Linux/SCM/xenial64-docker
==> default: -- Target VM: NSIDC/vm/Linux/SCM/dev/mbrandt-testing-dev-default
[INFO]: There was an exception during native_execute: InvalidRequest:
Unexpected element tag "resourceAllocation" seen
while parsing serialized DataObject of type vim.vm.device.VirtualVmxnet3
at line 1, column 632
while parsing property "device" of static type VirtualDevice
while parsing serialized DataObject of type vim.vm.device.VirtualDeviceSpec
at line 1, column 556
while parsing property "deviceChange" of static type ArrayOfVirtualDeviceConfigSpec
while parsing serialized DataObject of type vim.vm.ConfigSpec
at line 1, column 512
while parsing property "config" of static type VirtualMachineConfigSpec
while parsing serialized DataObject of type vim.vm.CloneSpec
at line 1, column 342
while parsing call information for method CloneVM_Task
at line 1, column 177
while parsing SOAP body
at line 1, column 167
while parsing SOAP envelope
at line 1, column 0
while parsing HTTP request for method clone
on object of type vim.VirtualMachine
at line 1, column 0
We are still on vSphere 5; based on the one spot in the VMWare docs where I found a reference to "resourceAllocation", "resourceAllocation" was introduced in vSphere 6.
@michael-brandt-cu Thanks for reporting. I'll take a look.
@michael-brandt-cu I just released v1.11.5 which should fix this. Let me know if this fixes things for you. Sorry about that!
@jrgarcia Looks like v1.11.5 works, thanks!