As a regular moderator on the VMTN forums, I noticed a resurgence of questions around the use of vSphere IP Pools. Namely, the confusion around exactly both what they are used for and how to configure them. I think part of this confusion stems from the name of “IP Pool” which is somewhat incorrect. With the release of more and more vApps, especially the ever popular vCenter Operations suite, I am willing to bet more IP Pool related questions will crop up.
This post will go over some details to clear up the confusion, how to configure IP Pools, and some thoughts on using them in various environments from my past experiences.
If you reached this page looking for answers to the “Cannot initialize property ‘vApp? since network ‘Port Group’ has no associated IP Pools configuration” error, you may want to skip the Configuration section 🙂
Contents
What Exactly Is An IP Pool?
An IP Pool is just a fancy name for defining a network identity for vApps. In fact, per VMware:
IP pools provide a network identity to vApps. An IP pool is a network configuration that is assigned to a network used by a vApp. The vApp can then leverage vCenter Server to automatically provide an IP configuration to its virtual machines.
This is why I think the name is somewhat incorrect and could be clarified in future releases. Can it hold a pool of IP addresses? Yes. Does it always? No.
For the vast majority of situations, all you will be entering into an IP pool is a set of basic network configuration items: the subnet, netmask, gateway, and port group association. That’s it! Let me show you below what I have configured for my lab port group:
I’ve highlighted the subnet and netmask area in red on the top, and the gateway in red on the bottom.
Notice that the “Enable IP Pool” section is disabled. Confusing? 😛
So What Does “Enable IP Pool” Do?
This section is used to actually assign a pool of IP addresses to the IP Pool for vCenter to use in the case of transient IP address assignments. When creating a vApp, if you choose DHCP or Fixed IP addresses, having an actual pool of IP addresses enabled is not necessary. Usually, I use a fixed IP address for my vApps as they are performing specific services for the environment – such as with vCenter Ops. If the vApp was more volatile in nature, such as with a test / development workload, I may use DHCP or an IP Pool.
Transient (adj): Lasting only for a short time; impermanent
So it boils down to this: There is the “IP Pool” itself (that contains all the vApp configuration details) and an “IP Pool of addresses” within the IP Pool for handing out IPs to vApps with transient IP allocations. While you must create an IP Pool (the object) for most vApps to deploy properly, you do not typically have to Enable IP Pool (the pool of IP addresses).
How To Configure IP Pools
IP Pools are Data Center level objects. You will never find them at the cluster, host, or folder level. Click on your Data Center object to define them.
You can use the “Add…” button to define a new one. Beyond the subnet, netmask, and gateway, there are a few other areas to be aware of.
Configuring IP Pool Address Ranges
If you want to give the IP Pool a range of addresses to hand out to transient IP allocations, click the checkbox next to Enable IP Pool and enter a range. The syntax isn’t all that intuitive. Let’s use an example from my range:
10.0.50.100#10
This means that I am giving the pool a range of 10 addresses, starting with 10.0.50.100.
If you wanted to add another range, separate it with a comma like this:
10.0.50.100#10,10.0.50.200#10
And so on.
DHCP Awareness and DNS Settings
If you want the pool to leverage DHCP, check the box to let it know that a DHCP server exists. The Pool will not act as a DHCP server!
Additionally, if you want to offer DNS settings to the vApp, fill them in to the DNS tab. This tab is pretty self explanatory.
Port Group Association
Don’t forget to associate your IP Pool to a port group via the Associations tab.
Thoughts
I typically just go ahead and make an IP Pool for my primary virtual machine networks ahead of time, as almost all vApps deployed will be cranky without them. Just remember that an IP Pool doesn’t actually perform any DHCP functions, nor does it hand out IP addresses to vApps unless you enter and enable an IP Pool range. This particular configuration bit seems to stump a lot of admins the first time they have to set up a vApp, but is relatively easy to do once you get the hang of it.