iPXE does not work after upgrading to 2.4.1

After upgrading to 2.4.1 we are not able to install Ubuntu clients
on VMware anymore. The client did not load the provisioning template
so all settings will be ignored.
I set an IP address and a network but it tries to get an IP via DHCP.
In the boot screen, it looks like the VM even did not try to load the file
via iPXE. Any ideas?

Problem:
After upgrading to 2.4.1 we are not able to install VMs anymore

Expected outcome:
The same behavior as for 2.3.x

Foreman and Proxy versions:
2.4.1

Foreman and Proxy plugin versions:

Distribution and version:
CentOS Linux release 7.9.2009 (Core)

Other relevant data:

Can someone tell me where/how the ISO image decides after the booting to load the iPXE file?
I mounted the generated ISO and checked isolinux.cfg.
But the last line is ‘IPAPPEND 2’ Sounds like a PXE parameter.
Is the only way to force iPXE boot under ‘operating system’ → ‘PXE loader’ → ‘none’
or is there an additional switch?

I guess the image mounted by VMware will be created by “Boot disk iPXE”?
The following error occurs:

There was an error rendering the Boot disk iPXE - host template: undefined method bootdisk_chain_url’ for #Foreman::Renderer::Scope::Provisioning:0x0000000011e51530 Did you mean? boot_api_host_url`

A similar problem has been described here:

https://projects.theforeman.org/issues/17893

The template did work fine for the last few years.

What is your workflow? Is this VMWare BIOS PXE booting or you are using bootdisk?

It is really hard to navigate through your thoughts here. Perhaps if you could attach screenshots of the whole boot process.

If you use bootdisk and you try to render the template in the template editor it also will show the error that the bootdisk_chain_url is missing, however it should work in the ISO.

Also if you use bootdisk there is a generel bootdisk-template which can be configured under Administer → Settings → bootdisk if I remember correctly.

What is your workflow? Is this VMWare BIOS PXE booting or you are using bootdisk?

The image is mounted in VMware due to the lack of DHCP.

It is really hard to navigate through your thoughts here. Perhaps if you could attach screenshots of the whole boot process.

:grin: Sorry for that.
But actually I started to look for the problem in the wrong place.
Now I am working backward to the real source of the problem.

I guess the problem is with the boot disk

Before upgrading to 2.4 I could see the iPXE message in the VMware console. It locked like that:
OLD

Now
It even did not try to boot via iPXE.

Previously VMWare Bootdisk was using Host boot disk which is iPXE based.

Now, it uses Full host bootdisk which is PXELinux (SYSLINUX) based. It contains kernel and initramdisk so there is no need to use iPXE or download any stuff. It will use PXELinux template associated with your host for configuration where it will have kernel command line arguments for boot.

I think we failed to communicate this change, it is probably in some upgrade notes. We do not have any documentation as well! Created ticket: Document VMWare bootdisk provisioning · Issue #619 · theforeman/foreman-documentation · GitHub

Good to know.

That means instead of the iPXE-Templates the normal PXELinux-template assigned to the operating system is used? So in this case for Ubuntu that one: foreman/preseed_default_pxelinux.erb at develop · theforeman/foreman · GitHub ?

There is also the “IPAPPEND”-keyword, but why is it unknown in this case?

Edit: probably the same case as in https://bugzilla.redhat.com/show_bug.cgi?id=1492285

It will create something like that.

kernel http://archive.ubuntu.com/ubuntu/dists/bionic/main/installer-amd64/current/images/netboot/ubuntu-installer/amd64/linux initrd=initrd.img interface=auto url=http://xxx/unattended/provision?token=xxx&static=yes ramdisk_size=10800 root=/dev/rd/0 rw auto BOOTIF=01-${netX/mac:hexhyp} hostname=zzz domain=yyy console-setup/ask_detect=false console-setup/layout=USA console-setup/variant=USA keyboard-configuration/layoutcode=us locale=en_US netcfg/disable_dhcp=true netcfg/get_ipaddress=${netX/ip} netcfg/get_netmask=${netX/netmask} netcfg/get_gateway=${netX/gateway} netcfg/get_nameservers=${dns} netcfg/confirm_static=true
initrd http://archive.ubuntu.com/ubuntu/dists/bionic/main/installer-amd64/current/images/netboot/ubuntu-installer/amd64/initrd.gz

The problem is that the image will try to get its IP, network etc via DHCP

Which process will fill these variables? iPXE itself?

  • ${netX/netmask}
  • ${netX/gateway}
  • ${netX/mac:hexhyp}
  • ${netX/ip}

In this case the default PXELinux-Template in the full-host-iso does not include static IPs - in this case the template has to be adapted.

So for those kind of deployments the default templates are not sufficient if now full-host-iso is the new way of the bootdisk-deployments.

However, you can clone the template, add the host-parameters for the network-configuration and associate the new template with your operating system.