Satellite 6 fully automated PXE provisioning using an Install network

Latest response

Hi,
I´m looking at implementing Satellite 6 provisioning for a customer where the current network infrastructure only use static IP adresses, there´s no DHCP servers on any of the multiple server networks that RHEL hosts are located and deployed on and it´s not possible to set one up as well on most of these networks, some are very crowded.
I would like to use kickstart and deploy directly on VMware vCenter without the need to use a bootdisk, e.g Hosts > New Host in Satellite is all that should be needed to deploy a host.

Scenario:
I was wondering if it would be possible to kickstart systems on a seperate Install Network, which has DHCP and PXE turned on so the VMs will initially receive a install-net dhcp address, connect to satellite and grab the pxe boot image, run the whole kickstart process and finally assign the IP address I gave it at the end.
This would mean that satellite would need to "intercept" or change the call to vCenter and assign the new VM to the install network instead of the assigned network.
And that an additional call to vcenter would need to be done once the kickstart is completed that reassigns from install network to the correct network.

Is this technically possible (and supported) to do in Satellite or would it need to be some kind of intrusive hack?

Any alternatives/suggestions?

Thanks...

Responses

I found that it was quite easy to modify the provisioning template to use a host parameter which forces the anaconda network parameter to use dhcp at install time and then configure static networking in a post script.
When I do "New Host" I can just choose InstallNet and add the installnet_used parameter.

<% subnet = @host.subnet -%>
<% if @host.params['installnet_used'] == "true" -%>
<% dhcp = !@static -%>
<% else -%>
<% if subnet.respond_to?(:dhcp_boot_mode?) -%>
<% dhcp = subnet.dhcp_boot_mode? && !@static -%>
<% else -%>
<% dhcp = !@static -%>
<% end -%>
<% end -%>

And where the kickstart_networking_setup snippet is called in post, I also modified it slightly:

<% if subnet.respond_to?(:dhcp_boot_mode?) -%>
<%= snippet 'kickstart_networking_setup' %>
<% else -%>
<% if @host.params['installnet_used'] == "true" -%>
<%= snippet 'kickstart_networking_setup' %>
<% end -%>
<% end -%>

So all is working as expected except that I need to manually go into vSphere after host reboot and change the VM NIC from Installnet to the correct network.
Not sure if the reassign-NIC-part could be automated as well when satellite receives the host call that the host has built...

Pleased to see you've mostly resolved this, Göran. Hopefully someone here can help out with your question about changing the NIC...

I received a suggestion to look at foreman hooks to do the vcenter reassign virtual nic magic ...

Hello, Let's see if I understand correctly your solution. When you create a new host, you specify the Final Static IP. But to make it boot via PXE you provide a DHCP IP as a host parameter. Is that correct?
The if-then-else statement for the kickstart_networking_setup is the same. Do you use another snippet for the static IP? If not, why do you have the if-then-else? Of yes, can you please share it with us?

Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.