Check for any errors on the foreman side, in /var/log/foreman/production.log - see if the request to that endpoint gets through and if there are any further messages there.
You might want to use tokens for this.
I’m not familiar with the tutorial, but I’d try to make boot.cfg a proper Foreman template so the URL includes the build token (token=whatever as a url parameter so Foreman can identify the request).
This is a mess, we’d appreciate some work in Foreman core to allow smooth ESXi provisioning. New template kinds might be necessary, these changes are not huge but it must be done by somebody who understands how PXE work in VMWare. Patches welcome.
I have a question referring to /usr/share/foreman/app/models/concerns/pxe_loader_support.rb.
There is the “all_loaders_map”.
I don’t get the function of the option in foreman where i can choose out of this all_loaders_map a matching PXE loader.
In my dhcpd config i got filename “pxelinux.0”. If i switch the PXE loader at Foreman, nothing happens.
So… Do i understand this Foreman option wrong in general?
This maps exactly to DHCP option “filename”, if you change this value Foreman should orchestrate a DHCP deletion and creation to update this value on your DHCP server. We had a bug in older versions and this was not working properly, but I am sure that 1.20 should be good now.
Syslog looks like Jan 14 11:09:52 foreman in.tftpd[10577]: RRQ from 10.208.213.14 filename pxelinux.0 Jan 14 11:09:52 foreman in.tftpd[10577]: tftp: client does not accept options Jan 14 11:09:52 foreman in.tftpd[10578]: RRQ from 10.208.213.14 filename pxelinux.0 Jan 14 11:09:52 foreman in.tftpd[10579]: RRQ from 10.208.213.14 filename ldlinux.c32 Jan 14 11:09:52 foreman in.tftpd[10580]: RRQ from 10.208.213.14 filename pxelinux.cfg/423aadf4-acef-80d4-a8e0-ca625141af66 Jan 14 11:09:52 foreman in.tftpd[10581]: RRQ from 10.208.213.14 filename pxelinux.cfg/01-00-50-56-ba-35-25 Jan 14 11:09:52 foreman in.tftpd[10582]: RRQ from 10.208.213.14 filename ../boot/ESXi-6.0.0/mboot.c32
Enable debug mode and pastebin the relevant transaction from production.log there should be details about orchestration - Foreman should schedule DHCP orchestration change.
2019-01-17T12:20:23 [I|app|] Started PATCH "/hosts/48" for 10.208.1.159 at 2019-01-17 12:20:23 +0100
2019-01-17T12:20:23 [I|app|7961f] Processing by HostsController#update as */*
2019-01-17T12:20:23 [I|app|7961f] Parameters: {"utf8"=>"✓", "authenticity_token"=>"D+0G4cymPkVScxfbq83ky/FqGEVc/5tqlKJG/7h2BI33gjBYUKaRisJ5hXWYcVROileLkx7X0PnblPv+18IAlw==", "host"=>{"name"=>"mac005056ba3525", "hostgroup_id"=>"", "environment_id"=>"", "puppet_proxy_id"=>"", "puppet_ca_proxy_id"=>"", "ansible_role_ids"=>[""], "managed"=>"true", "progress_report_id"=>"[FILTERED]", "interfaces_attributes"=>{"0"=>{"_destroy"=>"0", "mac"=>"00:50:56:ba:35:25", "identifier"=>"ens32", "name"=>"mac005056ba3525", "domain_id"=>"1", "subnet_id"=>"1", "ip"=>"10.208.213.16", "ip6"=>"", "managed"=>"1", "primary"=>"1", "provision"=>"1", "execution"=>"1", "tag"=>"", "attached_to"=>"", "id"=>"54"}}, "architecture_id"=>"1", "operatingsystem_id"=>"8", "medium_id"=>"13", "ptable_id"=>"95", "pxe_loader"=>"PXELinux Alt BIOS", "disk"=>"", "is_owned_by"=>"4-Users", "enabled"=>"1", "model_id"=>"1", "comment"=>"", "overwrite"=>"false"}, "id"=>"48"}
2019-01-17T12:20:23 [I|app|7961f] Current user set to admin (admin)
2019-01-17T12:20:23 [D|app|7961f] Current organization set to none
2019-01-17T12:20:23 [D|app|7961f] Current location set to none
2019-01-17T12:20:23 [I|aud|7961f] Host::Base (48) update event on pxe_loader None, PXELinux Alt BIOS
2019-01-17T12:20:23 [I|app|7961f] Redirected to https://foreman.server.de/hosts/mac005056ba3525.server.de
2019-01-17T12:20:23 [D|app|7961f] Current location set to none
2019-01-17T12:20:23 [D|app|7961f] Current organization set to none
2019-01-17T12:20:23 [I|app|7961f] Completed 302 Found in 127ms (ActiveRecord: 15.4ms)
2019-01-17T12:20:23 [I|app|] Started GET "/hosts/mac005056ba3525.server.de" for 10.208.1.159 at 2019-01-17 12:20:23 +0100
2019-01-17T12:20:23 [I|app|95550] Processing by HostsController#show as */*
2019-01-17T12:20:23 [I|app|95550] Parameters: {"id"=>"mac005056ba3525.server.de"}
2019-01-17T12:20:23 [I|app|95550] Current user set to admin (admin)
2019-01-17T12:20:23 [I|app|95550] Rendering hosts/show.html.erb within layouts/application
2019-01-17T12:20:23 [I|app|95550] Rendered hosts/show.html.erb within layouts/application (20.7ms)
2019-01-17T12:20:23 [I|app|95550] Rendered layouts/_application_content.html.erb (0.6ms)
2019-01-17T12:20:23 [I|app|95550] Rendering layouts/base.html.erb
2019-01-17T12:20:23 [I|app|95550] Rendered layouts/base.html.erb (18.6ms)
2019-01-17T12:20:23 [I|app|95550] Completed 200 OK in 52ms (Views: 38.8ms | ActiveRecord: 4.6ms)
2019-01-17T12:20:23 [I|app|] Started GET "/hosts/mac005056ba3525.server.de/overview" for 10.208.1.159 at 2019-01-17 12:20:23 +0100
2019-01-17T12:20:23 [I|app|] Started GET "/hosts/mac005056ba3525.server.de/templates" for 10.208.1.159 at 2019-01-17 12:20:23 +0100
2019-01-17T12:20:23 [I|app|2cc40] Processing by HostsController#overview as HTML
2019-01-17T12:20:23 [I|app|2cc40] Parameters: {"id"=>"mac005056ba3525.server.de"}
2019-01-17T12:20:23 [I|app|2cc40] Current user set to admin (admin)
2019-01-17T12:20:23 [I|app|] Started GET "/hosts/mac005056ba3525.server.de/runtime?range=7" for 10.208.1.159 at 2019-01-17 12:20:23 +0100
2019-01-17T12:20:23 [I|app|] Started GET "/hosts/mac005056ba3525.server.de/nics" for 10.208.1.159 at 2019-01-17 12:20:23 +0100
2019-01-17T12:20:23 [I|app|] Started GET "/hosts/mac005056ba3525.server.de/resources?range=7" for 10.208.1.159 at 2019-01-17 12:20:23 +0100
2019-01-17T12:20:23 [I|app|2ad40] Processing by HostsController#nics as HTML
2019-01-17T12:20:23 [I|app|2ad40] Parameters: {"id"=>"mac005056ba3525.server.de"}
2019-01-17T12:20:23 [I|app|ce569] Processing by HostsController#runtime as HTML
2019-01-17T12:20:23 [I|app|ce569] Parameters: {"range"=>"7", "id"=>"mac005056ba3525.server.de"}
2019-01-17T12:20:23 [I|app|d4e08] Processing by HostsController#resources as HTML
2019-01-17T12:20:23 [I|app|2ad40] Current user set to admin (admin)
2019-01-17T12:20:23 [I|app|d4e08] Parameters: {"range"=>"7", "id"=>"mac005056ba3525.server.de"}
2019-01-17T12:20:23 [I|app|99f6c] Processing by HostsController#templates as HTML
2019-01-17T12:20:23 [I|app|99f6c] Parameters: {"id"=>"mac005056ba3525.server.de"}
2019-01-17T12:20:23 [I|app|d4e08] Current user set to admin (admin)
2019-01-17T12:20:23 [I|app|ce569] Current user set to admin (admin)
2019-01-17T12:20:23 [I|app|99f6c] Current user set to admin (admin)
2019-01-17T12:20:23 [I|app|2cc40] Rendered hosts/_overview.html.erb (28.5ms)
2019-01-17T12:20:23 [I|app|2cc40] Completed 200 OK in 52ms (Views: 19.1ms | ActiveRecord: 17.1ms)
2019-01-17T12:20:23 [D|app|99f6c] Current organization set to none
2019-01-17T12:20:23 [D|app|99f6c] Current location set to none
2019-01-17T12:20:23 [I|app|ce569] Rendered hosts/_runtime.html.erb (18.3ms)
2019-01-17T12:20:23 [I|app|ce569] Completed 200 OK in 49ms (Views: 3.2ms | ActiveRecord: 33.6ms)
2019-01-17T12:20:23 [D|app|99f6c] Current location set to none
2019-01-17T12:20:23 [D|app|99f6c] Current organization set to none
2019-01-17T12:20:23 [D|app|99f6c] Current organization set to none
2019-01-17T12:20:23 [D|app|99f6c] Current location set to none
2019-01-17T12:20:23 [D|app|99f6c] Current location set to none
2019-01-17T12:20:23 [D|app|99f6c] Current organization set to none
2019-01-17T12:20:23 [D|app|99f6c] Current organization set to none
2019-01-17T12:20:23 [D|app|99f6c] Current location set to none
2019-01-17T12:20:23 [I|app|d4e08] Rendered hosts/_resources.html.erb (23.6ms)
2019-01-17T12:20:23 [I|app|d4e08] Completed 200 OK in 65ms (Views: 39.3ms | ActiveRecord: 17.4ms)
2019-01-17T12:20:23 [D|app|99f6c] Current location set to none
2019-01-17T12:20:23 [D|app|99f6c] Current organization set to none
2019-01-17T12:20:23 [D|app|99f6c] Current organization set to none
2019-01-17T12:20:23 [D|app|99f6c] Current location set to none
2019-01-17T12:20:23 [D|app|99f6c] Current location set to none
2019-01-17T12:20:23 [D|app|99f6c] Current organization set to none
2019-01-17T12:20:23 [D|app|99f6c] Current organization set to none
2019-01-17T12:20:23 [D|app|99f6c] Current location set to none
2019-01-17T12:20:23 [D|app|99f6c] Current location set to none
2019-01-17T12:20:23 [D|app|99f6c] Current organization set to none
2019-01-17T12:20:23 [D|app|99f6c] Current organization set to none
2019-01-17T12:20:23 [D|app|99f6c] Current location set to none
2019-01-17T12:20:23 [D|app|99f6c] Current location set to none
2019-01-17T12:20:23 [D|app|99f6c] Current organization set to none
2019-01-17T12:20:23 [D|app|99f6c] Current organization set to none
2019-01-17T12:20:23 [D|app|99f6c] Current location set to none
2019-01-17T12:20:23 [D|app|99f6c] Current location set to none
2019-01-17T12:20:23 [D|app|99f6c] Current organization set to none
2019-01-17T12:20:23 [D|app|99f6c] Current organization set to none
2019-01-17T12:20:23 [D|app|99f6c] Current location set to none
2019-01-17T12:20:23 [D|app|99f6c] Current location set to none
2019-01-17T12:20:23 [D|app|99f6c] Current organization set to none
2019-01-17T12:20:23 [D|app|99f6c] Current organization set to none
2019-01-17T12:20:23 [D|app|99f6c] Current location set to none
2019-01-17T12:20:23 [D|app|99f6c] Current location set to none
2019-01-17T12:20:23 [D|app|99f6c] Current organization set to none
2019-01-17T12:20:23 [D|app|99f6c] Current organization set to none
2019-01-17T12:20:23 [D|app|99f6c] Current location set to none
2019-01-17T12:20:23 [D|app|99f6c] Current location set to none
2019-01-17T12:20:23 [D|app|99f6c] Current organization set to none
2019-01-17T12:20:23 [D|app|99f6c] Current organization set to none
2019-01-17T12:20:23 [D|app|99f6c] Current location set to none
2019-01-17T12:20:23 [D|app|99f6c] Current location set to none
2019-01-17T12:20:23 [D|app|99f6c] Current organization set to none
2019-01-17T12:20:23 [I|app|99f6c] Rendered hosts/_templates.html.erb (5.1ms)
2019-01-17T12:20:23 [I|app|99f6c] Completed 200 OK in 106ms (Views: 5.2ms | ActiveRecord: 46.8ms)
2019-01-17T12:20:24 [I|app|2ad40] Rendered hosts/_nics.html.erb (250.1ms)
2019-01-17T12:20:24 [I|app|2ad40] Completed 200 OK in 274ms (Views: 240.7ms | ActiveRecord: 24.8ms)
Can you share what values you have for the None and PXELinux Alt BIOS options? The code makes the decision on values, if they change (via boot_filename) DHCP redeployment is orchestrated:
def dhcp_update_required?
# IP Address / name changed, or 'rebuild' action is triggered and DHCP record on the smart proxy is not present/identical.
return true if ((old.ip != ip) || (old.hostname != hostname) || provision_mac_addresses_changed? || (old.subnet != subnet) || (operatingsystem.boot_filename(old.host) != operatingsystem.boot_filename(self.host)) ||
(!old.build? && build? && !all_dhcp_records_valid?))