
Photon OS is VMware’s minimal Linux distribution, and in a small project in the lab I thought I should use it for some small lightweight Veeam Backup & Replication v10 Linux proxies. After deploying it, and converting it to a template, I ran into some very frustrating authentication issues after deployment. To make a very long troubleshooting story short, I forgot to ensure that a new unique machine-id was created, wrecking havoc with, amongst other things, the DHCP server assignments.
From the machine-id man page #
The /etc/machine-id file contains the unique machine ID of the local system that is set during installation or boot. The machine ID is a single newline-terminated, hexadecimal, 32-character, lowercase ID. When decoded from hexadecimal, this corresponds to a 16-byte/128-bit value. This ID may not be all zeros.
So remember, if you want to use Photon OS (and many other Linux distributions) as a template in vSphere, make sure the last command you run before shutting down and converting to a template, forces generation of a new machine-id.
The quickest way I thought of forcing this, is to run the following command:
echo -n > /etc/machine-id
This simply overwrites the /etc/machine-id file with a new empty one, forcing a new machine-id to be generated at the next boot.
Note
This is not a Photon OS specific issue as such, more a general Linux (and FreeBSD) one, but it was in Photon OS it came back to bite me. In many regards it’s akin to not forcing a new Security ID (SID) to be created for cloned Windows VMs, which also causes all sorts of problems, especially for domain joined machines.
Related Posts
- VMware Announcements September 2020 — The Resource List —
- VMware vSphere 7 Update 1 With Tanzu News —
- VMware Updates Minimum Requirements for vSphere 7 With Kubernetes in VCF —
- VMware vSphere 7 With Kubernetes and Tanzu Resources —
- The Problem with VMware vSphere 7 With Kubernetes —