Lewati ke konten
Client Panel

DHCP not working on Ubuntu 22.04 and above template

Konten ini belum tersedia dalam bahasa Anda.

Artikel ini belum diterjemahkan. Isi berikut berbahasa Inggris. Buka versi asli bahasa Inggris.

To work around this issue, VMware recommends to prepare a VM template running an Ubuntu Guest OS with an empty /etc/machine-id.

  1. Clone your VM template to a new VM.
  2. Power on the new VM and run these commands inside the Linux Guest OS:
Terminal window
echo -n > /etc/machine-id
rm /var/lib/dbus/machine-id
ln -s /etc/machine-id /var/lib/dbus/machine-id
  1. Re-clone the new VM to a new VM template.

Solution 2 - Change client indentifier to MAC

Section titled “Solution 2 - Change client indentifier to MAC”

Alternatively, prepare a VM template explicitly setting the dhcp client identifier to mac.

set the dhcp-identifier: mac in the /etc/netplan/*.yaml file as below:

Terminal window
network:
version: 2
renderer: networkd
ethernets:
default:
match:
name: e*
dhcp4: yes
dhcp-identifier: mac

set the ClientIdentifier=mac in the /etc/systemd/network/default.network file.

Reference: link