Name server got from DHCP might be missing in /etc/resolv.conf after reboot
search cancel

Name server got from DHCP might be missing in /etc/resolv.conf after reboot

book

Article ID: 312144

calendar_today

Updated On:

Products

VMware vSphere ESXi

Issue/Introduction

Prevent users to lose the name servers in /etc/resolv.conf on host after the next reboot.

Symptoms:
Name server got from DHCP might be missing in /etc/resolv.conf after reboot.

Environment

VMware vSphere ESXi 8.0.0
VMware vSphere ESXi 7.0.3

Cause

When a vmknic is already used as "Obtain settings automatically from a VMkernel network adapter", name servers in /etc/resolv.conf is got from DHCP server. Name servers got from DHCP will not persist to config store. If the vmknic's IP keeps as DHCP, every thing works fine. But if user changes the vmknic from DHCP to static IP, the name servers got from DHCP will be missing in /etc/resolv.conf on next reboot.

Resolution

No resolution available.

Workaround:
When a vmknic is already used as "Obtain settings automatically from a VMkernel network adapter", if user  wants to change its IP from DHCP to static or remove the vmknic, user needs to go to VC UI, select "Enter settings manually" on "DNS configuration" for default netstack on VC UI.