ESXi: To DHCP or not to DHCP, that is the question

Discussing the issue of using DHCP to configure ESXi.

This one has been knocking about in my head for sometime. One of the main manual configurations I have to do with

ESXi, is set a number of IP related parameters:

  • Hostname
  • IP
  • Subnet Mask
  • Default Gateway
  • Primary & Secondary DNS Addresses
  • DNS Suffix

Before I can run my PowerShell configuration scripts against the ESX, it has to have an IP address and hostname that can be resolved, otherwise my PowerShell scripts go somewhat "doolally". So for sometime I have been toying with dispensing with a static configuration, and using DHCP to configure the ESXi host.

Horrifying isn’t it? If you're from EMEA like me, the idea of giving an physical server a DHCP address is an unspoken taboo. You just DON’T create that kind of dependency between the physical server and the outside world. Interestingly, I stuck rigidly to this view until last year, when I was stopped in my tracks by PowerPoint slide which said “use DHCP to solve this problem”. I was aghast. You’ll never get that past anyone in EMEA, I said – some of them can’t even get approval for DHCP for PXE booting in a server room LAN. And I guess that for many that will remain the case. It seems this culture is perhaps different across the pond…

In a very informal poll of my U.S. chums, the issue of using DHCP to configure ESXi seemed to garner the response, if it works for you, what’s the problem – I do it here… Perhaps all these years I’ve got stuck in a rut with DHCP?

So today, I thought I would experiment with reconfiguring the Linux DHCP service that runs in my UDA in my lab environment to lease a static “client-reservation” to my ESX host. I did that by adding:

host esx4 {
option host-name “esx4″;
option domain-name “vi4book.com”;
option routers 192.168.3.130, 192.168.3.199;
option domain-name-servers 192.168.3.130, 192.168.3.199;
hardware ethernet 00:15:60:AC:E4:40;
fixed-address 192.168.3.104;
}

I got the MAC address of the ethernet card from the HP ILO. Then I did a factory reset of the ESXi host, which left me with just the root password to setup on boot-up. Everything now is done by combination of DHCP with PowerShell.

This was first published in August 2009

Dig deeper on Creating and upgrading VMware servers and VMs

0 comments

Oldest 

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

SearchServerVirtualization

SearchVirtualDesktop

SearchDataCenter

SearchCloudComputing

Close