VMware Cloud Community
wiprochris
Contributor
Contributor
Jump to solution

How can I get a vCloud VM's NIC type?

I'm trying to write a script that will compare the NIC type in vCloud to the NIC type in vCenter to help workaround a bug in vCloud 1.5.  I can get a vCenter VM's NIC type by getting the vCenter VM and running:


$vcvm | Get-NetworkAdapter | ft -auto
Name              Type           NetworkName MacAddress        WakeOnLanEnabled
----              ----           ----------- ----------        ----------------
Network adapter 1 EnhancedVmxnet isolated    00:50:56:01:00:33             True


I don't get the same results when doing a similar action in vCloud:
$vcdvm | Get-CINetworkAdapter

Index Primary Connected  IPAddressAllocation IPAddress       ExternalIPAddress VM
----- ------- ---------  ------------------- ---------       ----------------- --
0     True    True       Manual              192.168.10.30                     nic1

I can get all the other NIC info such as the network, IP, MAC, etc, but not the type:
($vcdvm.ExtensionData.section)[2].networkconnection

Network                 : isolated
NeedsCustomization      : False
NetworkConnectionIndex  : 0
IpAddress               : 192.168.10.30
ExternalIpAddress       :
IsConnected             : True
MACAddress              : 00:50:56:01:00:33
IpAddressAllocationMode : MANUAL
AnyAttr                 :
VCloudExtension         :

For now, I'm getting the vCloud NIC type from the vCloud database itself.  Thanks for any assistance.

I'm using VMware vSphere PowerCLI 5.1 Release 1 build 793510

0 Kudos
1 Solution

Accepted Solutions
jake_robinson_b
Hot Shot
Hot Shot
Jump to solution

I could tell you where to find it, but there's a bug in the API that only shows it as PCNET32 anyway (eve though it could be VMXNET3). Keep doing what you are doing with the Database query. :smileygrin:

Cheers,

Jake

Jake Robinson VCP, vExpert - geekafterfive.com - Twitter: @jakerobinson

View solution in original post

0 Kudos
3 Replies
jake_robinson_b
Hot Shot
Hot Shot
Jump to solution

I could tell you where to find it, but there's a bug in the API that only shows it as PCNET32 anyway (eve though it could be VMXNET3). Keep doing what you are doing with the Database query. :smileygrin:

Cheers,

Jake

Jake Robinson VCP, vExpert - geekafterfive.com - Twitter: @jakerobinson
0 Kudos
Mzampo
VMware Employee
VMware Employee
Jump to solution

Hi wiprochris

did U found a solution?

0 Kudos
Infocrossing
Contributor
Contributor
Jump to solution

I just used PowerCLI and got the info from the db.  However, the issue was addressed by kb.vmware.com/kb/2047922

0 Kudos