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 <server_name> -s <backup_file_name>

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 <server_name> -l <backup_file_name>


Posted under Backup & Recovery, ESXi 3.5 Tips, vSphere, this blog has 3,026 views and 4 responses.

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...

4 Comments so far

  1. Rick Scherer
    10:47 am on October 16th, 2009

    Vladan,

    Most major vendors are now embedding their agents within ESXi (downloadable from the vendor) which allows ESXi to interact with underlying hardware. Another option is CIM.

  2. Vladan
    10:30 am on October 16th, 2009

    To monitor the Server hardware the ESXi is not ideal since the usual monitoring application which come with the server work only with ESX and not ESXi. They using the Redhat Console to install the monitoring agents. (That’s the case for Fujitsu servers)

    I guess that they will adapt to ESXi sooner or later.

    Great tip Rick..

  3. Rick Scherer
    2:18 pm on October 12th, 2009

    This is not supported on ESX, only ESXi.

    I’ve tested with ESXi 3.5 and 4.0

    Don’t worry too much about ESX though, it will be phased out in future releases. Better start learning RCLI :)

  4. Tom
    1:30 pm on October 12th, 2009

    Is vicfg-cfgbackup.pl only usable with 4i??
    What about regular ESX 4??
    It would be so nice to be able to use this with any ESX version.
    Thank you, Tom

Leave a Comment

Name (required)

Email (required)

Website

Comments

More Blog Post