VMware Cloud Community
eric_krejci
Enthusiast
Enthusiast

how to connect a VM to a NSX-T PortGroup

Hello,

we have deployed NSX-T onto our infra and I'm facing issue scripting network assignment for VMs to these new portgroups.

if I do a Get-VirtualPortGroup or a Get-VDPortGroup I simply don't see the NSX-T portgroups. and of course I cannot assign them to the VMs.

my idea is to use it with the move-vm cmdlet for vmotion or cross vcenter vmotion.

the only thing is that the type needed for the -PortGroup parameter is a "VMware.VimAutomation.ViCore.Types.V1.Host.Networking.VirtualPortGroupBase" and not a "VMware.Vim.OpaqueNetwork"

any idea how to simply attach a VM to one of these portgroup?

I'm using the powercli 11

many thanks

Tags (3)
0 Kudos
0 Replies