Spalte
Contributor
Contributor

PowerCLI - Move-VM to a Opaque NSX-T Network

Jump to solution

Hey,

i am currently developing a powershell / powercli script to migrate a batch of VMs from our legacy VLAN based portgroups and cluster structure to a new cluster and to the corresponding bridged vlan segments in NSX-T. We are still running vSphere 6.7u3 therefor all nsx-t segments are displayed as a Opaque network in vSphere.

I already tried to use the "Move-VM" command to safe some time and complete the migration for a single vm in one go. The problem with Move-VM is that it only accepts normal portgroups as input for the networkAdapters (ObjectType: "VMware.VimAutomation.ViCore.Types.V1.Host.Networking.VirtualPortGroupBase") while the Get-VirtualNetwork Command doesnt output the right type nether does the Get-View -ViewType OpaqueNetwork.

What would be the fastest / recommended way of approaching such  a migration ?

 

 

 

Labels (4)
0 Kudos
1 Solution

Accepted Solutions
lhoreis
Contributor
Contributor

Hi, 

you can use move-vm along with the parameter

-Network <Network[]>

and replace Network[] with your target network(s). 

Regards,

 

Lars

 

View solution in original post

1 Reply
lhoreis
Contributor
Contributor

Hi, 

you can use move-vm along with the parameter

-Network <Network[]>

and replace Network[] with your target network(s). 

Regards,

 

Lars

 

View solution in original post