How to bypass vCenter from DNS resolution
search cancel

How to bypass vCenter from DNS resolution

book

Article ID: 327485

calendar_today

Updated On:

Products

VMware vCenter Server

Issue/Introduction

This article will help in bypassing the DNS resolution for a vCenter Server when the DNS Server is not available.

Situations where this could apply:

  • vCenter Services are not starting because DNS resolution is not working.
  • Services are started, but the vCenter will be inaccessible.
  • vCenter is accessible only via IP address but not through FQDN.



Environment

VMware vCenter Server 8.0.x
VMware vCenter Server 7.0.x
VMware vCenter Server 6.x

Resolution

*Note: Once DNS resolutions issues are resolved (example faulty DNS server), it is recommended to undo these changes.  Using this workaround long term could cause DNS resolution issues as VC will no longer be resolving its name via the designated DNS server.

  1. Login to vCenter via Putty/SSH.
  2. Back a backup of the dnsmasq.conf file

    cp /etc/dnsmasq.conf /etc/dnsmasq.conf.original

  3. Edit the dnsmasq.conf file and add addn-hosts=/etc/dnsmasq.hosts to the end

    Example of edited dnsmasq.conf 

    listen-address=127.0.0.1

    bind-interfaces

    user=dnsmasq

    group=dnsmasq

    no-negcache

    no-hosts

    log-queries

    log-facility=/var/log/dnsmasq.log

    domain-needed

    dns-forward-max=150

    cache-size=8192

    neg-ttl=3600

    addn-hosts=/etc/dnsmasq.hosts

  4. Create a file in /etc/ called dnsmasq.hosts

    vi /etc/dnsmasq.hosts
  5. Add entries in the following format:

    IP [TAB] VCFQDN [TAB] VCSHORTNAME

    For example:

    10.10.10.10 vcenter.example.com vcenter
  6. Save the file with :wq
  7. Restart the dnsmasq service

    systemctl restart dnsmasq.service

    Note: It may also be necessary to restart all the vCenter services.

Additional Information

This method can also be used while updating the case of a vCenter PNID, instead of creating a temporary DNS record for the process.