Adding an IP pool to VMM 2012
Although IP address pools are not required in VMM 2012, adding them brings into VMM the ability to assign IP addresses to hosts when converting a bare-metal computer to a Hyper-V host and to Windows virtual machines running inside the VMM-managed environment. In the figure below, you can see the results of creating a IP pool. In this pool, I’ve chosen to use only a subset of the IP addresses available in my home lab’s /16 address space. Note that the IP pool creation process includes asking for default gateway, DNS and WINS information. Also note that, while VMM 2012 supports both IPv4 and IPv6 IP address pools, you can’t mix them in a single pool.
Let’s take a walk through the process of creating an IP address pool. To get started, go to the Fabric area and click the Create button. From the menu, choose IP Pool.
On the first screen of the wizard, provide a name and description for the new IP pool. Also, choose which logical network you’d like to associate with the new pool.
Next up, specify the network site for the IP pool. In the figure below, you can see that I’ve created a new network site named Lab network with the IP address space of 192.168.0.0 and a /16 mask and associated this site with the All Hosts host group.
Fortunately, you don’t have to use the entire IP range at once. You can provide an IP address range instead. In this example, I’m setting aside 192.168.6.1 to 192.168.6.254. In this case, I do not need to provide any virtual IP addresses for load balancers nor do I need to reserve any addresses.
You can also provide the default gateway associated with the IP range specified earlier. For me, that’s 192.168.0.1.
DNS makes the world go ‘round! My DNS server is 192.168.3.1 for this lab system, so I’ll specify that here. I’ll also specify the DNS suffix.
I don’t use WINS.
Here’s how things look once I’ve made all of my selections. Click the Finish button to continue.
Once the new IP pool has been created, it will appear as a Fabric Resource.
In case you’re interested, here’s the PowerShell code that created this IP pool.
$logicalNetwork = Get-SCLogicalNetwork -ID "cf9baa5c-bbd7-438d-bbf2-0f30116d1ff1"
$subnetVLan = New-SCSubnetVLan -Subnet "192.168.0.0/16" -VLanID "0"
$hostGroup = @()
$hostGroup += Get-SCVMHostGroup -ID "0e3ba228-a059-46be-aa41-2f5cf0f4b96e"
$logicalNetworkDefinition = New-SCLogicalNetworkDefinition -LogicalNetwork $logicalNetwork -Name "Lab network" -SubnetVLan $subnetVLan -VMHostGroup $hostGroup
$allGateways = @()
$allGateways += New-SCDefaultGateway -IPAddress "192.168.0.1" -Automatic
# DNS servers
$allDnsServer = @("192.168.3.1")
# DNS suffixes
$allDnsSuffixes = @()
# WINS servers
$allWinsServers = @()
New-SCStaticIPAddressPool -Name "Virtual machine IP range" -LogicalNetworkDefinition $logicalNetworkDefinition -Subnet "192.168.0.0/16" -IPAddressRangeStart "192.168.6.1" -IPAddressRangeEnd "192.168.6.254" -DefaultGateway $allGateways -DNSServer $allDnsServer -DNSSuffix "globomantics.com" -DNSSearchSuffix $allDnsSuffixes -RunAsynchronously -Description "Range of IP addresses to assign to virtual machines"