We have cloning multiple rocky machines, without dealing with the machine id. These machines are in labs, acting as nfs clients with sssd configuration etc.
Can this cause any problems ? Should we regenerate the machine id on the machines?
In certain situations it can cause problems when the machine-id is the same on each of the machines. I’ve known it to cause problems with Red Hat Satellite, when machines registered with Satellite conflict with each other.
Whether it will cause problems or not with sssd I have no idea, but from personal experience I always make sure that my machines have individual machine-id’s.
The question is who/what does use the ID? While they seem likely to be within the machine, the above example shows that there could be exceptions.
I prefer fresh installs followed by dropping identical configuration with Ansible playbooks. (The plays do not touch things that should remain unique.) On clouds I’ve seen “clone” option, but I do assume that it and/or cloud-init there does individualize the clones on install.
By what procedure?
The man machine-id notes:
systemd-machine-id-setup(1) may be used by installer tools to initialize the machine ID at install time, but /etc/machine-id may also be written using any other means.
systemd-firstboot(1) may be used to initialize /etc/machine-id on mounted (but not booted) system images.
and
The machine ID may be set, for example when network booting, with the systemd.machine_id= kernel command line parameter
You will find the machine has a file called /etc/machine-id, a symlink to this is found under /var/lib/dbus/ (on Rocky 8, on Rocky 9 I don’t have) therefore the procedure would be: