Leveraging #sysctr #scvmm IP address management and keeping networking guys happy

One of the many cool features of VMM is fabric management and in specific network management. Of all the possibilities offered, I am going to focus on IP address management. Basically you can have VMM assign static IP addresses from a pool. Pools are defined per Logical Network and Network Site. When you provision a new VM (or a new host), based on your preferences and NIC binding an IP address and related settings (DNS servers, default gateway, …) an be assigned to the network interface. You can even interface VMM with an IPAM server so that these settings are in sync with your overall IP management strategy. See http://technet.microsoft.com/en-us/library/dn249418.aspx for more information.

When we started to push network management and IP addresses allocation via VMM we immediately collided with the network teams in charge of IP address allocation. This has been a scenario  we stumbled into for several customers. We got the following arguing form the networking people:

1.       I’m going to lose control of IP assignment, I need to know which IP is assigned to which server

2.       We currently use dhcp reservations for server so we can change DNS servers IPs or add other options centrally automating a refresh on the relevant servers

As usual it’s not an all or nothing story, the private cloud administrators want to have rapid provisioning, the networking people want to have control and fine tuning.

This post is about what we have been able to achieve and how typically answer to the networking arguing. The first topic is easily addressed, allocating an IP address pool it’s not losing control if we can provide a timely report of which IP address is allocated to witch server. Really there’s not difference in giving away one IP at time instead of a bunch of them if we are able to report IP allocation. This kind of reporting can be integrated in VM provisioning or simply with a couple of lines of powershell code:

Import-module virtualmachinemanager

Get-SCStaticIPAddressPool -Name ‘My pool’ | Get-SCIPAddress -Assigned | Select-object Address, Description, AllocatingAddressPool | sort Address | Export-Csv -Path c:\ip.csv


The second point is a little more complex. For sure we cannot set all the dhcp options via VMM IP address Pools, what we have are:


          DNS servers and suffixes

          WINS servers

If these options are enough and typically they are, it’s possible to automate the change of any of those parameters and without having to connect to each server to force the modification. This is far better than the DHCP reservation method where we have to wait for a server reboot or remotely force a refresh on every server. What we can achieve for running virtual machines with integration tools installed is a host based remediation of their IP settings.

The process is basically the following:

          Change the required setting in the IP pool

          Tell VMM the refresh the settings for every allocated IP address so it is compliant to the IP address pool setting

As usual powershell comes into help, the lines of code are at a minimum, but I opted to make it a function so you can download the code from technet gallery here.

The usage is super simple: Reset-VMAllocatedIPAddress PoolName ‘My Pool’


A special thank to my fellow MVP Daniel Neumann who helped with some poorly documented VMM powershell cmdlet.

Just one caveat, even if I implemented the WhatIf switch in my function the VMM cmdlets don’t, so it’s there just for future releases where hopefully the VMM cmdlets will start to implement the —WhatIf switch.


– Daniele

This posting is provided “AS IS” with no warranties, and confers no rights.




  1. NeWay Technologies – Weekly Newsletter #78 – January 17, 2014 | NeWay
  2. NeWay Technologies – Weekly Newsletter #78 – January 16, 2014 | NeWay

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: