VMware Cloud Community
gmixail
Contributor
Contributor
Jump to solution

ESXi on USB and backup USB

So, I have installed ESXi on a 16gb USB and it followed the installable rather than the embedded installation process.

After the installation I changed the 'ScratchConfig.CurrentScratchLocation' to my datastore 'vmfs/..........'.

I also cloned the USB (after the installation) so I can have a backup USB with ESXi ready.

Do I need anything else to make the backup USB work in case of emergency? For example, if a year from now the original USB fails and I replace it with the backup USB, will I need to do anything else or the backup USB will take ALL the config from the datastore, where I configured it to go and it will boot up exactly like the original USB?

0 Kudos
1 Solution

Accepted Solutions
admin
Immortal
Immortal
Jump to solution

If your USB flash drive fails and you need to revert to the clone you will lose the following:

1) any update to ESXi that you might have installed to the USB flash drive, as I'm sure you already knew but just to be complete.  So anytime you update to a new version of ESXi you'll have to reclone.  There are better options and I'll mention those in a minute.

2) any update to the VMware tools that you may manually pull down.  I believe you can now can now avoid this by configuring to always pull the tools from the Web, but I haven't tried it myself so try at your own risk.  Again, there is a better option that avoids this.

The above two happen in response to discrete actions that you will be aware of so you can reclone but it will be an extra step when you upgrade.  If your OEM supports it you can purchase RAIDed USB flash or SD card solution.  RAID 1 is used so all writes are duplicated but all reads are directed only one USB device.  The second device is effectively a hot standby clone constantly updated.  This solution solves both of the above issues plus the next one.

3) most importantly, any changes to your ESXi local configuration state that you have made.  These changes happen as configure and reconfigure networking, storage and other aspects of your host to optimize performance and etc.

The above solution of RAIDed USB flash or SD cards handles this third exposure as well but for the manual reclone option that you are currently using it is probably impracticable to reclone every time you change the configuration state.  However you can pull most of this state out of your host using host profiles but note that you will still need to reclone whenever you update ESXi or the VMware tools..  Ordinarily pulling a host profile requires an operation from VC and might be scriptable there.  If not and you are feeling adventurous read on ...

************************************* Bleeding edge ... try at your own risk ***************

Host profiles can be extracted and applied at ESXi command line using a tool "esxhpcli".  The tool has a terse but adequate help.  You need to generate and save both the host profile and the answer file.  You can run a cron job to pull those every night and save them on a network disk.  If the day comes when you need to use the clone simply boot from it, manually pull down the host profile (it will not be in a format compatible with VC) and apply it with esxhpcli.  Don't forget the answer file.  Also, realize that you'll need to first manually configure to get to the network share with, for example, esxcfg-nas or esxcli. Alternatively you could manually copy the proper host profile and answer file while the clone is attached to another host.  If an ESXi host you'll need to remove the device from USB passthrough using "esxcli hardware usb passthrough device" commands.  Good luck!

View solution in original post

0 Kudos
1 Reply
admin
Immortal
Immortal
Jump to solution

If your USB flash drive fails and you need to revert to the clone you will lose the following:

1) any update to ESXi that you might have installed to the USB flash drive, as I'm sure you already knew but just to be complete.  So anytime you update to a new version of ESXi you'll have to reclone.  There are better options and I'll mention those in a minute.

2) any update to the VMware tools that you may manually pull down.  I believe you can now can now avoid this by configuring to always pull the tools from the Web, but I haven't tried it myself so try at your own risk.  Again, there is a better option that avoids this.

The above two happen in response to discrete actions that you will be aware of so you can reclone but it will be an extra step when you upgrade.  If your OEM supports it you can purchase RAIDed USB flash or SD card solution.  RAID 1 is used so all writes are duplicated but all reads are directed only one USB device.  The second device is effectively a hot standby clone constantly updated.  This solution solves both of the above issues plus the next one.

3) most importantly, any changes to your ESXi local configuration state that you have made.  These changes happen as configure and reconfigure networking, storage and other aspects of your host to optimize performance and etc.

The above solution of RAIDed USB flash or SD cards handles this third exposure as well but for the manual reclone option that you are currently using it is probably impracticable to reclone every time you change the configuration state.  However you can pull most of this state out of your host using host profiles but note that you will still need to reclone whenever you update ESXi or the VMware tools..  Ordinarily pulling a host profile requires an operation from VC and might be scriptable there.  If not and you are feeling adventurous read on ...

************************************* Bleeding edge ... try at your own risk ***************

Host profiles can be extracted and applied at ESXi command line using a tool "esxhpcli".  The tool has a terse but adequate help.  You need to generate and save both the host profile and the answer file.  You can run a cron job to pull those every night and save them on a network disk.  If the day comes when you need to use the clone simply boot from it, manually pull down the host profile (it will not be in a format compatible with VC) and apply it with esxhpcli.  Don't forget the answer file.  Also, realize that you'll need to first manually configure to get to the network share with, for example, esxcfg-nas or esxcli. Alternatively you could manually copy the proper host profile and answer file while the clone is attached to another host.  If an ESXi host you'll need to remove the device from USB passthrough using "esxcli hardware usb passthrough device" commands.  Good luck!

0 Kudos