VMware Cloud Community
aefxx
Contributor
Contributor
Jump to solution

How to Get SC IP and VMK IP when using a dvswitch

Hello, I was wondering if there is an easy way to get the IP addresses for the Virtual Adapters I have specified for management and vmotion when using distributed vswitches. I saw Luc's site where he created some dvswitch functions but was wondering if there was already a way to get this information?

Tags (1)
Reply
0 Kudos
1 Solution

Accepted Solutions
LucD
Leadership
Leadership
Jump to solution

In PowerCLI 4.1 the Get-VMHostNetworkAdapter cmdlet also returns info for portgroups on dvSwitches.

Get-VMHost <esxname> | Get-VMHostNetworkAdapter -Console:$true | Select VMHost,PortGroupName,IP

will show the IP addresses for all SC, also those on a dvSwitch.

____________

Blog: LucD notes

Twitter: lucd22


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

View solution in original post

Reply
0 Kudos
4 Replies
LucD
Leadership
Leadership
Jump to solution

In PowerCLI 4.1 the Get-VMHostNetworkAdapter cmdlet also returns info for portgroups on dvSwitches.

Get-VMHost <esxname> | Get-VMHostNetworkAdapter -Console:$true | Select VMHost,PortGroupName,IP

will show the IP addresses for all SC, also those on a dvSwitch.

____________

Blog: LucD notes

Twitter: lucd22


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

Reply
0 Kudos
aefxx
Contributor
Contributor
Jump to solution

Thanks Luc, however, when I run that command it does not return a value, even with the spelling fix on "PortGrioupName" Smiley Happy

PS D:\Program Files\VMware\Infrastructure\vSphere PowerCLI&gt; Get-VMHost ESXHOST | Get-VMHostNetworkAdapter -Console:$true | Select VMHost,PortGroupName,IP

PS D:\Program Files\VMware\Infrastructure\vSphere PowerCLI&gt;

Reply
0 Kudos
LucD
Leadership
Leadership
Jump to solution

Oops, sorry for the typo. It's corrected.

Are you using PowerCLI 4.1 ?

Get-PowerCLIVersion

____________

Blog: LucD notes

Twitter: lucd22


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

Reply
0 Kudos
aefxx
Contributor
Contributor
Jump to solution

Ah that's most likely the answer. I had PowerCLI 4.1 installed but forgot I had removed it because VESI ecoshell had some bugs with it... Cheers.

Reply
0 Kudos