Custom "/etc/hosts" entries are removed after rebooting VCD Cells
search cancel

Custom "/etc/hosts" entries are removed after rebooting VCD Cells

book

Article ID: 414807

calendar_today

Updated On:

Products

VMware Cloud Director

Issue/Introduction

  • User wants to put a persistent entry in the "hosts" file of a Cloud Director (VCD) Cell.
  • Changes to the "/etc/hosts" file on a VCD Cell do not persist after reboot.
  • The hosts file is responsible for mapping domains to IP addresses and used to record the likes of Active Directory or DNS addresses as well as the servers own Hostname, Fully Qualified Domain name and IP Address information.
  • This file is located on:
    • /etc/hosts

Environment

  • Cloud Director 10.6.x

Cause

  • There is a script on the Cell which configures the /etc/hosts file on reboot and it always completely recreates it based on the VCD Cell's NICs/hostname.
  • This script which runs on reboot is:
    • /opt/vmware/appliance/bin/update-etc-hosts-file.sh
  • As such if any entry is added manually to the /etc/hosts file this script will overwrite it.

Resolution

 You can configure VCD to use a second DNS server for example that can resolve the desired lookup of a hostname or IP.

Editing DNS server/servers is a documented step, Edit the DNS Settings of Your VMware Cloud Director Appliance.