Struggling to use the start VM functionality at build time through the API

I’m attempting to provision a VM through the VMware provider with the method ‘image’. The VM does get created however the SSH tasks fail owing to the VM not being powered on. The GUI has a power on VM option and hammer has a start option but the API doesn’t appear to honour the “start”: “1” under compute_attributes.

I’ve also tried this setting under vm_attrs too but the same result.

Manual GUI creation works fine and starts VM.



Expected outcome:
The model suggests that the VM power on is handled in a separate task which also suggests that the VM is provisioned including the SSH tasks (finishing template) and then the power on should happen. If done in that order the tasks will fail I would expect.

There are some bugs and features which suggested that from 1.11 the compute_attributes are merged when using compute profiles so it should be a simple case of adding the start attribute as a “1”.

Foreman and Proxy versions:
Foreman and Proxy plugin versions:
Other relevant data:
[e.g. logs from Foreman and/or the Proxy, modified templates, commands issued, etc]
(for logs, surround with three back-ticks to get proper formatting, e.g.)

Issue refs:

My test code used was:
  "host": {
	"compute_profile_id": "4",
	"domain_id" : "1",
	"build": true, 
	"enabled": true,
	"overwrite": true,
	"power_on": true
  	     "start": "1"


Just wanted to reference the VMware model which is here: /app/models/compute_resources/foreman/model/vmware.rb

Ref Line 495:
495 # === Power on
496 #
497 # Foreman will try and start this vm after clone in a seperate request.
498 #
499 def clone_vm(raw_args)
500 args = parse_args(raw_args)
501 puts(args)
502 opts = {
503 “datacenter” => datacenter,
504 “template_path” => args[:image_id],
505 “dest_folder” => args[:path],
506 “power_on” => false,
507 “start” => args[:start],
508 “name” => args[:name],
509 “numCPUs” => args[:cpus],
510 “numCoresPerSocket” => args[:corespersocket],
511 “memoryMB” => args[:memory_mb],
512 “datastore” => args[:volumes].first[:datastore],
513 “storage_pod” => args[:volumes].first[:storage_pod],
514 “resource_pool” => [args[:cluster], args[:resource_pool]],
515 “boot_order” => [:disk]
516 }

Anyone able to confirm the current situation of the start attribute in compute_attributes please?