Before Host Profiles there was vicfg-cfgbackup.pl
This last weekend I was reminded of a RCLI command that creates a backup of your ESXi Host configuration. A client had an ESXi host where the USB drive failed. The system didn’t entirely crash, it pinged so HA didn’t kick-in however hostd and vpxa weren’t responding so management from vCenter was impossible. Performing a reboot of the host proved it was a USB failure when it failed to boot.
So, HA kicked in finally when the host was powered off – however the remaining hosts in their cluster did not have adequate resources to power everything back on. We needed to get this failed ESX host back online and quick!
Brought in new USB stick with fresh ESXi 4.0 installed, plugged in and powered up. In the TUI configured the Management Port IP address/gateway/DNS, etc. But now what, all of the (NFS) Datastores, vSwitch configuration and advanced settings were toast…and they didn’t have Enterprise Plus.
Say Hello to vicfg-cfgbackup.pl — a RCLI command which could be found in the vMA. This utility will allow you to create a backup and restore a full ESXi configuration. Luckily we had this (backup) command running on a nightly basis so we knew the configuration was complete. A simply command and the host was online.
Seeing that ESX is going to be phased out, this RCLI command is a valid alternative for those ESXi users that do not have Enterprise Plus licensing.
The commands vicfg-cfgbackup.pl (esxcfg-cfgbackup.pl) allow you to backup and restore the configuration of your ESXi host.
To backup the host you would run the command.
vicfg-cfgbackup.pl –server
-s </p> To restore your backup configuration to your host you would run. This will cause the host to reboot once the process is complete. NOTE: The host must be in Maintenance Mode for this to work. The backup configuration must also match the patch level of the ESXi install. You can add a -f to force if needed.
vicfg-cfgbackup.pl –server
-l </p>