Foreman doesnt seem to be using the Provision template

Hello,

I had read somewhere that ideally 3 provision templates need to be provided

  • a PXELinux template, a provision template and a finish template.
    Accordingly I have provided these three.

But foreman seems to be using only the finish template while provisioning
vms.

How is this? Am I missing anything?

-Abhijeet

Hello Abhijeet,

you are right.

If you want to provision a box via PXE booting over network, then you
really need the three templates.

On the other hand, some compute resources (usually cloud providers) does
not allow you to PXE boot on their network. Thus you use what we call
image provisioning. You select an image and then you need just one
"finish" template. Foreman does connect to the host once it is up and
running via ssh and executes the finis template in shell.

Also we have some providers e.g. libvirt/ovirt that supports both. So
you can use both approaches depending on your scenario.

I hope this is clear now to you.

LZ

··· On Fri, Apr 11, 2014 at 05:12:54AM -0700, Abhijeet Joshi wrote: > Hello, > > I had read somewhere that ideally 3 provision templates need to be provided > - a PXELinux template, a provision template and a finish template. > Accordingly I have provided these three. > > But foreman seems to be using only the finish template while provisioning > vms. > > How is this? Am I missing anything? > > -Abhijeet > > -- > You received this message because you are subscribed to the Google Groups "Foreman users" group. > To unsubscribe from this group and stop receiving emails from it, send an email to foreman-users+unsubscribe@googlegroups.com. > To post to this group, send email to foreman-users@googlegroups.com. > Visit this group at http://groups.google.com/group/foreman-users. > For more options, visit https://groups.google.com/d/optout.


Later,

Lukas “lzap” Zapletal
irc: lzap #theforeman

Yes, that cleared it a lot.

So, would it be ok even if PXELinux template is not provided?

I am provisioning VMs on EC2 right now. But finally I want to provision on
rhev-m

So for that -

  1. Is it ok to provide only the finish template?
  2. Is it ok to not provide the PXELinux template at all?
  3. Would the same template that I am using to provision VMs on EC2 can be
    used to provision machines on rhev-m (provided that the OS of the target
    VMs is the same)?

Regards,
Abhijeet

> So, would it be ok even if PXELinux template is not provided?

Depends on what you mean with "it".

For image based provisioning you only need a finish template. You can
define the remaining three of course if CR supports it, they will not be
picked up.

> So for that -
> 1) Is it ok to provide only the finish template?

Absolutely.

> 2) Is it ok to not provide the PXELinux template at all?

Absolutely.

> 3) Would the same template that I am using to provision VMs on EC2 can be
> used to provision machines on rhev-m (provided that the OS of the target
> VMs is the same)?

Template and image are two different topics. You can of course upload an
image you have to both EC2 and RHEV, this is possible yes.

··· -- Later,

Lukas “lzap” Zapletal
irc: lzap #theforeman

Thanks a lot Lukas. That helped me a lot.

Best regards,
Abhijeet