Perl based Guest Customization fails to set DNS settings with DHCP IP address on Debian 13
search cancel

Perl based Guest Customization fails to set DNS settings with DHCP IP address on Debian 13

book

Article ID: 422601

calendar_today

Updated On:

Products

VMware vCenter Server

Issue/Introduction

The /etc/resolv.conf file is overwritten by dhcpcd after reboot on Debian 13.

Environment

VMware vCenter Server 9.0

Cause

dhcpcd has a hook script which will overwrite the /etc/resolv.conf after the guest reboots post-customization.

Resolution

To work around this issue, perform the following steps:

1 - Using a text editor such as vi, open the following file:

/etc/dhcpcd.conf

2 - Add the following line to the file:

nohook resolv.conf

3 - Save and close the file.

This setting will prevent the overwrite of the /etc/resolv.conf file when an OS customization has DNS settings.