IP pools for VMware vSphere turn your vCenter server into a DHCP server for VMware virtual machines.
Follow me
Contents of this article

We’ve all been there. We spin up a new virtual machine and have to go through the whole process of assigning a static IP to the VM, even though this might be a testing server or a one-time use server for testing. After changing the IP settings—including, in my case where I’m doing a Linux VM, googling “how to change IP in Linux” every single time—we reboot or restart the network and then go from there. Why? For me, at least, it’s because I don’t like DHCP being available for a given VLAN unless I have a compelling reason to do so, meaning hardly ever for any containing servers.

Starting with version 4.0, VMware began introducing a feature called IP pools in vSphere installations that utilize a vCenter server. Essentially, IP pools turn your vCenter server into a DHCP server, but just for virtual machines. There are no physical ports that somebody can plug into and have themselves on your server VLAN, but as you spin up new VMs they will be able to automatically grab an IP. If you find yourself getting into vApps much (that is, multiple VMs created to serve a single application), you will find these IP pools may be a requirement from time to time. For example, I found this when beginning to deploy vCenter Operations Manager Foundation on my system (more on that coming soon to 4sysops.com!

Configuration ^

The configuration of an IP pool is fairly trivial if you’ve worked with Microsoft’s DHCP server before, as the required information is mostly the same. The big things to remember are that IP pools are created at the Datacenter level in vCenter, under the IP Pools tab, and they are applied to your networking port groups.

Subscribe to 4sysops newsletter!

  1. You start by clicking Add… in the IP Pools tab and giving your pool a name. As with DHCP, you will have to have a separate pool for each subnet you will be providing addresses to.
  2. Next, you need to provide the basic network information in the IPv4 (and/or IPv6) tab. This includes identifying the subnet and enabling your pool. The pool is specified by supplying the start address followed by the pound sign and the number of IPs you want available. For example, if you want to give out the IPs between 192.168.1.100 and 192.168.1.125, you would enter 192.168.1.100#25. You can verify your configuration by clicking the View link next to the box.
  3. Once that’s done, you just need to work your way through the tabs and fill in what information you need on the DHCP, DNS, and Proxy tabs. If DHCP is present on the VLAN you are attaching this IP pool to, there’s a box to check to let vCenter know about it. DNS information is pretty standard stuff. Just make sure you separate your redundant DNS servers with a comma, a semicolon, or a space. Also, if you have an HTTP proxy server going outbound that you’d like to advertise to the VM, you can do that here as well.
    IP pools in vCenter 5.1 - DNSIP pools in vCenter 5.1 - Verify IP
  4. Finally, you need to click the Associations tab and associate this pool with a given port group in your vSphere networking configuration. I typically try to make the IP pool name and the port group name match to make it easy on myself.
    IP pools in vCenter 5.1 - Association tab
  5. Finish up by clicking OK.

If you have multiple port groups you would like to have this ability for, feel free to do this over and over again. As best as I can tell, there is no limit to the number of IP pools that can be created. Now, if you start up a VM assigned to an associated port group without a static IP assigned, it will be reachable from the start.

0
1 Comment
  1. Marcus 8 years ago

    Hi,

    thank you for this tutorial - it helped a lot. But I think I found a little mistake in step 2 where you mentioned:

    "For example, if you want to give out the IPs between 192.168.1.100 and 192.168.1.125, you would enter 192.168.1.100#25"

    I don't have your experience in Network Administration, but I would enter 192.168.1.100#26 to give out the IPs between .100 and .125.

    Thanks again & greetings from Germany!
    Marcus

    0

Leave a reply

Please enclose code in pre tags

Your email address will not be published. Required fields are marked *

*

© 4sysops 2006 - 2021

CONTACT US

Please ask IT administration questions in the forums. Any other messages are welcome.

Sending

Log in with your credentials

or    

Forgot your details?

Create Account