No IP After Clone
No IP Address After Cloning
This usually happens when the original system used netplan instead of the standard network configuration.
Rebuild machine-id (crucial!)
sudo rm /etc/machine-id
sudo systemd-machine-id-setup
Chose one of the two options below
Replace netplan with standard network configuration
-
Switch from netplan to standard DHCP:
sudo apt remove netplan.io sudo apt install ifupdown -
Configure DHCP - Edit
/etc/network/interfaces:auto lo iface lo inet loopback auto eth0 iface eth0 inet dhcp -
Restart networking:
sudo systemctl restart networking - Reboot the VM
Alternative: Keep Using Netplan
If You Prefer Netplan
If you want to keep netplan, just rebuild machine-id and configure netplan for DHCP:
-
Rebuild machine-id:
sudo rm /etc/machine-id sudo systemd-machine-id-setup -
Configure netplan - Edit
/etc/netplan/01-netcfg.yaml:network: version: 2 ethernets: eth0: dhcp4: true -
Apply configuration:
sudo netplan apply - Reboot the VM