How to export ESX(i) configuration

To export ESX(i) using vicfg-cfgbackup configuration you will need VMware vSphere CLI (vCLI). If it is not installed, please do that now. Once installed, open CLI and type the following command:

C:\Program Files (x86)\VMware\VMware vSphere CLI\bin>vicfg-cfgbackup.pl --server esxhost.domain --username root --password YourPassword -s C:\esxi\esxhost

To restore configuration back to your ESX(i) host, to the following:

C:\Program Files (x86)\VMware\VMware vSphere CLI\bin>vicfg-cfgbackup.pl --server esxhost.domain --username root --password YourPassword -l C:\esxi\esxhost

* Note that all commands MUST be typed in a single line

To export ESX(i) using VMware vSphere PowerCLI, make sure that PowerCLI is installed. If not, please do that now. Once installed, open VMware vSphere PowerCLI and first connect to your vCenter server:

Connect-VIServer <vCenter server hostname or IP address>

Once you press Enter, you will be prompted for user credentials. Use the same credentials you usually use to connect to your vCenter server.

You can either take a backup of all ESX(i) hosts or a particular host. To take backup of all ESX(i) hosts using a single command, do the following:

Get-VMhost | Get-VMhostFirmware -BackupConfiguration -DestinationPath C:\esxi

To backup configuration of the single ESX(i) host, do the following:

Get-VMhostFirmware -vmhost esxhost.domain -BackupConfiguration -DestinationPath C:\esxi

To restore the backup, do the following:

Get-vmhost esxhost.domain| Set-VMHostFirmware -Restore -DestinationPath C:\esxi

Once done taking backup/doing restore, disconnect from vCenter server:

Disconnect-VIServer
Leave a Reply 0

Your email address will not be published. Required fields are marked *