Failed to create resource - undefined method first

After upgrading to 1.17, I get the following error:

Expected outcome:
VM should be provisioned on vsphere

Foreman and Proxy versions:

I didn’t have this problem on 1.16.

Please attach production log
Would be good to open a bug report on

Here is the production log. Note, I shutdown foreman and then cleared the log. I started foreman back up and then tried to create a vsphere vm. This should help when looking through the attached log.

production.log.tar (70 KB)

It fails here

# === Power on
# Foreman will try and start this vm after clone in a seperate request.
def clone_vm(raw_args)
  args = parse_args(raw_args)

  opts = {
    "datacenter" => datacenter,
    "template_path" => args[:image_id],
    "dest_folder" => args[:path],
    "power_on" => false,
    "start" => args[:start],
    "name" => args[:name],
    "numCPUs" => args[:cpus],
    "numCoresPerSocket" => args[:corespersocket],
    "memoryMB" => args[:memory_mb],
    "datastore" => args[:volumes].first[:datastore],
    "storage_pod" => args[:volumes].first[:storage_pod],
    "resource_pool" => [args[:cluster], args[:resource_pool]],
    "boot_order" => [:disk],

on the datastore line. I think this indicates that args[:volumes] is returning as undef right?

vsphere version: VMware ESXi, 6.0.0, 4600944

Created a bug report here: Bug #23342: vsphere - failed to create resource - undefined method first - Foreman

@TimoGoebel sound familiar?