When you restore a host configuration, you must perform the operation from a remote host.

When you back up the host configuration, you can run the vicfg-cfgbackup command from a vSphere CLI virtual appliance that is running on the target host (the host that you are backing up or restoring), or on a remote host. To restore a configuration on the target host, you must run the vSphere CLI virtual appliance from a remote host.

When you restore the configuration, the target host must be in maintenance mode, which means all virtual machines (including the vSphere CLI virtual appliance) must be powered off.

For example, suppose you have two ESXi 4.0 hosts (host1 and host2) and you import the virtual appliance into both hosts. To back up the host1 configuration, run the vicfg-cfgbackup command in the vSphere CLI on either host1 or host2 and point to host1 in the --server command-line option.

Likewise, to back up the host2 configuration, run the vicfg-cfgbackup command in the vSphere CLI on either host1 or host2 and point to host2 in the --server command-line option.

To restore the host1 configuration, run the vicfg-cfgbackup command in the vSphere CLI on host2 and point to host1 in the --server command-line option. To restore the host2 configuration, run the vicfg-cfgbackup command in the vSphere CLI on host1 and point to host2 in the --server command-line option.