alterando o machine-id

dica do site: https://www.thegeekdiary.com/centos-rhel-7-how-to-change-the-machine-id/

What is machine-id

– The /etc/machine-id file contains the unique machine ID of the local system that is set during installation. The machine ID is a single newline-terminated, hexadecimal, 32-character, lowercase machine ID string. When decoded from hexadecimal, this corresponds to a 16-byte/128-bit string.
– The “machine-id” parameter is added from RHEL 7.1 to identify the machine in the network. Therefore this parameter must be unique.
– But when user clone the virtual machine that is installed RHEL 7.1, the cloned virtual machine’s “machine-id” is not changed, and some virtual machine may have the same “machine-id”.
– The user should change the “machine-id” of the cloned virtual machine for the server to be uniquely identifiable over the network.
– The machine-id is written into the file /etc/machine-id

# cat /etc/machine-id
daab00e07fed481d8ccf145b7affc0c5

Changing the machine-id

1. Clear the original “machine-id”
– The “machine-id” value is written in “/etc/machine-id”.
– We can either remove or empty the machine-id file to clear out the original value.

# rm /etc/machine-id

2. Create the new “machine-id” value
Generate a new machine-id by the “systemd-machine-id-setup” command which populates the remove file again with a new and unique machine-id value.

 

# systemd-machine-id-setup
Initializing machine ID from random generator.

3. Verify
Verify the new value of machine-id.

# cat /etc/machine-id
2175d9b2344a499abd87920c6f76f9a1
NOTE : This is applicable to CentOS / RHEL version 7.1 and above.

Deixe um comentário

Preencha os seus dados abaixo ou clique em um ícone para log in:

Logotipo do WordPress.com

Você está comentando utilizando sua conta WordPress.com. Sair /  Alterar )

Foto do Google

Você está comentando utilizando sua conta Google. Sair /  Alterar )

Imagem do Twitter

Você está comentando utilizando sua conta Twitter. Sair /  Alterar )

Foto do Facebook

Você está comentando utilizando sua conta Facebook. Sair /  Alterar )

Conectando a %s