Hi Guys,
I have installed the centOS as baremetal server provisioning from the GUI.
but want to try provision the host using the foreman API so can someone please help me out with the APIs of the host provisioning with custom disk partition.
Hi Magarvo,
Yes your guess is right, I am using the auto discovery & provisioning from discovered host.
And server are booting from PXE to get the TCP address from the DHCP.
You are missing “build” flag, when its set Foreman creates installation PXE configuration, when it’s not set the PXE is set to boot from local drive which fails because it’s apparently empty. Set it to “true” and you should be fine.
You need to investigate why it failed, this is error from hammer CLI which is not very useful. Please make sure to output your reply correctly, I fixed it for you.
Ok thanks for your help. if Hammer is not working as expected then will foreman API will work
since I want to integrate foreman with my internal system to provision the discovered host.
so what best way to go about.
one think i have notice that when I am provisining discovered host from the GUI after the submission of the details it also generate the Token and then os installation get started.
but incase of discovered host provisioing it is not generating the token for provisioning and dont know why …
appriciate if any can help me here to get out of the issue…
after adding the --build “true” flag and command was not working but when I created new host group and configure the required parameter such as Name
Environment
Puppet Master
Puppet CA
domain
ipv4 subnet
Architecture
Operating system
Media
Partition Table
Location
Organizations
after this run the command and host got created.
but without host group below error is occuring
Could not create the host:
resource have no errors
and now I dont know why it is not working in community if any one can help here to fix this hammer discovery provision command issue…
this is the error in log file--
2019-09-09T15:12:33 [I|app|d2ad31fe] Parameters: {"location_id"=>2, "organization_id"=>1, "discovered_host"=>{"environment_id"=>1, "architecture_id"=>1, "domain_id"=>1, "operatingsystem_id"=>1, "medium_id"=>10, "subnet_id"=>1, "build"=>true, "provision_method"=>"build", "pxe_loader"=>"PXELinux BIOS", "root_pass"=>"[FILTERED]"}, "apiv"=>"v2", "id"=>"49"}
2019-09-09T15:12:33 [I|app|d2ad31fe] Current user set to admin (admin)
2019-09-09T15:12:34 [W|app|d2ad31fe] Not queueing Host::Managed: ["Ptable can't be blank unless a custom partition has been defined"]
2019-09-09T15:12:34 [W|app|d2ad31fe] Not queueing Host::Managed: ["Ptable can't be blank unless a custom partition has been defined"]
2019-09-09T15:12:34 [W|app|d2ad31fe] Not queueing Host::Managed: ["Ptable can't be blank unless a custom partition has been defined"]
2019-09-09T15:12:34 [W|app|d2ad31fe] Not queueing Discovery reboot: Ptable can't be blank unless a custom partition has been defined
2019-09-09T15:12:34 [W|app|d2ad31fe] Action failed
RuntimeError: resource have no errors