Another day, another strange bug. This is just how my life works, apparently.
When deploying newer versions of ESXi on Cisco C-series servers that use Cisco’s FlexFlash SD card storage (although, admittedly this could be any server vendor) you may run into this fantastic error message that reads “Can’t have a partition outside the disk! Unable to read partition table for device.” This essentially means that the format in which the volume on the storage isn’t able to be used for an ESXi installation.
In looking into this issue we found Cisco KB CSCus51007 and countless blogs that tell you to do one of four things:
- Install ESXi 5.5U1 Customized Image and then upgrade to the flavor of ESXi of your choice.
- Take the SD card out, put it in a different computer, re-partition it (or make it blank) and then install ESXi.
- Boot into GParted and re-partition the SD card.
- Insert the SD card into a working ESXi host and use the recovery console shell to format the SD card.
I thought about this for a moment and came to a hypothesis. Is it possible to get to the recovery shell from the ESXi installer? Knowing what I know about how ESXi works, it just loads everything into memory at boot. The installer has to work the same way, right? So, when I booted up my image of 6.0 U3, I got to the window where you select your disk and wrote down the C#:T#:L# of the SD card volume and hit ALT+F1.
This was a triumph. One may even call it a huge success. The recovery console was available. A coworker of mine came over to see what I was up to and I explained what I was doing. He was as intregued as I was, as storage is his jam. I logged in as root (which in the installer, has no password set) and punched in ls. LS showed us that there was a /vmfs/ directory, just like a live version of ESXi.. In /vmfs/devices/disks/ we found our device.
The command you need to run to convert the volume is as follows: partedUtil mklabel “/dev/disks/deviceID” gpt. An example would look like this: partedUtil mklabel “/dev/disks/mpx.vmhba11:C0:T0:L0” gpt. Wait, why isn’t /vmfs/devices/ in the path name? /vmfs/devices/ is actually a symlink to /dev/. The command, from our testing, doesn’t even work when you use the symlink.
From there, hit ALT-F2 and re-scanned the storage for the installer. ESXi 6.0 U3 installed without issue. I hope this helps some admins in the future, as the resources out there on this problem aren’t great! A TL;DR is below with steps. Enjoy!
TL;DR: just give me the fix!
- Boot into ESXi’s installer
- Get to the disk selection screen and take note of the disk identifier
- Hit ALT+F1
- Navigate to /dev/disks/
- Use ls to find your disk identifier
- Use the following command to convert the disk into GPT: partedUtil mklabel “/dev/disks/deviceID” gpt
- Install ESXi
Disclaimer: If you break something using this, I take zero responsibility. Any advice you take from me is on you.