Field Notes
Cloned VM = same host keys + machine-id
From the chapter: The cluster that almost wasn't
A cloned lab VM needs its own identity before it joins the cluster.
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-serverNote 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.