Name

machine-id — local machine ID configuration file

Synopsis

/etc/machine-id

Relation to OSF UUIDs

Note that the machine ID historically is not an OSF UUID as defined by RFC 4122, nor a Microsoft GUID. Starting with systemd v30 newly generated machine IDs however do qualify as v4 UUIDs.

In order to maintain compatibility with existing installations, an application requiring a UUID should decode the machine ID, and then apply the following operations to turn it into a valid OSF v4 UUID. With id being an unsigned character array:

/* Set UUID version to 4 --- truly random generation */
id[6] = (id[6] & 0x0F) | 0x40;
/* Set the UUID variant to DCE */
id[8] = (id[8] & 0x3F) | 0x80;

(This code is inspired by generate_random_uuid() of drivers/char/random.c from the kernel sources.)