VMware Cloud Community
Akopylov
Commander
Commander
Jump to solution

get-nicteaming of distributed port group.

Hello.

I`m trying to get nic teaming policy of dv port groups, but got issues with pipes (vsphere 5.5, dvswitch 5.5, powercli 5.5.0.6632 😞

PS C:\Windows\system32> $dv=Get-VirtualSwitch -Distributed

PS C:\Windows\system32> $dv

Name                           NumPorts   Mtu   Notes

----                           --------   ---   -----

dvSwitch                       1170       1500

PS C:\Windows\system32> $pgs=Get-VirtualPortGroup -VirtualSwitch $dv

PS C:\Windows\system32> $pgs

Name                      Key                            VLanId PortBinding NumPorts

----                      ---                            ------ ----------- --------

dvSwitch-DVUplinks-44     dvportgroup-45                        Static      18

Management Network        dvportgroup-46                        Static      128

INET_UITIS_ephemeral      dvportgroup-845                       Ephemeral   0

KSPD_ephemeral            dvportgroup-846                       Ephemeral   0

GZ_Interconnect_ephemeral dvportgroup-843                       Ephemeral   0

INET_GUEI_ephemeral       dvportgroup-844                       Ephemeral   0

VeeamISCSI_ephemeral      dvportgroup-849                       Ephemeral   0

VeeamISCSI                dvportgroup-92                        Static      128

Management_Network_eph... dvportgroup-847                       Ephemeral   0

ManNetwork_ephemeral      dvportgroup-848                       Ephemeral   0

vMotion1                  dvportgroup-51                        Static      128

KSPD                      dvportgroup-50                        Static      128

vMotion2                  dvportgroup-52                        Static      128

GZ_Interconnect           dvportgroup-49                        Static      128

INET_UITIS                dvportgroup-339                       Static      128

ManNetwork                dvportgroup-47                        Static      128

INET_GUEI                 dvportgroup-48                        Static      128

Then if I try this:

PS C:\Windows\system32> $pgs | foreach {Get-NicTeamingPolicy -VirtualSwitch $dv -VirtualPortGroup $_}

I got an error about conversion of "VMware.VimAutomation.ViCore.Impl.V1.Host.Networking.DistributedSwitchImpl" into "VMware.VimAutomation.ViCore.Types.V1.Host.Networking.VirtualSwitch".

And if I try this:

PS C:\Windows\system32> $pgs | foreach {Get-NicTeamingPolicy -VirtualSwitch $dv.name -VirtualPortGroup $_}

I got another error about vportgroup types conversion "VMware.VimAutomation.ViCore.Impl.V1.Host.Networking.DistributedPortGroupImpl" into "VMware.VimAutomation.ViCore.Types.V1.Host.Networking.VirtualPortGroup". No luck with "... -VirtualPortGroup $_.name" too, it says that I cant specify string type as input for -VirtualPortGroup.

It seems like "get-nicteamingpolicy" comandlet cant take dv types as input, but I`m not sure though.

Reply
0 Kudos
1 Solution

Accepted Solutions
LucD
Leadership
Leadership
Jump to solution

Seems I forgot you have to use Get-VDUplinkTeamingPolicy for VDS switches


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

View solution in original post

Reply
0 Kudos
5 Replies
LucD
Leadership
Leadership
Jump to solution

Try using Get-VDSwitch instead of Get-VirtualSwitch -Distributed.


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

LucD
Leadership
Leadership
Jump to solution

Seems I forgot you have to use Get-VDUplinkTeamingPolicy for VDS switches


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

Reply
0 Kudos
Akopylov
Commander
Commander
Jump to solution

Thanks, get-vduplinkteamingpolicy helps.

It seems like some of the replies in this thread are missing (some of mine too), is it possible that they were deleted by moderator? Cause I got no mail notifications about that.

Reply
0 Kudos
LucD
Leadership
Leadership
Jump to solution

At one point you replied in another thread (Re: Missing get-VDswitch in powercli 5.5??)

Would those be the missing replies ?


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

Akopylov
Commander
Commander
Jump to solution

Oh, I guess I need to sleep more o_O, sorry. Don`t know how did I reply in that thread.

Reply
0 Kudos