vicfg-cfgbackup – Backingup and restore ESXi hosts

I will explain the use of the vicfg-cfgbackup command using a guided scenario:

I have a vSwitch named vSwitch1 in a ESXi host for my lab.

vicfg-cfgbackup_vSwitch1

vicfg-cfgbackup_vSwitch1

The first step is to make a backup using the option “-s”:

vicfg-cfgbackup_001

vicfg-cfgbackup_backingup

Then I remove the vSwitch1 as you can see in the images below:

vicfg-cfgbackup_002

vicfg-cfgbackup_Remove vSwitch1

vicfg-cfgbackup_003

vicfg-cfgbackup_Remove vSwitch1 (2)

And finally, restore then I restore the configuration using the option “-l”:

vicfg-cfgbackup_004

vicfg-cfgbackup_Restore configuration

It is important to know the strange behavior of the restore command. If you have the target host into maintenance mode, the restore process will fail. The process itself puts the target host into maintenance but doesn’t check if it is already in this state. In the image below I put the host into maintenance mode using the command vicfg-hostops and then try to run the restore command. It fails saying “The operation is not allowed in the current state”. Exiting maintenance mode, using vicfg-hostops again, i can run without problems the restoration:

vicfg-cfgbackup_005

vicfg-cfgbackup_Strange behavior

I passed VCAP-DCD

The past November 30th I passed my VCAP-DCD exam,

I can’t say anything about the exam but I can say you how I did prepared to take the exam:

The percentage is the amount I read/studied the book. 20% means I read the book about 20%.