I just inherited a medium-scale Virtual Environment of just over 100 VMs on three different networks. Unfortunatly, my predicessor did not inventory the physcial hard disks utilized in my 19 physical servers, and if possible, I need a way to identify thier serial numbers without bringing the server down.
Is there a console command that can query this information?
I have a mix of Dell and HP servers, if that in any way helps.
I know you can get this with
sdparm
, but it's doubtful it's installed. Might be indmesg
; the drive model should be in there at least and you'll need to access tech support mode first.What I would do is just inventory the Dell service tags (and whatever the HP equivalent is; some others can probably assist there) of the servers and use the vendor's lookup tool to see what shipped with the server, what the warranty covers, etc.
Dell tags should be right on the front of the server if rack mounted or top-front if tower.
You should be able to get this from the tech support mode with
dmidecode
if it's installed with:dmidecode |grep -i "serial number"
and that might even work for the HP servers.EDIT
Another option (assuming you're using vCenter) would be to install the Dell vCenter plugin; it gives you OpenManage-like functionality (including a complete hardware inventory) for your Dell ESXi hosts. I would imagine that HP has something similar.
Probably the best option for not just disk serial numbers, but for ongoing monitoring/management of the ESXi hosts' hardware.
You can SSH into your ESXi server and use the
esxcfg
tools to find this information.Source: https://communities.vmware.com/thread/475325
See Also: Identifying disks when working with VMware ESXi/ESX
In VMWare ESXI the serial number of physical hard disks are at the end of their name. The whole name looks somthing like
and the serial number is the last part of it.
maybe using the vmware api: https://www.vmware.com/support/developer/vc-sdk/visdk400pubs/ReferenceGuide/vim.host.ScsiLun.html (search serialnumber on that site). Untested. You would need the vmware sdk