adamant-kite-43734
09/09/2024, 9:30 AMfast-bear-60513
09/09/2024, 10:15 AMBefore=getty.target Unit), so I wonder if maybe the hostname is set to something different later on in the boot process. What are you experiencing the hostname to be?
Also note the related doc: https://elemental.docs.rancher.com/hostnamequaint-airline-20784
09/09/2024, 10:17 AMfast-bear-60513
09/09/2024, 10:18 AMspec:
config:
elemental:
cloud-config:quaint-airline-20784
09/09/2024, 10:38 AMelemental:
registration:
url: <https://dev.rancher2.xxx.com/elemental/registration/vx2l2wbdjglpqtrnsk9vpndz7md94mkdtth6q7qzc28p7c59g5rrbt>
emulate-tpm: true
emulated-tpm-seed: -1
auth: tpm
cloud-config:
runcmd:
- hostnamectl set-hostname $(vmtoolsd --cmd "info-get guestinfo.hostname")
?fast-bear-60513
09/09/2024, 11:08 AMfast-bear-60513
09/09/2024, 11:09 AMfast-bear-60513
09/09/2024, 11:11 AMelemental-register will apply the cloud-config that has been defined in the remote MachineRegistration, so appending any cloud-config to the elemental-register config.yaml is ineffectivesticky-tailor-45974
09/09/2024, 11:13 AMcloud-config in a SeedImage is applied at ISO boot, and the cloud-config in a MachineRegistration is applied at boot of an installed system.quaint-airline-20784
09/09/2024, 11:14 AMsticky-tailor-45974
09/09/2024, 11:14 AMcloud-config is the actual question then this is simplesticky-tailor-45974
09/09/2024, 11:15 AM/iso-config/<my_yaml_file>.yamlquaint-airline-20784
09/09/2024, 11:15 AMquaint-airline-20784
09/09/2024, 11:16 AMquaint-airline-20784
09/09/2024, 11:18 AMelemental:
registration:
url: <https://dev.rancher2.xx.com/elemental/registration/vx2l2wbdjglpqtrnsk9vpndz7md94mkdtth6q7qzc28p7c59g5rrbt>
emulate-tpm: true
emulated-tpm-seed: -1
auth: tpmquaint-airline-20784
09/09/2024, 11:18 AMsticky-tailor-45974
09/09/2024, 11:19 AMcloud-init syntax from the k8s resource, then the actual yaml file should include the appropriate shebang, so from your given SeedImage example, the yaml should looklike:
#cloud-config
runcmd:
- hostnamectl set-hostname $(vmtoolsd --cmd "info-get guestinfo.hostname")sticky-tailor-45974
09/09/2024, 11:19 AM#cloud-config at the first linequaint-airline-20784
09/09/2024, 11:21 AMelemental:
registration:
url: <https://dev.rancher2.xx.com/elemental/registration/vx2l2wbdjglpqtrnsk9vpndz7md94mkdtth6q7qzc28p7c59g5rrbt>
emulate-tpm: true
emulated-tpm-seed: -1
auth: tpm
#cloud-config
runcmd:
- hostnamectl set-hostname $(vmtoolsd --cmd "info-get guestinfo.hostname")
?sticky-tailor-45974
09/09/2024, 11:21 AM-map <my_custom_seedimage_cloud-config>.yaml /iso-config/cloud-config.yamlsticky-tailor-45974
09/09/2024, 11:23 AM-map flag. Let me try to rewrite your example, hold on, I might need 5min to copy & paste and reshape itsticky-tailor-45974
09/09/2024, 11:29 AMxorriso -indev $ISO.iso -outdev output/$ISO-$INSTANCE-$CI_COMMIT_SHORT_SHA.iso -map $CLUSTER-$INSTANCE.yaml /livecd-cloud-config.yaml -map $SEEDIMG_CLOUDCONFIG /iso-config/cloud-config.yaml -boot_image any replay
Where the variable $SEEDIMG_CLOUDCONFIG expands to a path of a file with the following content:
#cloud-config
runcmd:
- hostnamectl set-hostname $(vmtoolsd --cmd "info-get guestinfo.hostname")
So in the above command /livecd-cloud-config.yaml is the data that is used to actually register and the /iso-config/cloud-config.yaml is the cloud-config that is applied at ISO boot.quaint-airline-20784
09/09/2024, 11:32 AMquaint-airline-20784
09/09/2024, 1:01 PM