The Error
During a recent thunderstorm one of the ESXi 6.5 hosts in my lab environment that was not on a UPS, rebooted from a power fluctuation and when it rebooted I received the following error:
Error loading /xorg.v00
Compressed MD5: d04cc03dd29bbe3fe547e9566f79674c
Decompressed MD5: 00000000000000000000000000000000
As the error indicates, the file /xorg.v00 appears to be corrupt and is causing ESXi to fail to boot.
At this point, there are really only 2 options to move forward – try to replace the file or perform a reinstall of ESXi. A reinstall really is not that big of a deal and does not take very long to do. It’s even less painful if you have been backing up the ESXi configuration regularly, which you have been doing right? Unfortunately, I did not have a recent copy of the configuration for this particular host and there were some recent networking changes I made that I would rather not have to set up again if I did not have to.
The Fix
Opting not to go for the reinstall meant trying to replace the file with a clean version. Because I always install ESXi on to USB drives, fixing this issue was even easier since I could just attach the USB to another host like a Windows machine and work on it from there.
First I needed to get a copy of the xorg.v00 file, which as it turns out is located at the root of the ESXi 6.5 ISO image that was used to install ESXi initially. Windows 10 has built in support for ISO images and will allow you to directly mount one as a virtual drive or you can also use something like 7-zip to extract the the entire ISO image. Either way, you will need to access the files on the ISO image and get a copy of the file you are looking for copied down to the local machine.
Now that we have a fresh copy of the corrupted file, xorg.v00, it is hopefully as easy as replacing the file on the bootable media. Like I mentioned before, since my bootable media is a USB drive this part was as simple as plugging the USB into a windows machine and locating the file to replace.
One thing to watch out for as shown above, is that the bootable media will often contain multiple partitions that are created during the ESXi install, so there may be multiple copies of the the same file in different locations. In my case I had 2 separate partitions that both contained the same file right off of the root of the drive. So I replaced both copies with the version pulled from the ISO image:
Sure enough, I was now able to get the server to fully boot:
If you are in a similar situation but the installation is on traditional drives in the server, instead of pulling the drives and inserting them into another machine I would look to leverage some sort of bootable or live OS to boot the server and then access the drive and replace the files that way. In the end it is really just a copy/paste job, so use whatever tools you are comfortable with to accomplish the task. If you need to create bootable USB drives for any ISO images, be sure to check out Rufus.
Now this is obviously more of a unsupported quick fix just to quickly get the host back up and running. Depending on how critical this host is in the environment, you may still want to look into rebuilding or reinstalling ESXi on a fresh drive once you get the server up and pull any information or back up any configurations you may need. For now though, this host lives on to see another day…