Actions
Bug #23342
closedvsphere - failed to create resource - undefined method first
Status:
Duplicate
Priority:
Normal
Assignee:
-
Category:
Compute resources - VMware
Target version:
-
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
Actions