WilliamLam.com

  • About
    • About
    • Privacy
  • VMware Cloud Foundation
  • VKS
  • Homelab
    • Resources
    • Nested Virtualization
  • VMware Nostalgia
  • Apple
You are here: Home / Uncategorized / Does ESXi Support DDNS (Dynamic DNS)?

Does ESXi Support DDNS (Dynamic DNS)?

08.01.2013 by William Lam // 5 Comments

An interesting feature request that was raised internally was for ESXi to support DDNS (Dynamic DNS) which allows a host client to update it's DNS record when using a DHCP Server. In most environments, to assign a hostname from DHCP, a DHCP reservation is used and this is maintained by the DHCP Server versus DDNS, where it is maintained by the client. Thanks to my colleague Eric Wager who did some quick research and found that ESXi does in fact supports DDNS and has been since ESXi 5.0.

I have not worked with DDNS much in the past and I have only seen it used for free/paid online services targeted at consumers to provide a well known address when their public IP Address changes frequently as with most ISPs. If your DHCP Server supports DDNS, this can be a handy feature to have, especially as you add new hosts you no longer have to manually create individual DNS record before hand and great for a lab environment. I did a big more digging to have a better understanding of how DDNS works with ESXi.

To enable support for DDNS on your ESXi host, you just need to set the hostname for the following ESXi Advanced Setting:

/Misc/PreferredHostName

You can do this in a variety of ways using either the vSphere Web/C# Client or using the command-line with ESXCLI.

Here is the syntax for the command:

esxcli system settings advanced set -o /Misc/PreferredHostName -s vesxi04.primp-industries.com

Once you have configured the setting, for the changes to go into effect, you will need to restart the management network. The easiest way to do this is via DCUI which you can run remotely by just typing dcui if you have an SSH session to your ESXi host. If you are using scripted install such as Kickstart, this can easily be automated as part of the post-install and upon first boot, DDNS will be enabled and configured with the proper hostname.

To test this in my lab environment, before enabling DDNS, I performed a reverse lookup of the assigned IP Address of my ESXi host from my DHCP server. In this example, the host received the address 192.168.1.135.

As you can see from the screenshot, a hostname could not be resolved as I would expect. After our changes, if we perform the reverse lookup again, we should now see the hostname that we had configured.

Another useful tidbit is the DHCP Client on ESXi is an ISC BIND implementation and this means if you require advanced things such as authentication keys, you can configured these options in /etc/dhclient-vmkX.conf where X is the specific VMkernel interface. For most deployments, you should not have to edit this file. Also if you want to prevent your DHCP Server from overriding the hostname of your ESXi host, you can add the following entry to the dhclient-vmkX.conf configuration file:

interface vmk0 {
   supersede host-name "vesxi04.primp-industries.com";
}

Just when I thought I knew about all the awesome features ESXi offers, it is a nice surprise to learn about another one!

More from my site

  • Detecting A Duplicate IP Address For Your ESXi Hosts Using a vCenter Alarm
  • Programmatically accessing the Broadcom Compatibility Guide (BCG)
  • Supported chipsets for the USB Network Native Driver for ESXi Fling
  • Quick Tip - Auditing ESXi boot firmware type
  • Recovering ESXi 7.x & 8.x host after forgetting or losing root password

Categories // Uncategorized Tags // ddns, dynamic dns, ESXi, ip address, ISC bind, mac address

Comments

  1. *protectedAnonymous says

    08/13/2013 at 2:28 pm

    This is indeed a nice feature. We found it and tried to use it in our deployment (vSphere 5.0) but we bumped into a problem: it is not supported by Host Profiles. Indeed, /Misc/PreferredHostName is embedded in the profile and we didn't find a way to make this value appear in the Answer File. So when we used Autodeploy, all our hosts have the same preferred hostname.

    Reply
    • *protectedAnonymous says

      08/21/2013 at 4:53 pm

      It's available in ESX 5.1 onwards via the answerfile/host profile/ Autodeply. It's available as:
      HostNamePolicy -> hostName ->

      Reply
  2. *protectedJohn Hossbach says

    05/09/2015 at 6:07 am

    Running ESXi 5.5 build 2068190 on a standalone host and this isn't working. Did it go away in 5.5? I set /Misc/PreferredHostName and restarted the Management Network. My AD DNS forward and reverse lookup zones are configured for unsecure dynamic updates.

    Reply
  3. *protectedRandom Sysadmin says

    01/13/2017 at 11:07 am

    Thank you. I didn't want to set a static IP and create an A record. I wanted to use DHCP and just connect by hostname, this worked perfectly. The only thing that was weird was that DCUI over SSH seemed like it worked, but it didn't actually restart the management network, or reboot the host when I told it to. Perhaps it was my SSH client (MobaXTerm). I had to physically go to the machine and restart the management network.

    Reply

Trackbacks

  1. Home Lab Fundamentals: DNS Reverse Lookup Zones – frankdenneman.nl says:
    06/13/2016 at 5:32 am

    […] register its DNS with a name server. For more information please check out William article "Does ESXi Support DDNS (Dynamic DNS)?" . Although he published it in 2013. it's still a valid configuration in ESXi […]

    Reply

Thanks for the comment!Cancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Search

Thank Author

Author

William is Distinguished Platform Engineering Architect in the VMware Cloud Foundation (VCF) Division at Broadcom. His primary focus is helping customers and partners build, run and operate a modern Private Cloud using the VMware Cloud Foundation (VCF) platform.

Connect

  • Bluesky
  • Email
  • GitHub
  • LinkedIn
  • Mastodon
  • Reddit
  • RSS
  • Twitter
  • Vimeo

Recent

  • Programmatically accessing the Broadcom Compatibility Guide (BCG) 05/06/2025
  • Quick Tip - Validating Broadcom Download Token  05/01/2025
  • Supported chipsets for the USB Network Native Driver for ESXi Fling 04/23/2025
  • vCenter Identity Federation with Authelia 04/16/2025
  • vCenter Server Identity Federation with Kanidm 04/10/2025

Advertisment

Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.
To find out more, including how to control cookies, see here: Cookie Policy

Copyright WilliamLam.com © 2025