Quantcast
Channel: VMware Communities: Message List
Viewing all articles
Browse latest Browse all 252940

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

$
0
0

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


Viewing all articles
Browse latest Browse all 252940

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>