Foreman API discovered host not getting provisioned

Problem: when i am trying to provision the discovered_hosts with below parameter using the API but when put this command it says host created but it does not get the loader file & it boot again it discovery mode.
after cheking the API parameter with discovered_hosts i did not find pxe_loader parameter but i am not sure whether this parameter is required or not to provision the discovered host

curl -X PUT -H 'Accept: application/json' -H 'Content-Type: application/json' -u admin:qwe@123# -L -k -i https://foremansrv.examlab.com/api/v2/discovered_hosts/97/ -d '{"discovered_hosts":{"environment_id":"1","domain_id":1,"ptable_id":104,"medium_id":10,"architecture_id":1,"operatingsystem_id":"1","root_pass":"abcdeAddd12","location_id":2,"organization_id":1,"ip": "192.168.101.49","mac": "00:15:5d:e0:02:7c","subnet_id":"1", "build":"true"}}'

can some one help in this regards incase anyone has already used API to provision the host which is auto discovered.

thanks

Expected outcome: It should provision the host

Foreman and Proxy versions: 1.22

Foreman and Proxy plugin versions: 15

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.)

logs

It is required, yes. Just set it as follows: "pxe_loader": "PXELinux BIOS" for example.

Thanks Izap, it works.

1 Like