Cloud-init guest customization couldn't set DNS and gateway successfully in Amazon Linux 2
search cancel

Cloud-init guest customization couldn't set DNS and gateway successfully in Amazon Linux 2

book

Article ID: 338890

calendar_today

Updated On:

Products

VMware vCenter Server

Issue/Introduction

Symptoms:
By default, guest customization on Amazon Linux 2 VMs will go through cloud-init guest customization workflow.
  • When customizing Amazon Linux 2 VMs with standard network settings, including enabling DHCP on all network interfaces, the DNS settings will not take effect.
  • When customizing Amazon Linux 2 VMs with manually select custom network settings, gateway settings will not take effect.


Environment

VMware vCenter Server 6.7.x
VMware vCenter Server 6.5.x

Cause

Amazon Linux 2 includes cloud-init 18.2, which does not honor DNS settings and gateway settings at guest customization.

Resolution

To resolve this issue, if DNS and gateway settings are required at guest customization, it is recommended to disable cloud-init guest customization, then it will go through perl-based guest customization workflow. For how to disable cloud-init guest customization, refer to Enabling or disabling Linux guest customization with cloud-init.