Bare metal and Virtual Machine Provisioning through Foreman Server

Pradeep Kumar

I am a huge fan of open source and love to share How To's tutorials on Linux, Cloud and DevOps. I have been working as Linux Consultant, Cloud & DevOps Engineer since 2010

You may also like...

25 Responses

  1. Tony Montoya says:

    This is an awesome article, please contiue to provide more articles into more advance configurations if at all possible. The foreman community and those newcomers to this type of implementations greatly appreciate your contributions.

  2. Tomas says:

    Which version of Katello do you use in the article?

  3. subhash says:

    Hi pradeep,
    I too started exploring foreman and installed foreman 1.13 and provisioned setup in aws. Now i got a good article from you on server creation on bare metal.Thank you for your article.Please provide with our gmail id so for any queries , will contact you.

  4. Thanh DO says:

    Hi Pradeep,

    You are amazing man!
    I installed Katello base on your instruction, it works like a charm in no time.
    You are the best! Please publish more article. I will read it all
    Thank you so much & very much appreciated your contribution.

  5. naveen kumar says:

    hi, i am following your guide but facing a problem that how to ” download the required puppet package and its dependencies under the folder “/var/ftp/pub/puppet_rpms/” because i dont know which file to be download for repository and dependencies, please send me the exact link of those file.

  6. Hi Naveen,

    In CentOS 7 server, set the puppet labs yum repository using following command :

    yum -y localinstall

    Then use yumdownloader command to download puppet and its dependencies in a specific folder. Below is the url for reference.

  7. naveen kumar says:

    Thank you for the reply,as per user guidance , i first install package “yum -y localinstall” on a centos 7 server
    and Then use “yumdownloader puppetlabs-release –destdir /home/ftp/puppet –resolve” command to download puppet and its dependencies in a specific folder. At this time only one file was created and i put that file in my ftp server , but it didn’t worked , so i treid another command “yumdownloader puppet –destdir /home/ftp/puppet –resolve” command to download puppet and its dependencies ,At this time it created 10-15 files , again i treid to with all this file but again during provisioning the host says repository for puppet not available. In kickstart default provisioning template i am using the line repo –name=”puppet-pkg” –baseurl=ftp://myip/ftp/puppet.

    • naveen kumar says:

      Hi Pradeep, I just cop up with this problem , i managed my new host to be connected to the internet during provisioning ,so there is no need of download the required puppet package and its dependencies, now i am facing another problem, during provising of host , the new host prompt for “please complete all spokes before continuing ” and ask to enter “b” to continue installation but , even afterentering “b” it takes me back to same window option, this is error related to ananconda , i cant attached pic but sending you link please check and suggest what could be possible error, either of template or something else. Thank you

  8. denzfarid says:

    hello i follow step by step in this article but i have problem ini pxe boot
    after i create new host and boot
    TFTP open timeout

    and why im not run in ipxe mode?
    pls help

  9. Growdelan says:

    I do all like you, but have error on “Instalation Source” and i don’t know why. I try 4 times all steps and all the time same result. I use content from CentOS-7-x86_64-Minimal-1611.iso this is can be a problem because minimal version?

    • Growdelan says:

      Ok, i know where is problem. I just unpack iso to my ftp catalog 🙂 When i mount iso and make rsync -avHPS /tmp/mnt/ /var/ftp/pub/CentOS_x86_64/ all works 🙂

  10. Yash Menpara says:

    I have seen that issue with my lab once. Did you check if firewall port open for tftp/dhcp ? You may like to check Pradeep’s foreman install guide. Can you send the output of the command “firewall-cmd –list-all”

  11. Phani says:

    Nice Article.!! Really clear information.
    R u using the VMWARE workstation? or ESIX or Vecenter?

    I am trying the following steps but not yet succeed

    I am following this
    Step 1 : I have installed workstation in my window machine and In one VM, installing the centos and foreman on top of it.

    Step 2 : And another VM is VCENTER/ESXI server as compute resource .

    Step 3 : In provisioning setup, i will give the VCENTER IP details in foreman provisioning setup and as i dont have DNS and DCHP . I will give the static IP

    Step 4 : I will create the compute resource with V-CENTER IP and all other details

    Step 5 : Follow the steps of provisioning templates and all related stuff.

    Am i in right track. Please help me.. I am new to virtualization concepts and please correct me if I wrong direction

    Basically .. What I am thinking Foreman will provision the VM on host i.e compute host .. (BOTH IP are different foreman and compute host IP)


    • Hi Phani,

      I have tested these steps on VirtualBox VMs and Bare metal Severs as well. First of all your Forman VM and target VM should be on the same vlan. My recommended way is to setup DHCP, DNS and TFTP service on Foreman(Steps are there in article), Create your installation media and update the provisioning templates and define your target vm in dashboard and then start your VM with pxe.

      • Phani says:

        Thanks for your response. I got it.
        Can you please also mention Step:3 Configure Provisioning Setup.. I gave my foreman IP address in network address ( in your case is that correct? is it the foreman server ip address or VMWARE cluster ip adress?
        Can you please help me .


        • Phani says:

          I am getting the following an error when i try to provision a VM in VMWARE. I think its may be because of newotking interfaces issue.

          Please let me know if you have any thoughts on this. Thanks

        • It is not the Foreman or cluster IP, It is a Network address on which your DHCP server will start and will start assigning IP address to its clients from this network address only, In the network address we have specify the range of IP that can be used from this network address. From this range only Clients will get IP via DHCP.

  12. Phani says:

    Hey Pradeep .

    I dont have dhcp server in my environment. So I have given my own IP and defined my own template with user data and cloud init ( image based provision without ssh and I have one template template in vsphere. I gave the path of the location. So VM got created and i can login to VM also.
    Question 1 : But in foreman still the status of the host is “Pending for installation” not sure why its not showing that installation got completed.

    Question 2. In your case you ahve 5 templates are there. My question is where is the Centos ISO is location? will it be on foreman machine or Vsphere? or Its template will take care of the ISO part or will it downloaded and installed from internet?

    Question 3 : Also I ahve given the in host creation process as but after VM created with ip not sure why it got changed . Please help me on this.

    I really appreciated your supported . Thanks in advance please help me when you have some time

  13. Phani says:

    Small correction in Question 3 : Also I have given the IP in host creation process as but after VM created with ip not sure why it got changed . Please help me on this.

  14. Phani says:

    Hey Pradeep .. Seems that I need to include a user defined template for puppet agent scripts. Can you help me please

  15. Sunny Bhatnagar says:

    Hello All, I followed all the steps but my host is not booting up. Please help…
    My node is showing below mentioned error:

    Filename: node1.pxe
    tftp://… Permission denied

  16. Ranjeet says:

    Nice article. Sir how to install Openstack Newton using FOREMAN .

Leave a Reply

Your email address will not be published. Required fields are marked *