Skip to content

Field Notes

Cloned VM = same host keys + machine-id

A cloned lab VM needs its own identity before it joins the cluster.

Share

Cloned an Ubuntu VM to double a lab cluster. The clone carried identical SSH host keys and the same machine-id — a duplicate identity that breaks host-key trust and would collide in any fleet inventory.

Fix inside the clone:

bash
sudo rm -f /etc/machine-id /var/lib/dbus/machine-id
sudo systemd-machine-id-setup
sudo rm /etc/ssh/ssh_host_* && sudo dpkg-reconfigure openssh-server

Note for later: cloning a VM that's already joined to Kubernetes also needs kubeadm reset -f before rejoining.

Discussion

Questions, corrections, or a different approach? Join the discussion. Comments are public and hosted on GitHub; a GitHub account is needed to comment.

Open discussions on GitHub ↗