Posted on 07-11-2014 12:25 PM
If you're running ESXI servers, while you can't get a LOT of information directly from ESXi via SNMP, there's still one set of OIDs that is of use, namely the .iso.org.dod.internet.private.enterprises.vmware group or .1.3.6.1.4.1.6876
With the exception of the first five, which give you info about the server itself:
.iso.org.dod.internet.private.enterprises.vmware.vmwSystem.vmwProdName.0 = STRING: VMware ESXi
.iso.org.dod.internet.private.enterprises.vmware.vmwSystem.vmwProdVersion.0 = STRING: 5.5.0
.iso.org.dod.internet.private.enterprises.vmware.vmwSystem.vmwProdBuild.0 = STRING: 1331820
.iso.org.dod.internet.private.enterprises.vmware.vmwSystem.vmwProdUpdate.0 = STRING: 0
.iso.org.dod.internet.private.enterprises.vmware.vmwSystem.vmwProdPatch.0 = STRING: 0
The rest of that OID group are set up in a series of tables. For example, the .iso.org.dod.internet.private.enterprises.vmware.vmwVirtMachines.vmwVmTable, (.1.3.6.1.4.1.6876.2.1) which gives you basic info on each vm you're running on that server, such as display name, config file path, Guest OS info, Mem size, state, guest OS state, CPUs and the VM UUID:
.1.3.6.1.4.1.6876.2.1.1.2.4 = STRING: windows7vm
.1.3.6.1.4.1.6876.2.1.1.2.5 = STRING: IT Wiki Server
.1.3.6.1.4.1.6876.2.1.1.2.6 = STRING: IE7 Test
.1.3.6.1.4.1.6876.2.1.1.2.7 = STRING: IE9 Test
.1.3.6.1.4.1.6876.2.1.1.2.11 = STRING: Netmon
.1.3.6.1.4.1.6876.2.1.1.3.4 = STRING: /vmfs/volumes/514de32a-0545af22-c0e7-c82a1458fb71/windows7vm/windows7vm.vmx
.1.3.6.1.4.1.6876.2.1.1.3.5 = STRING: /vmfs/volumes/514de32a-0545af22-c0e7-c82a1458fb71/IT Wiki Server/Jabber Server.vmx
.1.3.6.1.4.1.6876.2.1.1.3.6 = STRING: /vmfs/volumes/514de32a-0545af22-c0e7-c82a1458fb71/IE7 Test/IE7 Test.vmx
.1.3.6.1.4.1.6876.2.1.1.3.7 = STRING: /vmfs/volumes/514de32a-0545af22-c0e7-c82a1458fb71/IE9 Test/IE9 Test.vmx
.1.3.6.1.4.1.6876.2.1.1.3.11 = STRING: /vmfs/volumes/514de32a-0545af22-c0e7-c82a1458fb71/Netmon/Netmon.vmx
.1.3.6.1.4.1.6876.2.1.1.4.4 = STRING: Windows 7 Professional, 32-bit Service Pack 1 (Build 7601)
.1.3.6.1.4.1.6876.2.1.1.4.5 = STRING: OS X 10.9.4 (13E28)
.1.3.6.1.4.1.6876.2.1.1.4.6 = STRING: Windows Vista x64 Edition (Build 6000)
.1.3.6.1.4.1.6876.2.1.1.4.7 = STRING: Windows 7 Professional, 64-bit (Build 7600)
.1.3.6.1.4.1.6876.2.1.1.4.11 = STRING: OS X 10.9.4 (13E28)
.1.3.6.1.4.1.6876.2.1.1.5.4 = INTEGER: 2048 megabytes
.1.3.6.1.4.1.6876.2.1.1.5.5 = INTEGER: 2048 megabytes
.1.3.6.1.4.1.6876.2.1.1.5.6 = INTEGER: 2048 megabytes
.1.3.6.1.4.1.6876.2.1.1.5.7 = INTEGER: 1024 megabytes
.1.3.6.1.4.1.6876.2.1.1.5.11 = INTEGER: 4096 megabytes
.1.3.6.1.4.1.6876.2.1.1.6.4 = STRING: powered on
.1.3.6.1.4.1.6876.2.1.1.6.5 = STRING: powered on
.1.3.6.1.4.1.6876.2.1.1.6.6 = STRING: powered on
.1.3.6.1.4.1.6876.2.1.1.6.7 = STRING: powered on
.1.3.6.1.4.1.6876.2.1.1.6.11 = STRING: powered on
.1.3.6.1.4.1.6876.2.1.1.8.4 = STRING: running
.1.3.6.1.4.1.6876.2.1.1.8.5 = STRING: running
.1.3.6.1.4.1.6876.2.1.1.8.6 = STRING: running
.1.3.6.1.4.1.6876.2.1.1.8.7 = STRING: running
.1.3.6.1.4.1.6876.2.1.1.8.11 = STRING: running
.1.3.6.1.4.1.6876.2.1.1.9.4 = INTEGER: 1
.1.3.6.1.4.1.6876.2.1.1.9.5 = INTEGER: 2
.1.3.6.1.4.1.6876.2.1.1.9.6 = INTEGER: 2
.1.3.6.1.4.1.6876.2.1.1.9.7 = INTEGER: 1
.1.3.6.1.4.1.6876.2.1.1.9.11 = INTEGER: 4
.1.3.6.1.4.1.6876.2.1.1.10.4 = STRING: "564de104-be6f-55dc-523e-ec99bbc6c518"
.1.3.6.1.4.1.6876.2.1.1.10.5 = STRING: "564d526e-5087-6fdc-403e-1af07ff970cf"
.1.3.6.1.4.1.6876.2.1.1.10.6 = STRING: "564d5a9f-9e0c-c39f-6c10-2cbe83a25df4"
.1.3.6.1.4.1.6876.2.1.1.10.7 = STRING: "564dfe36-d0a8-b16b-4619-c70cec99403b"
.1.3.6.1.4.1.6876.2.1.1.10.11 = STRING: "564da02e-13d8-cf90-d130-b9c0efae2171"
The .iso.org.dod.internet.private.enterprises.vmware.vmwVirtMachines.vmwVmNetTable (.1.3.6.1.4.1.6876.2.4) gives you the MAC addresses for the VMs:
.1.3.6.1.4.1.6876.2.4.1.7.4.4 = STRING: 0:c:29:c6:c5:18
.1.3.6.1.4.1.6876.2.4.1.7.5.4 = STRING: 0:c:29:f9:70:cf
.1.3.6.1.4.1.6876.2.4.1.7.6.4 = STRING: 0:c:29:a2:5d:f4
.1.3.6.1.4.1.6876.2.4.1.7.7.4 = STRING: 0:c:29:99:40:3b
.1.3.6.1.4.1.6876.2.4.1.7.11.4 = STRING: 0:c:29:ae:21:71
so on and so forth.
you can get the same info from various fat/web clients, but this can be handy if you're building your on management console.
Posted on 07-11-2014 01:44 PM
Thank you @johncwelch][/url. I actually set up an ESXi server last week and have been having a lot of fun with it so this is good info.
Posted on 07-11-2014 01:46 PM
Excellent! If you haven't yet, download the VMware Fusion 2014 July Technical Preview. It's got some basic ESXi features, like a MUCH better console and drag and drop to copy VMs from Fusion -> ESXi
Posted on 03-31-2016 03:50 AM
Dear John,
Can you advise how to get System OID on esxi 4 & 5 ,
THanks,
Rajesh