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