Configuration to install one machine on its first interface by DHCP and then be STATIC for another network

Problem:
Question of configuration.

Expected outcome:
My foreman server is configured with 2 interfaces. Let say eth0 for management and std network interface
eth1 for just DHCP network that is reserved to install new servers.

I’m looking for the best way to set foreman to install a linux server that would PXE boot on its first interface on the DHCP network but the final configuration will be a static IP address on another network (unreachable at the install time).

Foreman and Proxy versions:
2.3.3

Foreman and Proxy plugin versions:
2.3.3

Distribution and version:
CentOS 7 last release.
Other relevant data:

Thank you.

Hello,
Anyone knows how to make the install IP as disposal for install only ?
Do foreman was designed for this ?
Regards

Yes, what exactly is not clear? You simply define two subnets, one as in DHCP mode, the other in Static mode. You create two NICs and mark one as provisioning one, the other will be primary one. Foreman ships with templates which will configure your networking with static IP as long as the subnet assigned to that interface has Static mode.

Hello.
My problem is the install network is a “disposable” network. As soon as the machine will be installed on this network (let say on eth0 usinf DHCP), the server will then be unplugged from this install network and plugged to another network where eth0 will be set with another configuration.
Is there any way to achieve this please ?
Regards

Some users do that, but Foreman assumes you provision your hosts onsite and never move them. So it is up to you to figure out what needs to be changed, where and when.

Write a script that will prepare your hosts for “disconnection” after provisioning, e.g. for kickstart this would be a %post scriplet. Something like that. I am not exactly sure what does not work for you.

Thank you

1 Like