Project

General

Profile

Actions

Bug #23342

closed

vsphere - failed to create resource - undefined method first

Added by Michael Speth over 6 years ago. Updated over 6 years ago.

Status:
Duplicate
Priority:
Normal
Assignee:
-
Category:
Compute resources - VMware
Target version:
-
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

After upgrading to version 1.17 of foreman via ubuntu package, provisioning to vsphere no longer functions.

Here is the output from the console.

Here is the code that fails in /usr/share/foreman/app/models/compute_resources/foreman/model/vmware.rb

# === 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],
  }

Line 498 is the line that fails which is the datastore line. I think this indicates that args[:volumes] is returning as undef. So runtime indicates that functions cannot be run from undef.

The problem is the args[:volumes] is not getting populated, although in the web ui, volumes is populated with a pull down list. I have selected the same volume as I have in previous versions of foreman which all have worked.

Foreman OS: Ubuntu 16.04
hypervisor: VMware ESXi, 6.0.0, 4600944


Files

production.log.tar production.log.tar 70 KB Michael Speth, 04/19/2018 09:16 PM

Related issues 1 (0 open1 closed)

Related to Foreman - Bug #23335: Cannot create VM in a vCenter. NoMethodError.ClosedTimo GoebelActions
Actions

Also available in: Atom PDF