OCI - How to change the machine-id of an Instance
in Linux
Applies to:
Oracle Cloud Infrastructure - Version N/A and later
Linux x86-64
Goal:
This document outlines the steps required to change the “machine-id” of an instance. It may be required to change the machine-id after cloning an instance.
Solution:
Use the systemd-machine-id-setup command to change the machine-id, by following these steps:
1) Make a backup copy of the existing file:
$ sudo cp -p /etc/machine-id /root/orig-machine-id
2) Clean out the contents of the existing file:
$ sudo cat /dev/null > /etc/machine-id
3) Create a new id:
$ sudo systemd-machine-id-setup --root=/ Initializing machine ID from random generator.
4) Check that the machine-id has a new id:
Tagged:
0