From 11ff2dabfcf9cf487a37db71a25958dd625bd89c Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Fri, 17 Oct 2025 10:00:38 -0400 Subject: [PATCH] Clean up kickstart networking Try to apply hostname through localcli, since hostname is unsupported through net if dhcp. Also more affirimatively indicate dhcp. --- .../esxi7/profiles/hypervisor/scripts/makeksnet | 5 ++++- .../esxi7/profiles/hypervisor/scripts/modinstall | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/confluent_osdeploy/esxi7/profiles/hypervisor/scripts/makeksnet b/confluent_osdeploy/esxi7/profiles/hypervisor/scripts/makeksnet index eeb72ef7..7dcf966a 100644 --- a/confluent_osdeploy/esxi7/profiles/hypervisor/scripts/makeksnet +++ b/confluent_osdeploy/esxi7/profiles/hypervisor/scripts/makeksnet @@ -45,7 +45,10 @@ try: cfg['ipv4_gateway'] = ncfg['ipv4_gateway'] except Exception: pass -netline = 'network --hostname={0} --bootproto={1}'.format(nodename, cfg['ipv4_method']) +if cfg['ipv4_method'] == 'static': + netline = 'network --hostname={0} --bootproto={1}'.format(nodename, cfg['ipv4_method']) +else: + netline = 'network --bootproto=dhcp' if vmnic: netline += ' --device={0}'.format(vmnic) if cfg['ipv4_method'] == 'static': diff --git a/confluent_osdeploy/esxi7/profiles/hypervisor/scripts/modinstall b/confluent_osdeploy/esxi7/profiles/hypervisor/scripts/modinstall index 1907ef30..4dc880f8 100644 --- a/confluent_osdeploy/esxi7/profiles/hypervisor/scripts/modinstall +++ b/confluent_osdeploy/esxi7/profiles/hypervisor/scripts/modinstall @@ -5,6 +5,7 @@ mv /etc/confluent/confluent.deploycfg /etc/confluent/confluent.newdeploycfg mv /etc/confluent/confluent.newdeploycfg /etc/confluent/confluent.deploycfg chmod +x /tmp/makeksnet /tmp/makeksnet > /tmp/ksnet +localcli system hostname set --host $node python3 /tmp/getinstalldisk rootpw=$(grep ^rootpassword: /etc/confluent/confluent.deploycfg|sed -e 's/^rootpassword: //') echo rootpw --iscrypted $rootpw > /tmp/rootpw