Wednesday 9 November 2022

How to Change Machine ID after Cloning a VM on CentOS 7



A Machine ID is a unique hexadecimal, 32-character, lowercase code of the local system that is set during installation and represents an individual machine ID over the network.
 
This article describes How to Change Machine ID after Cloning a VM on CentOS 7.

[root@linuxcnf ~]# cat /etc/machine-id
077d51516a9550419d86f47cf832b910
[root@linuxcnf ~]#

 
Step 1. Remove Machine ID: Run the following command to remove the existing machine ID:
 
[root@linuxcnf ~]# rm /etc/machine-id
rm: remove regular file ‘/etc/machine-id’? y
[root@linuxcnf ~]#
 
Step 2. Generate machine ID: Run the following command to generate new and unique machine ID: 
 
[root@linuxcnf ~]# systemd-machine-id-setup
Initializing machine ID from KVM UUID.
[root@linuxcnf ~]#
 
Step 3. Validation: Run the following command to validate the generated new machine ID:
 
[root@linuxcnf ~]# cat /etc/machine-id
36e7b2cec924164895524e896bcbec16
[root@linuxcnf ~]#
 
Done!!! Now the new and unique machine ID generated on CentOS 7.

No comments:

Post a Comment