17 November 2015

Backup and Restore ESXi configuration using VMware vSphere CLI

How to backup

First of all you have to download  and install the vSphere CLI tool. You should also have access to the ESXi server using the tool. Open the CLI console as is shown on the picture and run the command below.
 
Tool located at C:\Program Files (x86)\VMware\VMware vSphere CLI>


vicfg-cfgbackup.pl --server 192.168.0.1 --username root
--password your_password --save backup.cfg

==================================
vicfg-cfgbackup.pl -server 192.168.0.1 -s host01

Possible Errors: CLI Error :  Saving firmware configuration to backup.cfg …
GET https://192.168.0.1/downloads/configBundle-servername..tgz unsuccessful : 404 Not Found
Event log : Boot partition : /usr/lib/vmware/hostd/docroot/downloads//files cannot be found
Solution:

/usr/lib/vmware/hostd/docroot/downloads is only a link to /scratch/downloads/
and /scratch is link to /tmp/scratch
Problem will be solved after create a folders under /tmp
SSH to ESXi Server


cd /tmp
mkdir scratch
cd scratch
mkdir downloads
cd downloads

How to restore

You can use same command to restore, Use –load (-l) syntax instead of –save
While restore all the guest machines should be in off state. Command will give a message to shutdown all the gust VMs. ESXi will go to maintenance mode and restore the configuration and reboot the server.


vicfg-cfgbackup.pl --server 192.168.0.1 --username root
--password your_password --load backup.cfg

 

Categories

Popular Posts

My Blog Visitors Counter

Flag Counter

Contact Me

Name

Email *

Message *

Dejan Zdraveski. Powered by Blogger.