Momaydopod
Enthusiast
Enthusiast

How to restore configure ESXi yo different H/W

Hello

I backup configure Host esxi5.5 use vSphere CLI on windows  to backup  Host . Get file.tgz already in local my computer

vicfg-cfgbackup.pl --server=10.0.0.1 --username=root -s ESXi_test1_backup.tgz



I try to restart configure to UAT-ESXi Host running on VirtualBox but have error please help to advise.


vicfg-cfgbackup.pl --server=192.168.56.101 --username=root -l ESXi_test1_backup.tgz




I use this KB Backing up and restoring ESXi configuration using the vSphere Command-Line Interface and vSphere Pow...



0 Kudos
10 Replies
RAJ_RAJ
Expert
Expert

Are running the command from the same directory where the configuration file is locates , if not please change the dir and give a try

RAJESH RADHAKRISHNAN VCA -DCV/WM/Cloud,VCP 5 - DCV/DT/CLOUD, ,VCP6-DCV, EMCISA,EMCSA,MCTS,MCPS,BCFA https://ae.linkedin.com/in/rajesh-radhakrishnan-76269335 Mark my post as "helpful" or "correct" if I've helped resolve or answered your query!
0 Kudos
RAJ_RAJ
Expert
Expert

Also please refer below link

http://pubs.vmware.com/vsphere-55/index.jsp?topic=%2Fcom.vmware.vcli.examples.doc%2Fcli_manage_hosts...

Hope you are using same version of esxi  if not please use "-f "  .Also while backing up the serial number of system also backed up .

RAJESH RADHAKRISHNAN VCA -DCV/WM/Cloud,VCP 5 - DCV/DT/CLOUD, ,VCP6-DCV, EMCISA,EMCSA,MCTS,MCPS,BCFA https://ae.linkedin.com/in/rajesh-radhakrishnan-76269335 Mark my post as "helpful" or "correct" if I've helped resolve or answered your query!
0 Kudos
Momaydopod
Enthusiast
Enthusiast

Not working for restoring. I try to path is restore file

pastedImage_0.png

2016-12-07 11_38_02-192.168.56.101 - vSphere Client.png

0 Kudos
RAJ_RAJ
Expert
Expert

Hi ,

Is this ESXi is VM or physical one . Also could you please try to restore using -F , forcefully

RAJESH RADHAKRISHNAN VCA -DCV/WM/Cloud,VCP 5 - DCV/DT/CLOUD, ,VCP6-DCV, EMCISA,EMCSA,MCTS,MCPS,BCFA https://ae.linkedin.com/in/rajesh-radhakrishnan-76269335 Mark my post as "helpful" or "correct" if I've helped resolve or answered your query!
0 Kudos
junian_dani
Enthusiast
Enthusiast

Hi,

