When it comes to protecting your virtual environment there are many things to consider. You need to have backups of your virtual machines and don’t forget about your host configurations.
How to back up your ESXi configuration
There are many reasons that you would want to back up your ESXi configuration, of which the two main ones would be before upgrading to a new versions or for DR reasons.
If you are going to be upgrading an existing ESXi host to ESXi 5 you should backup your host configuration before proceeding. With vSphere 5 upgrades there is no option to roll back like there was with vSphere 4 upgrades. This means that a failed upgrade would require you to install ESXi 4.x and restore the configuration.
To backup an ESXi host you will need the vCLI installed on a server or you can also use the vMA.
# vicfg-cfgbackup –server ESXi_host_ip –-username username –-password password –-s backup_filename
How to restore your ESXi configuration
Another really nice thing about ESXi is that it’s just as easy to restore your backed up configuration as it was to grab the backup. Simple install a clean version of ESXi matching the version that the backup was taken from. Connect to the host using vCLI or your vMA appliance as issue the restore command shown below.
# vicfg-cfgbackup –server ESXi_host_ip –-username username –-password password –-r backup_filename
How to back up your ESX configuration
There is not one command to back up an ESX hosts configuration unfortunately.
To accomplish this you will need to back up the following items in a manual fashion.
- Back up local VMFS files system – templates, VMs * .iso files
- Back up any custom scripts
- Back up your .vmx files
- Back up the files in /etc/passwd, /etc/groups, /etc/shadow and /etc/gshadow directories. The /etc/shadow and /etc/gshadow files might not be present on all installations.
How to restore your ESX configuration
If you need to roll back from a failed upgrade or recover from a disaster and need to restore your host follow this short process. First you will need to install ESX 4.x the version level that you were running at the time you backed up your files.
Once you have ESX 4.x installed and running at its previous level you can now restore the files you backed up earlier. This can be done many ways but a couple of simple ways would be to use winSCP or Veeam FastSCP, both are free and easy to use.
About Brian
Brian is a Technical Architect for a VMware partner and owner of this website. He is active in the VMware community and helps lead the Chicago VMUG group. Specializing in VDI and Cloud project designs. Awarded VMware vExpert status for 2012 & 2011. VCP3, VCP5, VCA-DT, VCP5-DT, Cisco UCS Design
0 comments
Post a Comment