Cloned VM acquires the same DHCP IP address towards guest customization process
searchcancel
Cloned VM acquires the same DHCP IP address towards guest customization process
book
Article ID: 316620
calendar_today
Updated On: 04-20-2021
Products
VMware vCenter Server
Issue/Introduction
This article provide steps on how to prevent newly cloned Ubuntu virtual machines to get the same DHCP IP addresses.
Symptoms: After cloning VMs that are running Ubuntu as Guest Operating System (OS) from VM template or a parent VM, you see this symptom:
The new VMs acquire the same DHCP IP addresses from the DHCP server, no matter if guest customization is applied or not.
Environment
VMware vCenter Server 6.7.x VMware vCenter Server Appliance 6.5.x VMware vCenter Server 6.5.x VMware vCenter Server 7.0.x VMware vCenter Server Appliance 6.7.x
Cause
This issue occurs when a virtual machine running the Ubuntu Guest OS is cloned, the newly cloned VM includes the same /etc/machine-id as the VM template or parent VM it was cloned from.
For Linux OS which uses /etc/netplan with default network renderer as systemd-networkd, such as Ubuntu Server 18.04, Ubuntu 19.10 and Ubuntu 20.04, the value of /etc/machine-id is used as a unique identifier when the DHCP server assigns an IP address for the Operating System. If two or more these guest OSes include the same /etc/machine-id, then they get the same IP addresses from the DHCP server.
Resolution
This is a known issue affecting newly cloned virtual machines running the Ubuntu Guest OS.
Currently, there is no resolution.
Workaround: To work around this issue, VMware recommends to prepare a VM template running an Ubuntu Guest OS with an empty /etc/machine-id.
Clone your VM template to a new VM.
Power on the new VM and run these commands inside the Linux Guest OS: