VMware Cloud Community
RS_IT
Enthusiast
Enthusiast
Jump to solution

Powercli Script to Migrate VMs along with the same Source Network to the New vCenter Server.

Hi ALL ,

I have checked few posts on migrating the VM's to the new vCenter server .

We have a New vCenter server where we are migrating the VMs from a source vCenter server . Below is the two things that i dont know how to connect together to make sure that bwfore we power on the VM the VM is connected to its source network .

Part 1 -- This script runs well but don't get any network on the destination vCenter.

Part 2 -- I want to preserve the Portgroup and the macaddress and Ip of the VMS and want to connect them to the new vCenter . How can i do that with the below script . Or how can i combine them together ?

Step2

# Unregister virtual machines

Step3

Step4

# Set Network Adapters

# Start virtual machines

Thanks in advance for any help.

Reply
0 Kudos
1 Solution

Accepted Solutions
RS_IT
Enthusiast
Enthusiast
Jump to solution

Hi ALL ,

 

I have made few changes to the script and it worked for me . We have added one host on the destination vCenter with all the portgroups and the storage mapped to it .

 

View solution in original post

Reply
0 Kudos
2 Replies
LucD
Leadership
Leadership
Jump to solution

You will have to create the portgroups, or make sure they exist, on the new vCenter


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

Reply
0 Kudos
RS_IT
Enthusiast
Enthusiast
Jump to solution

Hi ALL ,

 

I have made few changes to the script and it worked for me . We have added one host on the destination vCenter with all the portgroups and the storage mapped to it .

 

Reply
0 Kudos