Locating the ESXi install Disk

Locating the ESXi install Disk

“Dude, where’s my ESXi Install??”

I was asked this question recently- okay not with that exact phrasing granted, but I thought it might be useful to someone else, so here is a guide to nailing down where your ESXi is installed…

So you can run esxcfg-info -e and you’ll get your boot type back, this will either be visor-thin (means installable ESXi, typically means you’re installed on local disk or SAN), visor-usb (means embedded ESXi, typically means you’re installed on USB or SD, or visor-pxe for a PXE deployment.

If you want to go further you can run ls -lisa /dev/disks and you should be able to spot your boot device as the one with a load of partitions, like the vm1.0000xxxx entries in the output below:

~ # ls -lisa /dev/disks
total 8784623329
4      0 drwxr-xr-x    1 root     root           512 Mar 31 14:25 .
1      0 drwxr-xr-x    1 root     root           512 Mar 31 14:25 ..
165 3921920 -rw——-    1 root     root     4016046080 Mar 31 14:25 mpx.vmhba32:C0:T0:L0
155   4064 -rw——-    1 root     root       4161536 Mar 31 14:25 mpx.vmhba32:C0:T0:L0:1
157 255984 -rw——-    1 root     root     262127616 Mar 31 14:25 mpx.vmhba32:C0:T0:L0:5
159 255984 -rw——-    1 root     root     262127616 Mar 31 14:25 mpx.vmhba32:C0:T0:L0:6
161 112624 -rw——-    1 root     root     115326976 Mar 31 14:25 mpx.vmhba32:C0:T0:L0:7
163 292848 -rw——-    1 root     root     299876352 Mar 31 14:25 mpx.vmhba32:C0:T0:L0:8
145 4389890880 -rw——-    1 root     root     4495248261120 Mar 31 14:25 naa.600c0ff00012e5abe64a345301000000
143 4389889024 -rw——-    1 root     root     4495246360576 Mar 31 14:25 naa.600c0ff00012e5abe64a345301000000:1
166      0 lrwxrwxrwx    1 root     root            20 Mar 31 14:25 vml.0000000000766d68626133323a303a30 -> mpx.vmhba32:C0:T0:L0
156      0 lrwxrwxrwx    1 root     root            22 Mar 31 14:25 vml.0000000000766d68626133323a303a30:1 -> mpx.vmhba32:C0:T0:L0:1
158      0 lrwxrwxrwx    1 root     root            22 Mar 31 14:25 vml.0000000000766d68626133323a303a30:5 -> mpx.vmhba32:C0:T0:L0:5
160      0 lrwxrwxrwx    1 root     root            22 Mar 31 14:25 vml.0000000000766d68626133323a303a30:6 -> mpx.vmhba32:C0:T0:L0:6
162      0 lrwxrwxrwx    1 root     root            22 Mar 31 14:25 vml.0000000000766d68626133323a303a30:7 -> mpx.vmhba32:C0:T0:L0:8
164      0 lrwxrwxrwx    1 root     root            22 Mar 31 14:25 vml.0000000000766d68626133323a303a30:8 -> mpx.vmhba32:C0:T0:L0:8

If in doubt you can use partedUtil to check, grab the ID and plug it into partedUtil, like so: partedUtil getptbl /dev/disks/vml.0000000000766d68626133323a303a30
If it’s your boot device you should see your systemPartition and all your ESXi Partitions…

~ # partedUtil getptbl /dev/disks/vml.0000000000766d68626133323a303a30
gpt
488 255 63 7843840
1 64 8191 C12A7328F81F11D2BA4B00A0C93EC93B systemPartition 128
5 8224 520191 EBD0A0A2B9E5443387C068B6B72699C7 linuxNative 0
6 520224 1032191 EBD0A0A2B9E5443387C068B6B72699C7 linuxNative 0
7 1032224 1257471 9D27538040AD11DBBF97000C2911D1B8 vmkDiagnostic 0
8 1257504 1843199 EBD0A0A2B9E5443387C068B6B72699C7 linuxNative 0

To clarify further, go back to your ls -lisa /dev/disks output and now you know you’ve got the right device, grab the path identifier to your disk, in this case, mpx.vmhba32:C0:T0:L0, then run esxcli storage nmp device list | grep mpx.vmhba32:C0:T0:L0 and you’ll get your Device Display Name, so:

~ # esxcli storage nmp device list | grep mpx.vmhba32:C0:T0:L0
mpx.vmhba32:C0:T0:L0
Device Display Name: Local USB Direct-Access (mpx.vmhba32:C0:T0:L0)

Hope this helps, this should be good for ESXi 5.x and above I believe, anything older you may need to sub partedUtil for fdisk.

vM

Related posts