Undefined method `resourcePool' for nil:NilClass

I am seeing this error when building a VM from Template via Foreman 1.15.6 (running on CentOS 7.4).

[app] [E] Unprocessable entity Host::Managed (id: new):
 |   Failed to create a compute SGP vCentre (VMware) instance my host.mydomain.com: undefined method `resourcePool' for nil:NilClass

Expected outcome:

The builds should complete as expected. We have other Compute Resources defined pointing to our legacy ESX 6.0.0 environment, these all build without issue. We’d expect the build to complete on EXS 6.5.0.

Foreman and Proxy versions:
Foreman 1.15.6
Proxy 1.15.6
ESX 6.5.0

Foreman and Proxy plugin versions:

Other relevant data:

NoMethodError: undefined methodresourcePool’ for #RbVmomi::VIM::Folder:0x007f1eb233adb0`

We confirmed the authenticating user defined in the Compute Resource has sufficient permissions on ESX (also tried as admin). We are not using Resource Pools in our environment. We tried creating one to test but it was not visible from the Foreman UI drop-down and resulted in the same message when attempting to build. We’ve waited several minutes and re-attempted the build but at no point are we able to build on ESX 6.5.

Please let me know if further information is needed.

Hello, VMWare ESXi API is not supported, Foreman can only talk to vSphere.

Hi lzap, thanks for the response. Sorry my summary was not clear. We are going via Vspehere. We have multiple Compute Resources that work.

We have a new 6.5.0 env that is showing the error. Our new 6.5.0 Vsphere env uses a Web Client and self signed certificates.

Does Foreman need signed SSL certs to Vsphere to commence the build? I am wondering if this is causing the issue.


I had this same issue with Katello 3.5. Under compute profiles, the “Cluster” field is blank, and would not let me assign where to place the host. This worked flawless in previous releases and broke in 3.5. There was an issue with tfm-rubygem-fog-vsphere which got released by mistake in the repos, and then removed. Release 2.2.xxx — the fix was to downgrade to 2.1.1. Supposedly fixed the problem for some folks, however not in my case. For your issue, I suspect, Cluster [Please select a cluster] is probably not set to what you desire, with no option to choose.

Considering the release of software, 3.5 and no resolve — I was forced to upgrade to 3.8.

Now I can graciously say, that Katello 3.8, with tfm-rubygem-fog-vsphere-2.3.0-1.el7.noarch does in fact let me choose within VCenter, my multiple ESX (6.5) hosts now — and is functional 100%.

Upgrading to Katello 3.8, there’s also an improvement with this release. You can create images mapping to templates stored within vCenter very easy now, without hassle.

for instance:
Name Operating System Username UUID User data Actions
r1234 RedHat 7.5 root 50090f74-444e-c937-5808-4ca3a633defd Enabled

1 Like

I had the same issue recently. As it turned out, a coworker had renamed the resource pool in vSphere, but had not updated Foreman. Have you checked that this resource pool has the expected name in vSphere?

1 Like

I am also facing this issue and its happening in ESXi 6.5. on wards can we have a solution for this I am trying via terraform provider foreman it’s working for 6.0 but not for 6.5

This is i am using it.

Have you checked everything is still setup correctly after the VCenter update? Maybe some VCenter IDs changed or something got renamed. Make sure everything is still setup the way it should be and all references to resource pools etc are still correct within compute profiles, terraform templates etc
Though, let me say that your Foreman installation is horrendously out of date. 1.24.3 was released nearly 3 years ago, not even to speak of the outdated VSphere version.

hey areyus its working fine with esxi host 6.0 but not with 6.5
that’s the issue. Is there any setting we need to setup on esxi level

check this out