How To Migrate Logical Networks from VMM to VMM with PowerShell #VMM #SCVMM #HyperV #PowerShell

Introduction

VMM permits us to create logical grouping for all the networks which are involved in the Datacenter configuration. Once you create the logical grouping, VMM is able to manage the tasks of keeping the respective networks up-to-date and always in sync.

To implement Software Defined Networks in VMM, first you need to prepare the following building blocks:

  • Logical Networks
    • Network Sites:  VLAN ID | Network Subnets
    • IP Pools: IP Address Range | VIPS | Gateway | DNS
  • VM Networks
  • Port Profiles
  • Logical Switches

Unfortunately, the networking side in VMM was always pain to deal with.

Scenario

After working with an implementation of new VMM 2016, I have been trying to read and document all the networks that were created with the old VMM server.

My old VMM server Logical Networks look like this:

I still want to get all the network information that I had in the old VMM server to be able to create new virtual networks with the same network information on the second VMM server.

Here is a simple PowerShell script that helped me to migrate all Logical Networks, Network Sites, IP Pools and VM Networks from one VMM server to another VMM server:

You can also use this script to merge two different VMM servers to make them use the same configuration.

Here is the output after you run the script.

You can verify that all networks are created successfully on the second VMM server:

Hopefully this helps anyone else coming across this scenario.

Cheers,
-Ch@rbel-

About Charbel Nemnom 313 Articles
Charbel Nemnom is a Microsoft Cloud Consultant and Technical Evangelist, totally fan of the latest's IT platform solutions, accomplished hands-on technical professional with over 15 years of broad IT Infrastructure experience serving on and guiding technical teams to optimize performance of mission-critical enterprise systems. Excellent communicator adept at identifying business needs and bridging the gap between functional groups and technology to foster targeted and innovative IT project development. Well respected by peers through demonstrating passion for technology and performance improvement. Extensive practical knowledge of complex systems builds, network design and virtualization.

Be the first to comment

Leave a Reply