In some previous posts here at mobiletiger I explained how to use different ways to install ESXi, mostly to get a workaround for some N3150/J3160 systems, which „freeze their screen“ after outputting the message „relocating modules …“
|
Use option 4 and first install your ESXI inside a VMWare player on USB stick. Than boot from this stick as described in the above post. Be aware to download my latest ESXI 6.5 image. The IPXE installation over internet is outdated, I have to update and test the installation files with ESXi 6.5, latest update – when I have some time to spend. We will take a look at how to download and install VMware host client in ESXi 5.5. Download and Install VMware Host Client Download VMware Host Client. As similar to all softwares from VMware, you need to download and install VMware Host client vib file from the VMware website. This file needs to be installed on ESXi host. Download VMware Host. With ESXi 6.5, we take this capability of the firmware storing digital certificates and validating the boot loader and we build upon that. ESXi is comprised of a number of components. There is the boot loader, the VM Kernel, Secure Boot Verifier and VIBs, or “vSphere Installation Bundles”. Each of these components is cryptographically signed.
1. Kickstart overview
Not only did the installer completely boot, but the customer was able to perform both a fresh install of ESXi 6.5 as well as an upgrade from ESXi 6.0 to 6.5 on the Mac Pro 6,1 without any issues. Of course, we do not know if this is the real fix or if there are other issues. Find answers to Can not boot ESXi 5.1 host from USB becasue Fatal error: 33 (Inconsistent data) from the expert community at Experts Exchange.
I’m showing here, how to modify an ESXi ISO file, so that the installation runs completely automatically from USB.
This can be used in principle on all systems, of course also on the above described or on „headless systems“ without connecting a display.
To get a complete overview or to get a detailed list of installation methods and commands, please read the original document from vmware:
https://pubs.vmware.com/vsphere-65/topic/com.vmware.ICbase/PDF/vsphere-esxi-vcenter-server-65-installation-setup-guide.pdf
2. ISO image preparation
You’ll need a server with more than 4 GB RAM, at least two cores, SSD/harddisk and an empty USB stick (>=8GB).
CAUTION: DATA WILL BE OVERWRITTEN on USB stick and on your server. So use this procedure at your own risk!
First of all you’ll need an ESXi ISO file, perhaps a modified file which contains custom drivers for your system. Read my other article for some tips how to create your own custom installation ISO file or have a look here: http://www.v-front.de/p/esxi-customizer-ps.html
I made a custom ISO file with this command (see v-front.de for details):
.ESXi-Customizer-PS-v2.5.1.ps1 -v65 -vft -load net55-r8168,net51-r8169,sata-xahci
This image currently contains additional drivers for some ASRock and similar systems, e.g. Q1900/N3150/J3160/J3455-ITX
Download link is here: https://esxi.jorba.de/ESXi-6.5.0-20171204001-standard-customized.zip
(Updated Image 2018/02/03)
Than create a bootable USB stick (size >= 8GB), for example use portable Rufus for this task.
Download portable Rufus from here: https://rufus.akeo.ie/?locale=en_US
Insert an empty USB stick, use the above parameters and select your ESXi ISO image, than click on Start button to create a bootable USB installation.
(Again the warning not to overwrite some important data!)
Download boot.cfg and ks-nowipe.cfg from my blog and copy (replace) them on the USB stick. These are the kickstart files.
Download links:
https://esxi.jorba.de/ipxe/ESXi-6.5.0-20170304101/usbboot/boot.cfg
https://esxi.jorba.de/ipxe/ESXi-6.5.0-20170304101/usbboot/ks-nowipe.cfg
3. Boot from USB and start installation
Insert USB stick into your server, boot from USB
–> BIOS needs to be setup in legacy boot / compatibility mode (not UEFI).
–> Installation will need about 10 minutes to complete, there will be a reboot
Wait for completion!
Post installation customization
Embedded host client
After installation, you can manage the system with the embedded host client inside your browser: http://<ip-address>/ui
You will find the ip address inside your router’s DHCP status table.
Login credentials
The managing user is „root“, the initial password can be set in the ks-nowipe.cfg installation file.
If you use my above file without changes, the login it is simply „root/password„, so change it immediately 😀
ESXi shell / ssh
Fatal Error Zenekar
My kickstart files enable ESXi shell and ssh.
This are useful management tools, but if don’t need them, switch them off using the management client.
Fatal Error In Php
Direct console (DCU)
If the „direct console (DCU)“ is not working on your server due to missing video output or because you use the server „headless“, is can be accessed via SSH (if you leave it enabled).
Start putty or another ssh-tool, connect to your ESXi Server and enter the following commands:
export TERM=linux
dcui
ESXi console via SSH
Periodic Backup
A really good free backup script for ESXi is ghettoVCB:
http://www.virtuallyghetto.com/2015/05/ghettovcb-vib-offline-bundle-for-esxi.html
Feedback
This post was updated several times and will be updated periodically in the future.
Feedback welcome.
Antonio Jorba
Sadly this post will be really short as again, lots going on. Recovering a host that failed after a regular reboot, which had a superblock corruption on it’s main OS drive. Also, the BELK series will be done, I just need a bit more time. Sorry for the delays.
“Failed to load /sb.v00” [Inconsistent Data]
Since this drive was not on the main datastore on the host all the VMs were unaffected.
Now loading linux showed the drive data was till accessible, but I also had a feeling this USB drive was on it’s way out. I created a copy using DD, *sadly I didn’t do it the smart way and place it on a drive big enough to save it as a image file, but instead directly to another drive of the same size.
I tried to install the same image of ESXi on top of the current one in hopes it would fix the boot partition files along the way. This only made the host get past /sb.v00 and vault randomly past it with “Fatal Error: 6 [Buffer Too Small]”
I was pretty tired at this point since the server boot times are rather long and attempts were becoming tedious. I did another DD operation of the drive, to the same drive (still not having learned my lesson) and when I awoke to my dismay, it failed only transferring 5 gigs with an I/O error. This really made me sure the drive was on the way out, but it was still mountable (the boot partitions 5, 6 and 8)
At this point you might be wondering, why doesn’t he just re-install and reload a backup config? Which is fair question, however one was not on hand, but surely it must be somewhere on the drive. I know how to create and recover on a working host but a one that can’t boot? Then I found this gem.
Now through out my attempts I did discover the boot partitions to be 5 and 6 and I did even copy them from a new install to my copied version I made about and it did boot but was a stock config. I was stumped till I read the section from the above blog post on “How to recover config from a system that doesn’t boot”. Line 7 was what nailed it on the head for me:
“mount /dev/sda5 /mnt/sda5
7. In the /mnt/sda5 directory, you can find the state.tgz file that contains ESXi configuration. This directory (in which state.tgz is stored) is called /bootblank/ when an ESXi host is booted.”
I was just like … wat? That’s it. Grabbed the bad main drive mounted on a linux system, saw the state.tgz file and made a copy of it, connected the new drive that had a base ESXi config, replaced the state.tgz file with the one I copied, booted it and there was the host in full working state with all network configs and registered VMs and everything.
Not sure why the config is stored in the boot partition, but there you go. Huge Shout out to Michael Bose for his write I suggest you check it out. I have saved it case it disappears from the internet and I can re-publish it. For now just visit the link. 🙂