Skip to content

ESXi 8.0 DNS Configuration Pitfalls Guide: How Exactly Should Domain Name and Search Domains Be Filled In? ​

ESXi 8.0 DNS Configuration Diagram

Recently, while configuring networking on ESXi 8.0, I ran into a few baffling issues. I just wanted to set DNS, but two obstacles, “Domain name” and “Search domains,” appeared in the interface, and saving produced all sorts of errors. In this article, I’ll record the pitfalls I encountered and the solutions, hoping to help friends who run into the same problems.

Background ​

I am using an ESXi 8.0 host deployed in a Homelab environment. I plan to set the DNS server to Alibaba Public DNS (223.5.5.5 and 223.6.6.6), gateway points to 192.168.0.1.

The ESXi default TCP/IP stack (Default TCP/IP stack) through vmk0 The management port connects to the network. This is a typical configuration for a home or small-scale lab environment.

First enter Network → TCP/IP stack, you can see that there are multiple TCP/IP stacks in the current system:

ESXi TCP/IP stack list

What we need to edit is Default TCP/IP stack.

Default TCP/IP stack

The first pitfall encountered: Domain name is a required field. ​

Open Edit TCP/IP Configuration - Default TCP/IP Stack In the interface, after selecting Manually configure the settings for this TCP/IP stack, you will see a bunch of input boxes.

Edit TCP/IP Configuration Interface

After filling in Host name, Primary DNS, and Secondary DNS, you get ready to click "Save", only to find that the Save button is grayed out, or after clicking it, a red warning pops up:

Please provide a valid domain name, the length must be less than or equal to 62

In the ESXi 8.0 Web UI, when you choose to manually configure the TCP/IP stack,The Domain name field is mandatory..

Many people (including me) react at first: “I’m not joining a Windows domain, so why do I need to fill in a domain name?” So they leave it blank—and then it simply won’t save no matter what.

Solution ​

Simple, fill in one.legitimate placeholder domain name That's fine. As long as it conforms to the domain name format (letters, numbers, hyphens, dots), and the length does not exceed 62 characters.

What I filled in is homelab.local, saved successfully. If you don't want to use .local, or you can fill in lab.internal or myesxi.home etc.

Note: The domain name entered here does not need to actually exist, nor does it need to match your internal network environment; it is just a string used for identification. ESXi will use it as part of the host's FQDN (localhost.homelab.local).

Second pitfall: Search domains is also required, and you cannot enter an IP address. ​

After filling in Domain name, you might think: "Since the domain name has already been filled in, Search domains should be able to be left blank, right?"

No. In the manual configuration interface of ESXi 8.0,Search domains is also a required field, cannot be empty.

If you try to leave it blank, or fill in 223.5.5.5 Such an IP address will cause an error:

Please provide valid search domains, one per line, no commas.

If you mistakenly use commas to separate multiple domain names (for example homelab.local, lab.internal), which will also trigger this error.

The essence of the problem ​

Search domains (search domains) and DNS servers are completely different things. Many people (including me) were confused here.

Configuration itemFunctionlegal format
Primary/Secondary DNS serverDomain name resolution server addressIP address (e.g.223.5.5.5)
Search domainsShort hostname autocompletion suffixDomain name format (e.g.homelab.local)

The purpose of Search domains is: when you execute ping esxi01 When, the system will try in sequence esxi01.homelab.local,esxi01.lab.internal etc., saving the trouble of entering the full domain name.

The correct way to fill it in ​

Since it cannot be empty, just enter a domain name that is the same as the Domain name:

homelab.local

If there are multiple search domains, press One per line Fill in according to the format:

homelab.local
corp.internal

Absolutely prohibited: Separate with commas, spaces, or semicolons. ESXi only recognizes line breaks.

Saved successfully! Verify configuration ​

After completing the form as described above, click Save, and the interface will prompt that the configuration has been updated successfully:

Save success message

Return to the TCP/IP stack details page, and you can see that the DNS configuration has taken effect:

  • DNS address:223.5.5.5, 223.6.6.6

  • Domain name:homelab.local

  • Routing table:0.0.0.0/24 -> 192.168.0.1 (vmk0)

Everything is normal!

Final Configuration Summary ​

After some tinkering, my final configuration is as follows:

Hostname: localhost
Domain name: homelab.local
Preferred DNS: 223.5.5.5
Alternate DNS: 223.6.6.6
Search domain: homelab.local
IPv4 gateway: 192.168.0.1

Quick Q&A ​

Q: Fill in the domain name localhost Is that not allowed? ​

No.localhost Not a valid domain name format (missing top-level domain); ESXi will refuse to save it.

Q: Can Search domains be left blank? ​

In the "Manual Configuration" mode of ESXi 8.0,Not allowed. This is a required field and must contain at least one valid domain name.

Q: Can Search domains and Domain name be filled with the same value? ​

Yes, and this is the least error-prone way to fill it in.

Q: Can these restrictions be bypassed via the command line? ​

Okay. Use esxcli network ip dns server add Add DNS, use, and also esxcli system hostname set Set the hostname and domain name; the limitations of the GUI do not exist at the command line.

Q: Will filling these in affect my Internet access? ​

No. Domain name and Search domains are both identifier configurations for the local machine and intranet environment, and they do not affect the resolution of external domain names.

Conclusion ​

In the ESXi Web UI, in “Manual Configuration” mode, set Domain name and Search domains They are all set as required fields, and there are strict formatting requirements. In particular, Search domains cannot be separated by commas, which easily trips people up.

I hope this article helps you avoid detours and configure ESXi networking smoothly.

最后更新2026/11/07 14:16
如果你觉得这篇文章有帮助,或者想聊聊技术、工作,欢迎通过下面方式联系我:
contact fishfinal