---
title: Preventing Duplicate machine-id When Cloning RHEL Virtual Machines
slug: turbine-installer/preventing-duplicate-machine-id-when-cloning-rhel-virtual-machines
docTags: 
createdAt: 2026-02-04T16:30:26.703Z
---

### Overview

When cloning Red Hat Enterprise Linux virtual machines on VMware, the system file /etc/machine-id is sometimes cloned along with the OS. This results in multiple hosts sharing the same machine identity, which is unsupported and can cause issues with system services, security tooling, and Kubernetes.

This article explains why this happens and how to correctly remediate and prevent it.

### What is machine-id

/etc/machine-id is a unique identifier generated by systemd for each operating system instance.

It is used by:

• systemd and journald

• Networking and D-Bus services

• Endpoint security agents such as Trellix

• Inventory, monitoring, and licensing systems

• Kubernetes node identity and stability

Each RHEL VM must have a unique machine-id.

### Why duplicate machine-id is a problem

If multiple VMs share the same machine-id, the following issues may occur:

• Security agents may overwrite or conflict with each other in management consoles such as Trellix ePO

• Kubernetes nodes may behave unpredictably or fail to register correctly

• Logs may collide or be misattributed

• Host identity in monitoring and inventory systems may be incorrect

• Systemd based services may malfunction

This configuration is unsupported and should be corrected immediately.

### How to fix an already cloned VM

Perform the following steps on each cloned VM.

1. Remove the existing machine-id files

:::BlockQuote
sudo rm -f /etc/machine-id
sudo rm -f /var/lib/dbus/machine-id
:::

2. Regenerate a new machine-id

:::BlockQuote
sudo systemd-machine-id-setup
:::

3. Reboot the system

:::BlockQuote
sudo reboot
:::

4. Verify uniqueness

:::BlockQuote
cat /etc/machine-id
:::

Ensure each VM reports a different value.

### Important note for Kubernetes or Trellix managed systems

If the system is already:

• Registered in Trellix ePO

• Joined to a Kubernetes cluster

It is recommended to:

• Remove or drain the node from Kubernetes

• Regenerate the machine-id

• Reboot

• Rejoin the Kubernetes cluster

• Re register the Trellix agent

This prevents identity conflicts across platforms.

### Preventing the issue in future clones

When creating golden images or VM templates:

• Remove /etc/machine-id before converting the VM to a template

• Do not clone powered on VMs

• Allow systemd to generate a new machine-id on first boot

• Use cloud init or first boot scripts when available

This ensures each VM receives a unique identity automatically.

### Summary

Cloning RHEL VMs with an existing machine-id causes duplicate host identities and can lead to operational and security issues.

Regenerating the machine-id after cloning and following proper template hygiene prevents these problems and is required for stable Kubernetes and endpoint security operation.

