quaint-airline-20784
06/03/2024, 11:36 AMsticky-tailor-45974
06/03/2024, 12:15 PMm-{UUID}
as a machineName
.
Also, you could attempt to define the ISO's system hostname in SeedImage cloudconfig and from then use
machineName: "${System Data/Runtime/Hostname}"
in registration to name the machine with the hostname at the time of registration.quaint-airline-20784
06/03/2024, 12:17 PMquaint-airline-20784
06/03/2024, 12:37 PMapiVersion: <http://elemental.cattle.io/v1beta1|elemental.cattle.io/v1beta1>
kind: MachineRegistration
metadata:
name: machineregistration-vmware
namespace: fleet-default
spec:
machineName: "${System Data/Runtime/Hostname}"
config:
cloud-config:
# datasource:
# providers:
# - "vmware"
runcmd:
- hostnamectl set-hostname $(vmtoolsd --cmd "info-get guestinfo.hostname")
users:
- name: root
passwd: root
elemental:
install:
reboot: true
device: /dev/sda
debug: true
machineInventoryLabels:
element: cluster-3-worker
manufacturer: "${System Information/Manufacturer}"
productName: "${System Information/Product Name}"
serialNumber: "${System Information/Serial Number}"
machineUUID: "${System Information/UUID}"
hostname: "${System Data/Runtime/Hostname"
quaint-airline-20784
06/03/2024, 12:38 PMrancher-13404
quaint-airline-20784
06/03/2024, 12:55 PMsticky-tailor-45974
06/03/2024, 12:55 PMmachineName: "${System Data/Runtime/Hostname}"
just uses the hostname at the time of registration. At this stage the hostnamectl set-hostname ...
is not yet applied. This should be applied at the cloud-config of the ISO, so it gets applied at ISO boot, this hostname should be set before registering in order to make it sticky via machineName
.sticky-tailor-45974
06/03/2024, 12:59 PMapiVersion: <http://elemental.cattle.io/v1beta1|elemental.cattle.io/v1beta1>
kind: SeedImage
metadata:
name: fire-img
namespace: fleet-default
spec:
cloud-config:
runcmd:
- hostnamectl set-hostname $(vmtoolsd --cmd "info-get guestinfo.hostname")
registrationRef:
name: <registration_resource_name>
namespace: fleet-default
baseImage: <iso_image_reference>
sticky-tailor-45974
06/03/2024, 12:59 PMquaint-airline-20784
06/03/2024, 1:00 PMquaint-airline-20784
06/03/2024, 1:29 PMsticky-tailor-45974
06/03/2024, 2:00 PM}
to close the template variable.quaint-airline-20784
06/03/2024, 4:03 PM