VMware Cloud Community
jFishner
Contributor
Contributor

Serial number ?

How to locate serial number for my hardware ESXi 4 ?

$h = Get-VMHost <escihostnamehere> | Get-View

$h.Hardware.SystemInfo

I get unknown

31 Replies
mattroblin
Contributor
Contributor

I tried running it and got blank fields I'm afraid - although I am running on an HP server and you seem to running your test on a Dell server judging by the Asset tag?

If I view the Hardware.SystemInfo elements I get the following from a server:

Vendor : HP

Model : ProLiant BL680c G5

Uuid : 34343335-3238-435a-4a38-313530305xxx

OtherIdentifyingInfo :

DynamicType :

DynamicProperty :

I have been trying to get the asset info from HP machines for a while but it seems HP do not populate this field? I can see the info in a grep from esx-info though ..

Hope this helps

Matt

Matt Roblin VCP3/4 'Fix the problem, not the blame.'
Reply
0 Kudos
mattroblin
Contributor
Contributor

I have posted a question on the HP support forums about the missing fields ... http://forums13.itrc.hp.com/service/forums/questionanswer.do?threadId=1373439

Not sure if I will get any useful responses but worth a try ..

Can VMware not give HP a friendly vendor to vendor nudge? Smiley Happy

Matt Roblin VCP3/4 'Fix the problem, not the blame.'
Reply
0 Kudos
harkamal
Expert
Expert

No Luck..

PS C:\> $col | % { $_.Hardware.SystemInfo}

Vendor : HP
Model : ProLiant DL580 G5
Uuid : 34353232-3931-4742-3839-xxxxyyyyzzzz
OtherIdentifyingInfo :
DynamicType :
DynamicProperty :


Vendor : HP
Model : ProLiant BL685c G1
Uuid : 58585858-5858-435a-4a37-xxxxyyyyzzzz
OtherIdentifyingInfo : {VMware.Vim.HostSystemIdentificationInfo}
DynamicType :
DynamicProperty :


Vendor : HP
Model : ProLiant BL680c G5
Uuid : 34343335-3238-435a-4a38-xxxxyyyyzzzz
OtherIdentifyingInfo :
DynamicType :
DynamicProperty :


Vendor : Hewlett-Packard
Model : ProLiant DL380 G6
Uuid : 34393133-3135-435a-4339-xxxxyyyyzzzz
OtherIdentifyingInfo :
DynamicType :
DynamicProperty :


Vendor : HP
Model : ProLiant BL680c G5
Uuid : 34343335-3238-435a-4a38-xxxxyyyyzzzz
OtherIdentifyingInfo :
DynamicType :
DynamicProperty :


Vendor : HP
Model : ProLiant BL680c G5
Uuid : 34343335-3238-435a-4a38-xxxxyyyyzzzz
OtherIdentifyingInfo :
DynamicType :
DynamicProperty :


PS C:\> $col |  % { $_.Hardware.SystemInfo.OtherIdentifyingInfo } | Select IdentifierValue, { $_.IdentifierType.Key }


IdentifierValue                                             $_.IdentifierType.Key
---------------                                             ----------------------
 unknown                                                    AssetTag



Reply
0 Kudos
mattroblin
Contributor
Contributor

It would appear there are other fields missing too on the HP side. Jonathan Medd's blog post for finding BIOS revisions also produces blank fields when run against HP servers Smiley Sad

Have tried pinging the question to @Proliant on Twitter ... not sure if it is manned or not ..

Fix the problem, not the blame.

Matt Roblin VCP3/4 'Fix the problem, not the blame.'
Reply
0 Kudos
mattroblin
Contributor
Contributor

Since the vCentre is able to see the Serial Number of the server in the Hardware Status plugin can someone tell us which CIM element it is querying?

It must be there somewhere!!!

Matt Roblin VCP3/4

'Fix the problem, not the blame.'

Matt Roblin VCP3/4 'Fix the problem, not the blame.'
Reply
0 Kudos
Zsoldier
Expert
Expert

Has anyone found any further information on this?  I'm running into the same issue w/ Dell systems.  Some of my hosts have the information populated, while others do not.  In all instances though, the information does show up under the hardware status tab in vCenter.

Chris Nakagaki (中垣浩一)
Blog: https://tech.zsoldier.com
Twitter: @zsoldier
Reply
0 Kudos
RvdNieuwendijk
Leadership
Leadership

Take a look at this thread: Script to get serial number of all hosts.

Blog: https://rvdnieuwendijk.com/ | Twitter: @rvdnieuwendijk | Author of: https://www.packtpub.com/virtualization-and-cloud/learning-powercli-second-edition
Reply
0 Kudos
venkyVM
Enthusiast
Enthusiast

You can query for CIM_Chassis using root/cimv2 namespace.

To test install a ssimple wbemcli client (apt-get install wbemcli on ubuntu)

[root@venkateshv ~]# wbemcli ei -nl -noverify 'https://root:<password>@<hostname>/root/cimv2:CIM_Chassis' | grep -i serial
-SerialNumber="XXXXXXXX"

Lemme Know if you have any problems retrieving this Info!

Thanks,

Reply
0 Kudos
Zsoldier
Expert
Expert

Yeah, I know there are ways around it, I'm looking more for a basic reason as to why some of my servers have that information populated and why others don't in PowerCLI.  I can't seem to find any commonality in ones that aren't returning that service tag information vs. ones that are.

Here is a for example:

4 ESX Classic Dell R710 Hosts running 4.0U2 all in the same cluster.

Each were built using the same PXE build method w/ a kickstart script doing customizations.

Each have OMSA 6.1 installed.

All UserVars around OEMCIM settings are enabled under Advanced Settings.

When querying powerCLI:

$VMHost = Get-Cluster ClusterName | Get-VMHost | Get-View

$VMHost[0].Hardware.SystemInfo

$VMHost[1].Hardware.SystemInfo

$VMHost[2].Hardware.SystemInfo

$VMHost[3].Hardware.SystemInfo

1 of 4 hosts has object information populated under the OtherIdentifyingInfo property.

3 of 4 hosts have no object information under the OtherIdentifyingInfo property.

I'm guessing something is not running or needs to be reset to populate those properties, but that seems to be unclear.

Chris Nakagaki (中垣浩一)
Blog: https://tech.zsoldier.com
Twitter: @zsoldier
Reply
0 Kudos
Zsoldier
Expert
Expert

So here is something interesting...  vCenter seems to be the culprit.

When connecting directly to one of my hosts that has no info in the example above, powerCLI returns the objects I'm looking for.

Seems in my prelim testing, disconnecting the host from vCenter, then reconnecting it seems to resolve the issue.

Anybody else like to confirm whether this works or not?

Chris Nakagaki (中垣浩一)
Blog: https://tech.zsoldier.com
Twitter: @zsoldier
Reply
0 Kudos
Zsoldier
Expert
Expert

Posted a quick and dirty script to disconnect and reconnect ESX hosts that are not providing Asset/Service Tag information here:

http://tech.zsoldier.com/2011/08/hardwaresysteminfootheridentifyinginfo.html

In case anyone else is interested.

Chris Nakagaki (中垣浩一)
Blog: https://tech.zsoldier.com
Twitter: @zsoldier
Reply
0 Kudos
vkev
Contributor
Contributor

Why not try this script after making a connect-viserver ?

$esxlist = get-vmhost

foreach($Esx in $esxlist){

$esxcli=Get-EsxCli -VMHost $Esx

write-host $Esx.Name $esxcli.hardware.platform.get().SerialNumber

}

Reply
0 Kudos