Migrate VM To NSX-T logicalswitch( Opaquenetwork). If you want to migrate vm to opaquenetwork in another vcenter , then copy the method(reconfigVMNicConnection()) from this sample and replace into in my another sample -i.e, https://code.vmware.com/samples/4607/migrate-a-vm-to-dvportgroup...
MigrateVMToOpaquenetwork.java
1) Migrate a sourceVC powerON/Off VM connected to standard switch portgroup to DVS dvportgroup in a second VC. 2) Migrate a sourceVC powerON/Off VM connected to one dvportgroup to another dvportgroup in a second VC. #MIT #xvmotion #vMotion #vSphereManagementSDK #CrossVC #Java ...
CrossVC_DVSvMotion.java