It's important to know serial or tag numbers, Why? It's simple, you can usually use the vendors website to tell you when your hardware support is going to run out, that way you can renew it before a hardware fault occurs and get proper support and any faulty hardware replaced...
I have found two methods of querying the VMWare ESX OS environment to recover serial\tag numbers. the first is probably the easiest…..
Use Putty and connect to the ESXi box via SSH.
At the Shell prompt type….
At the Shell prompt type….
esxcfg-info | grep “Serial N”
With a bit of luck, the serial\tag number will have been collected by the ESX install process...if not then it's time to try something else....
The second way is to use the Vsphere PowerCLI powershell snap-in downloadable here…VMWare PowerCLI Download
It has dedicated vendor commands or cmdlets, the shell is dedicated to running standard powershell cmdlets, and has extra cmdlets to run Vsphere PowerCLI specific commands….AnyHoo…..here is what you do
In the PowerCLI shell connect to a ESXi box
Type…
Connect-viserver -server hostname -user username -password password
You will see the session connects to a server on port 443 and IDs the user and server…
Also note the security issue...the password is shown in clear text!!!
Type…
get-vmhost -name hostname | get-view
this will bring up a load of information, one of which is TAG…it may not be listed but we can now set the command to a variable and try another method….
$esx = (get-vmhost -name hostname) | get-view
All retrieved objects are now in an array variable and we can do a deeper search by typing
Write-Host $esx.Hardware.SystemInfo.OtherIdentifyingInfo[0].IdentifierValue
These commands can bring you back the server serial\tag number, if it’s configured on the system properly…if not then a visual inspection is required….
No comments:
Post a Comment