Skip to content

Things I Keep Forgetting

Estimated time to read: 1 minute

Last Updated: May, 2024

Duplicate MAC Address on Clones Machine

Sometimes when you clone a VM the new VM is always assigned the same IP from DHCP as the cloned VM. To solve this you can run the following commands

echo -n > /etc/machine-id
rm /var/lib/dbus/machine-id
ln -s /etc/machine-id /var/lib/dbus/machine-id

If using netplan you can add dhcp-identifier: mac to the Netplan file.

network:
  version: 2
  ethernets:
    ens192:
      dhcp4: yes
      dhcp-identifier: mac

ssh admin@fe80::250:56ff:feb6:65d6%ens192

  • fe80::250:56ff:feb6:65d6: the link-local address on the destination endpoint
  • ens192: the interface on the source device from which I'm SSH'ing

Comments