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

Problem:
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.

Thanks,

Rob.

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:
1.21.3
Foreman and Proxy plugin versions:
1.21.3
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:
https://projects.theforeman.org/issues/6342
https://projects.theforeman.org/issues/10223
https://projects.theforeman.org/issues/14325
https://projects.theforeman.org/issues/16636

My test code used was:
{ 
  "host": {
	"name":"robtest148",
	"organization_id":"2", 
	"location_id":"1", 
	"hostgroup_id":"13", 
	"compute_profile_id": "4",
	"operatingsystem_id":"18", 
	"provision_method":"image", 
	"domain_id" : "1",
	"architecture_id":"1", 
	"build": true, 
	"enabled": true,
	"subnet_id":"16",
	"root_pass":"changeme",
	"managed":true,
	"overwrite": true,
	"power_on": true
	
  },
  "compute_attributes":{
  	     "start": "1"
  }       
}

logs

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?