I have a Ubuntu 20.04.2 Server version template. I have configured IP addresses, Name servers gateway4, etc. as per the process via netplan. Whenever I am deploying VM from that template and provide specific IP (using custom specs). VM is showing the correct IP while it's configured correctly for the first time. If I reboot the new VM then again it's taking the old template IP address. No clue what I am missing.
Few result:
administrator@Ubuntu20LTS:~$ ls -al /etc/netplan
total 20
drwxr-xr-x 2 root root 4096 Jun 12 16:44 .
drwxr-xr-x 100 root root 4096 Jun 9 10:28 ..
-rw-r--r-- 1 root root 1024 Jun 12 16:44 .99-netcfg-vmware.yaml.swp
-rw-r--r-- 1 root root 485 Jun 12 16:43 50-cloud-init.yaml
-rw-r--r-- 1 root root 346 Jun 12 16:42 99-netcfg-vmware.yaml
administrator@Ubuntu20LTS:~$ cat /etc/netplan/99-netcfg-vmware.yaml
# Generated by VMware customization engine.
network:
version: 2
renderer: networkd
ethernets:
ens192:
dhcp4: no
dhcp6: no
addresses: [10.xx.xx.xx/23]
gateway4: 10.xx.xx.1
nameservers:
search: [xxx.xxx.com, xxx.xxx.com, xxx.xxx.com]
addresses: [xxxx.xxxx.xxxx.xxxx]
administrator@Ubuntu20LTS:~$ cat /etc/netplan/50-cloud-init.yaml
# This file is generated from information provided by the datasource. Changes
# to it will not persist across an instance reboot. To disable cloud-init's
# network configuration capabilities, write a file
# /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg with the following:
# network: {config: disabled}
network:
ethernets:
ens192:
dhcp4: true
match:
macaddress: 00:50:56:82:b7:a0
set-name: ens192
version: 2
more result:
administrator@Ubuntu20LTS:/etc/netplan$ ls
50-cloud-init.yaml 99-netcfg-vmware.yaml
Cat .99-netcfg
administrator@Ubuntu20LTS:~$ cat /etc/netplan/.99-netcfg-vmware.yaml.swp
b0nano 4.8▒rootUbuntu20LTS/etc/netplan/99-netcfg-vmware.yamladministrator@Ubuntu20LTS:~$
Can anyone help me with this issue?
configured IP in 99-netcfg.yaml
available file in netplan
dhcp enabled in 50-cloud-init.yaml