Saturday, June 1, 2013

Backup/Restore ESXi 5.x Host Configuration with PowerCLI

In my earlier post I explained how to backup and restore ESXi using vCLI. This time I am going to explain how to back and restore ESXi using PowerCLI.

Once you connect to vCenter or individual ESXi host using the Power CLI like

Connect-VIserver <Your Server Name> 

then hit enter this will prompt for username and password once done your are connected to the server now.

Now you need to find out which esxi host you need to backup only one or some of them or all which are part of your vCenter, accordingly you need specify the command.

Case 1:-  suppose you need to take the backup of all ESXi in one command.

Get-VMhost | Get-VMhostFirmware -BackupConfiguration -DestinationPath <Location>

Case2:- Suppose you need to take backup of only one ESXi host host.

Get-VMhostFirmware -vmhost <Hostname> -BackupConfiguration -DestinationPath <Location>

I took an example I have a host name esxi01.test.local and plan to place the backup on my system where I installed the powerCLI under "C:\Backup"

Get-VMhostFirmware -vmhost  esxi01.test.local -BackupConfiguration -DestinationPath C:\Backup

This will take the backup of ESXi configuration like vicfg-cfgbackup do in vCLI.

Now to restore the backup of ESXi configuration.

Get-vmhost esxi01.vclass.local | Set-VMHostFirmware -Restore -DestinationPath C:\Backup

This way you can restore the configuration of your ESXi Server using the PowerCLI.

you can also see

More Certification !!!

VMware Certified Associate certification is available now for all the who have attended VMware vSphere Training program, or even who have the vmware product knowledge and want to have some recognition to that, You can go for the VCA certification.

·         VCA-DCV - vSphere: Install, Configure, Manage [5.1] supported by Fundamentals e-Learning - VMware Data Center Virtualization Fundamentals &VMware Data Center Virtualization Fundamentals (Japanese)
·         VCA-WM - Horizon View: ICM AND Horizon Mirage, each supported by Fundamentals e-Learning - VMware Workforce Mobility Fundamentals&VMware Workforce Mobility Fundamentals (Japanese)  
·         VCA-Cloud - vCloud Automation Center: ICM, supported by Fundamentals e-Learning - VMware Cloud Fundamentals & VMware Cloud Fundamentals (Japanese)

So hurry up add some more certification to profile.

Good Luck !

50% free voucher till 31 January 2014

 Promotion Code:-   VMRT8B34585F

1 comment:

Ken Thomas said...

Nice post, however, you have an error in the command for the restore.

You wrote:
Get-vmhost esxi01.vclass.local | Set-VMHostFirmware -Restore -DestinationPath C:\Backup

-DestinationPath should be -SourcePath during a restore.