MMcDonald_EWS
Contributor
Contributor

Issue with Get-VMGuest cmdlet not returning (some) network adapter information for some VMs/Adapters

I'm trying to gather some information from VMs using PowerCLI and ended up finding my way to the Get-VMGuest cmdlet.

 

When I query the .NICs property, on at least one VM in question, some information is missing, specifically the device and network name properties.  It does show that it's connected and has an IP though.  More odd is this VM has 2 adapters and this only happens on one of them.

 

Using Get-NetworkAdapter does not have this problem.

 

For example:

 

 

PS C:\> ((Get-VM myvm1 | get-vmguest).Nics

Device              NetworkName Connected IPAddress
------              ----------- --------- ---------
                                True      {10.xxx.xxx.101..
Network adapter 2   DMZxxx      True      {172.xxx.xxx.20...

PS C:\>
PS C:\>
PS C:\> get-vm myvm1 | Get-NetworkAdapter

Name                 Type            NetworkName     MacAddress         WakeOnLan
                                                                          Enabled
----                 ----            -----------     ----------         ---------
Network adapter 1    Vmxnet3         Comxxxxxxx-x... 00:50:56:8f:7c:18       True
Network adapter 2    Vmxnet3         DMZxxxx         00:50:56:8f:0b:59       True

 

 

 

Another similarly built VM does not have this same issue with Get-VMGuest.

 

 

PS C:\> (Get-VM myvm2 | get-vmguest).Nics

Device             NetworkName          Connected IPAddress
------             -----------          --------- ---------
Network adapter 1  Comxxxx-xxxx--...    True      {10.xxx.xxx.100:...
Network adapter 2  DMZxxx               True      {172.xxx.xxx.21:...

 

 

 

Any idea what is going on here?

Labels (3)
0 Kudos
9 Replies
LucD
Leadership
Leadership

What kind of Guest OS is running on those VMs with incomplete information?
Is that 2nd NIC with the missing info active/enabled inside the Guest OS?

The information coming from Get-VMGuest is the information gathered by the VMware Tools inside the Guest OS.
The Get-NetworkAdapter returns the information as seen by the hypervisor.

Some version info would help: PowerCLI, vSphere, VMware Tools, ...




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

0 Kudos
LucD
Leadership
Leadership

Thread moved to the PowerCLI Community


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

0 Kudos
MMcDonald_EWS
Contributor
Contributor

Both VMs are identical in configuration and use. 

  • OS: Windows Server 2016. 
  • Dual vmnics, same virtual networks
  • Both nics in use within the OS.
  • VMtools version running and v11333

PowerCli is version 12.5.0.19195797.

Powershell is version 5.1.19041.1320

vSphere: 6.7

 

I assumed Get-VMGuest was Tools/OS based, but was confused by the network names displayed.  Those names are defined in the hypervisor and not known by the OS.  At any rate, the fact it's pulling connected status and IP information shows it is pulling info from that adapter.  Just not sure why not the device or network name.

0 Kudos
LucD
Leadership
Leadership

Is the Guest OS in one or both of those VMs recently been restarted?


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

0 Kudos
MMcDonald_EWS
Contributor
Contributor

Broken one rebooted 5 days ago, working one rebooted 14 days ago.

0 Kudos
LucD
Leadership
Leadership

Is there anything in the vmware.log of the VM with the missing info?


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

0 Kudos
MMcDonald_EWS
Contributor
Contributor

I don't see anything of interest/out of the ordinary.  Also I had to power it down to even grab the vmware.log file.  After powering back up the issue remains, fwiw.

0 Kudos
LucD
Leadership
Leadership

Unfortunately, I don't have any Windows 2016 left in my lab, and I don't see anything similar on the VMs with a Windows Guest OS.

You could open an SR.


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

0 Kudos
MMcDonald_EWS
Contributor
Contributor

Well, I guess it was indeed a VMTools issue.  I reinstalled and now the issue is gone.  Just wish I didn't have to do this as it requires a reset of all NIC IP settings.  Anyway, thanks.

0 Kudos