Discover Server in Network and add to Foreman

Hi All,

I am new to Foreman and might created this topic in wrong group.

I would really appreciate if anyone here can help me with discovering the Physical & VM servers in network and which can show up in Foreman so that if in case we left any server than it can be added back to Foreman. Also if yes than is there any way we can scan the network recursively so that if there is any new server added to network than than can be show up.

Thanks in Adv.

To my knowledge, there is no way to discover hosts. There is a discovery image, but you would need to boot each machine over PXE. I don’t recommend it, because you would have to edit each host manually afterwards.

So you need to enter each host manually. Basically you have two options:

  1. Enter each host in the GUI. To speed things up, you can run “hammer host create” on the command line.
  2. Create content views, create corresponding activation keys (under Content/Lifecycle), then on each host install subscription-manager and call it like “subscription-manager register --org=your_org --activationkey=’…”.
1 Like

Thanks hjb for update. maybe if someone else have any idea about it.

Scanning for hosts, not really, unless you have a different scanner.

How Discovery works is controlling each host via the DHCP server. If you configure your Foreman instance(s) to provice PXE services (DHCP, DNS and TFTP) and let all (this is important) machines in the network by default boot from their NIC, you should be good.

Any ‘unknown’ systems to Foreman will be booted to the Discovery image and can be deployed with a fresh OS. And all ‘known’ systems will boot the first hard disk.

Thanks for info Thulium-Drake. I think this can be closed as i this i can not discover/scan server in my network.
Maybe if community members can this if there is any possibility in further release and can add this feature.

I know of someone who ran nmap in combination with ansible to cause all hosts they had access to on the network to populate in foreman, but that requires that you have ssh access to all hosts. Another option if you know what systems are there is to use the new host registration feature in Foreman 2.3 - RFC: Simple & automatic host registration WF