This is a follow up post to the last one about backing up VMware host configurations. This post details how to Restore VMware ESXi Host Configuration. Restoring a configuration requires the host to be running the same product and build version that the backup was taken from. This was harder than I thought to work out how to get a VMware host installed to a specific build version, especially if the host has been patched since installed using the ISO image.
How to build a VMware host to a specific version
Basically you need to download an ISO from VMware that is closest to the version your configuration file was taken from. Then download the patch for the exact build version. For example, this is the process I followed in my lab to test a restore:
A host which is running ESXi 6.5 (Product Version) and build number 7967591. You’ll not find an ISO image for that specific build. The host in my lab was originally built using the below ISO:
VMware-VMvisor-Installer-6.5.0.update01-5969303.x86_64.iso
The above ISO was used to install on the host. Next the patch file for the build number was downloaded from the VMware portal:
The file for the above download was:
ESXi650-201803001.zip
Next the file was uploaded to the hosts datastore. Once uploaded SSH to the host and execute the following command:
esxcli software vib install -d /vmfs/volumes/datastore1/patch-directory/ESXi650-201803001.zip
Reboot and the host should be on the exact build number required.
Restoring configuration to a VMware host
Execute the following command using vCli to restore the configuration to the host:
vicfg-cfgbackup --server [host] -username [username] -password [password] -l path-and-filename-of-file.tgz The restore operation will reboot the host. Type 'yes' to continue:
If successfull you should see a message similar to below:
Uploading config bundle to configBundle.tgz ... Performing restore ...
This should hopefully result in a successful restore of you host configuration.