BACKUP configuration of Vmware ESXI with POWERCLI

by butsch 13. September 2020 15:47

Backup the config from a VMware ESXI free Version up to 6.7.

There is a nice way to backup the free ESXi configuration settings into one file. This us usefull to document the ESXi before you update it and don't want to make 200 screenshots.

  1. Download and Install POWERCLI from VMware.

https://my.vmware.com/group/vmware/downloads/details?downloadGroup=PCLI650R1&productId=491

 

  1. Start Power shell elevated (As Administrator)
  2. set-executionpolicy remotesigned
  3. run from "C:\Program Files (x86)\VMware\Infrastructure\PowerCLI\Scripts"

    .\Initialize-PowerCLIEnvironment.ps1

  1. Do the backup

set-executionpolicy remotesigned -Confirm:$False

Set-PowerCLIConfiguration -InvalidCertificateAction ignore -Confirm:$False

Connect-VIServer -Server 192.168.35.90 -User root -Password **********

Get-VMHostFirmware -VMHost 192.168.35.90 -BackupConfiguration -DestinationPath C:\20_SERVER_ESX_ASUS_P11C-M4L\03_ESX_CONFIG_BACKUP

Disconnect-VIServer -Server 192.168.35.90 -Confirm:$False

 

 

POWER CLI

C:\> Set-PowerCLIConfiguration -InvalidCertificateAction ignore -Confirm:$False

Scope ProxyPolicy DefaultVIServerMode InvalidCertificateAction DisplayDeprecationWarnings WebOperationTimeout

Seconds

----- ----------- ------------------- ------------------------ -------------------------- -------------------

Session UseSystemProxy Multiple Ignore True 300

User

AllUsers Ignore

 

 

C:\> Connect-VIServer -Server 192.168.35.90 -User root -Password imelsasswohntdegillesim

Name Port User

---- ---- ----

192.168.35.90 443 root

 

 

C:\> Get-VMHostFirmware -VMHost 192.168.35.90 -BackupConfiguration -DestinationPath C:\20_SERVER_ESX_ASUS_P11C-M4L\03_ESX_CONFIG_BACKUP

Host Data

---- ----

192.168.35.90 20_SERVER_ESX...

 

 

C:\> Disconnect-VIServer -Server 192.168.35.90 -Confirm:$False

 

 

 

 

 

Restore from the backup would be:

 

set-executionpolicy remotesigned -Confirm:$False

Set-PowerCLIConfiguration -InvalidCertificateAction ignore -Confirm:$False

Connect-VIServer -Server 192.168.35.90 -User root -Password **********

Set-VMHostFirmware -VMHost 192.168.35.90 -Restore -SourcePath C:\20_SERVER_ESX_ASUS_P11C-M4L\03_ESX_CONFIG_BACKUP \configBundle-192.168.35.90.tgz -HostUser root -HostPassword **

Disconnect-VIServer -Server 192.168.35.90 -Confirm:$False

 

 

You can view the config if you UNPACK 10x TAR and ZIP files from the backup file:

 

 

 

VMware Link:

https://kb.vmware.com/s/article/2042141

 

Tags:

VMWare | Deployment

Comments are closed

Werbung von Drittfirmen (Nicht Butsch Informatik):

Werbung von Drittfirmen via Google Adsense: