Rancher Node Template to send hostname to DHCP-server while setting up network

Hi!

I’m running the following:

  • CentOS 7 with NetworkManager enabled
  • Rancher 2.3.6
  • Kubernetes 1.17.4
  • Docker 19.3.8
  • The nodes are provisioned using VMware templates and the Rancher vSphere provisioner

In our VLAN we use dnsmasq for DHCP/DNS. We have established a “VLAN IP Plan” which means that when we provision a new node, either manually or automatically from within Rancher, we want a node with a given name to always receive the same IP. According to the NetworkManager manuals this will be accomplished by setting the following properties on a NetworkManager connection such as:

ipv4.dhcp-hostname “” (empty string means that it should use the Rancher set hostname)
ipv4.dhcp-send-hostname true

Is it possible to specify the required cloud-init network settings (ipv4.dhcp-* settings above) “somewhere” which may be picked up during the provisioning phase as it’s cloud-init’s responsibility to create/instantiate a network connection based on available network device(s).

As I haven’t been able find a solution myself, the current provisioning doesn’t work as the node(s) being provisioned through Rancher gets an “arbitrary” IP (based on the VLAN range) effectively ignoring our IP/host plan residing in dnsmasq.

I feel I’m missing something here so any help on solving this would be very helpful!!!