ESXi boot disk failover / fallback (clone)?

Notice: Page may contain affiliate links for which we may earn a small commission through services like Amazon Affiliates or Skimlinks.

james23

Active Member
Nov 18, 2014
441
122
43
52
I'm trying to come up with a way to have a manual failover esxi boot disk in case of USB stick failure or for when I perform esxi (minor or major) updates or rare configuration changes that may need to be rolled back. (ie for a standalone host(s) that i don't have easy physical access to)

I thought I had a decent plan for doing this, until i actually tested it (then researched a bit). funny how that works...:)

My thinking was figure out which USB slot corresponds to which slot in the boot order, then clone my active esxi boot usb (USB "A") , to a 2nd "USB B" stick (of the same make/size, so just a standard dd if=/dev/sda of=/dev/sdb). Then as needed i could just change the boot order in BIOS (and from time to time update/clone USB A to USB B). However as others more knowledgeable with VMware may know- you're going to run into a PSOD on boot due to two devices having the same uuid (which did happen when i tested).
https://kb.vmware.com/s/article/1036340

Ideally, I could just use something like dd if=/dev/disks/mpx.vmhba32:C0:T0:L0 of=/vmfs/volumes/ds1/images/esx1.img , and then use a guest VM w the 2nd USB pass'd through, to "update the cloned USB" stick (which i wouldnt need to do too often).

i do realize the recommended way to handle this is to backup your esxi config (which i have automated anyway) , and if needed, reinstall esxi and restore config) , but my idea does seem to have some merit / use (as a quick fix/backup) for remote boxes , or for when a remote USB stick may fail. (+ your VIBs and other stuff will remain in tact)


The only other way (i can think of) to implement my idea maybe to use 2x sata DOMs (or disk) such that you can enable or disable each's sata port via BIOS. A bit sloppy as updating your "backup" disk will require a reboot (and boot a linux os to clone via). (or there are very few, but some, boards that BIOS allows you to disable/eanble indivudal USB sticks)


How do others handle this? (i'm mainly talking for managing a few scattered, non vCenter hosts, as i know there are more $, enterprise ways to handle this such as boot via iSCSI or PXE, or Vmware vSphere AutoDeploy). Also, Im not really talking about using RD1 (either via disks or via the various fancy SD card devices, like dell BOSS), but more so a way to have a manual or "lagging" independent backup you can quickly boot up, if needed (wo physical access to the box)

thanks
 
Last edited:

zxv

The more I C, the less I see.
Sep 10, 2017
156
57
28
another option is to kickstart install using a kickstart file on a local web server.

I don't backup, because far more often I install new hosts or upgrade, and the kickstart eliminates most of the work, and requires little or no mods within minor version upgrades, and variations in hardware (eg. HP, dell or vanilla esxi install CD).

How to Configure ESXi Unattended Installations: Part 1
https://docs.vmware.com/en/VMware-vSphere/6.7/vsphere-esxi-67-installation-setup-guide.pdf
example: dougm/packer-esxi

if you boot from the esxi install cd, and hold hold down the shift key, boot will stop at the grub prompt 'boot:', then enter the kickstart options:

ks=http://<your.web.server>/ks.cfg

It's also possible to modify the install iso, to insert the kickstart URL:
sed -i 's|runweasel|runweasel ks=https://<your.web.server>/ks.cfg|;' <iso root>/boot.cfg
Then installing a new host is as simple as mount the iso and USB drive, and power on.
PXE and iscsi are great, but I like fewer dependencies, which booting from USB provides.
 
  • Like
Reactions: BoredSysadmin