It failed because the pointer is still referring to your local directory. So, please make sure your backup file ("ESXi01_backup122016.tgz") has been placed to your local directory (e.g. "C:\Program Files (x86)\VMware\VMware vSphere CLI\bin\"). Then, execute following command:

vicfg-cfgbackup.pl --server=192.168.56.101 --username=root -l "C:\Program Files (x86)\VMware\VMware vSphere CLI\bin\ESXi01_backup122016.tgz"

0 Kudos
Momaydopod
Enthusiast
Enthusiast

Esxi on VirtualBox ,  I try to use -f already not work

Same error

C:\Program Files (x86)\VMware\VMware vSphere CLI>vicfg-cfgbackup.pl --server=192.168.56.101 --username=root -l "C:\Program Files (x86)\VMware\VMware vSphere CLI\bin\ESXi01_backup122016.tgz"

Enter password:

The restore operation will reboot the host.

Type 'yes' to continue:

yes

Uploading config bundle to configBundle.tgz ...

Performing restore ...

Restore failed: A general system error occurred: Internal error

Exiting maintenance mode ...

Never anything

C:\Program Files (x86)\VMware\VMware vSphere CLI>vicfg-cfgbackup.pl --server=192.168.56.101 --username=root -f "C:\Program Files (x86)\VMware\VMware vSphere CLI\bin\ESXi01_backup122016.tgz"

Enter password:

C:\Program Files (x86)\VMware\VMware vSphere CLI>

0 Kudos
RAJ_RAJ
Expert
Expert

/tmp folder is in ESXi and the KB article clearly says below

Using the ESXi Command Line:

Note: When restoring configuration data, the build number of the host must match the build number of the host that created the backup file.

  1. Put the host into maintenance mode by running the command:

    vim-cmd hostsvc/maintenance_mode_enter
  2. Copy the backup configuration file to a location accessible by the host and run the command:

    In this case, the configuration file was copied to the host's /tmp directory. For more information, see Using SCP to copy files to or from an ESX host (1918).

vim-cmd hostsvc/firmware/restore_config /tmp/configBundle.tgz


Note: Executing this command will initiate an automatic reboot of the host after command completion.

Using the vSphere PowerCLI

Note: When restoring configuration data, the build number of the host must match the build number of the host that created the backup file. Use the -forceoption to override this requirement.

  1. Put the host into maintenance mode by running the command:

    Set-VMHost -VMHost ESXi_host_IP_address -State 'Maintenance'

    Where ESXi_host_IP_address is the IP address of the ESXi host.


  2. Restore the configuration from the backup bundle by running the command:

    Set-VMHostFirmware -VMHost ESXi_host_IP_address -Restore -SourcePath backup_file -HostUser username -HostPassword password


    Where ESXi_host_IP_address is the IP address of the ESXi host, backup_file is the name of the backup bundle to use for the restore, and username and password are the credentials to use when authenticating with the host.

    For example:

    Set-VMHostFirmware -VMHost 10.0.0.1 -Restore -SourcePath c:\bundleToRestore.tgz -HostUser root -HostPassword exampleRootPassword

Note: From vSphere CLI for Windows, ensure you are executing the command from C:\Program Files\VMware\VMware vSphere CLI\bin and after backing up verify the backup file is available there and restoring also performing from same path . Also move host in to maintenance mode .

You have to follow the proper instructions from KB #  https://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=20421...

and it will work  . 

RAJESH RADHAKRISHNAN VCA -DCV/WM/Cloud,VCP 5 - DCV/DT/CLOUD, ,VCP6-DCV, EMCISA,EMCSA,MCTS,MCPS,BCFA https://ae.linkedin.com/in/rajesh-radhakrishnan-76269335 Mark my post as "helpful" or "correct" if I've helped resolve or answered your query!
0 Kudos
Momaydopod
Enthusiast
Enthusiast

C:\Program Files (x86)\VMware\VMware vSphere CLI>vicfg-cfgbackup.pl --server=192.168.56.101 --username=root -l "C:\Program Files (x86)\VMware\VMware vSphere CLI\bin\ESXi01_backup122016.tgz"

Enter password:

The restore operation will reboot the host.

Type 'yes' to continue:

yes

Uploading config bundle to configBundle.tgz ...

Performing restore ...

Restore failed: fault.MismatchedBundle.summary

Exiting maintenance mode ...

C:\Program Files (x86)\VMware\VMware vSphere CLI>

I update ESXi host to same build source backup already.  The error is show different before.

0 Kudos
RAJ_RAJ
Expert
Expert

take a backup configuration of new vm   and  match  with old backup conf file

you may able to identify what is the exact mismatch . Or please share i can have a look on that

RAJESH RADHAKRISHNAN VCA -DCV/WM/Cloud,VCP 5 - DCV/DT/CLOUD, ,VCP6-DCV, EMCISA,EMCSA,MCTS,MCPS,BCFA https://ae.linkedin.com/in/rajesh-radhakrishnan-76269335 Mark my post as "helpful" or "correct" if I've helped resolve or answered your query!
0 Kudos
junian_dani
Enthusiast
Enthusiast

Hi,

You should add -f flag into your command. It should be looked like this:

vicfg-cfgbackup.pl --server=192.168.56.101 --username=root -f -l "C:\Program Files (x86)\VMware\VMware vSphere CLI\bin\ESXi01_backup122016.tgz"

0 Kudos