Skip to content

No IP After Clone

Quick Fix

Rebuild machine-id, then configure DHCP

  1. Rebuild machine-id:

    sudo rm /etc/machine-id
    sudo systemd-machine-id-setup
    

  2. Configure netplan - Edit /etc/netplan/01-netcfg.yaml:

    network:
      version: 2
      ethernets:
        eth0:
          dhcp4: true
    

  3. Apply configuration:

    sudo netplan apply
    

  4. Reboot the VM

Why This Happens

No IP Address After Cloning

This usually happens when the original system used netplan instead of the standard network configuration.

Alternative: Replace netplan with standard network configuration

Rebuild machine-id (crucial!)

sudo rm /etc/machine-id
sudo systemd-machine-id-setup

Replace netplan with standard network configuration

  1. Switch from netplan to standard DHCP:

    sudo apt remove netplan.io
    sudo apt install ifupdown
    

  2. Configure DHCP - Edit /etc/network/interfaces:

    auto lo
    iface lo inet loopback
    
    auto eth0
    iface eth0 inet dhcp
    

  3. Restart networking:

    sudo systemctl restart networking
    

  4. Reboot the VM