Foreman Discovery not working on Rocky Linux 8.7


I am new to Foreman and I am trying to install different virtual machines from virtualbox with Foreman Discovery. In the Discovered Host tab, the only thing that appears to me is: No discovered hosts found in this context. This page shows discovered bare-metal or virtual nodes waiting to be provisioned. For more information please see documentation.

This has been the command that I have used to install all foreman:
sudo foreman-installer --enable-foreman-proxy --enable-foreman-compute-libvirt --enable-foreman-plugin-setup --enable-foreman-proxy-plugin-discovery --enable-foreman-plugin-discovery --foreman-proxy-plugin-discovery-install-images=true

Furthermore I have also created a subnet with your TFTP, DNS, DHCP and Discovery Proxy added to it. To the created operating system I have added the templates of:
Finish template: Kickstart default finish
Provisioning template: Kickstart default
PXEGrub2 template : Kickstart default PXEGrub2
PXELinux template : Kickstart default PXELinux
User data template : Kickstart default User data

In addition, in the Settings → Provisioning tab I have changed the option from “Default PXE global template entry” to “discovery”.

I don’t know if I’m doing something wrong, but it doesn’t detect any host booted by network from Virtualbox.

Expected outcome:
Hosts in the Discovered Hosts tab.

Foreman and Proxy versions:

Foreman 2.5.4

Foreman and Proxy plugin versions:
foreman_discovery → 17.0.1
foreman_setup → 7.0.0

Distribution and version:
Rocky Linux 8.7

Other relevant data:

I have used this link as a reference: Foreman :: Plugin Manuals

Considering you are using an OS that support the latest Foreman version I would suggest you upgrade to 3.5.1. Not that I know if that will fix your issue but there a quite a few “bug fixes” between 2.5.4 and 3.5.1.

I have tested it with version 3.5.1 with Katello and nothing has changed in the “Discovered Hosts” tab either.
Anyway thank you very much.

When you watch the console of the virtualbox machine booting, does it boot from the network? How does the pxe menu look like? Can you make some screenshots? On the Foreman machine, can you upload tree /var/lib/tftpboot?

Sure! Here I attach all the screenshots.

I have repeated over and over again the steps indicated in the Discovery manual but I must be doing something wrong, because also in step 3.3 on my machine I do not have a file in “~/.hammer/cli.modules.d/” named “foreman_discovery.yml”.

Thanks for the reply!