VMware ESXi Backup and Restore
PowerCLI
Backup
PowerCLI C:\Program Files (x86)\VMware\Infrastructure\vSphere PowerCLI> Connect-VIServer -server matx01vmvh01
Name Port User
---- ---- ----
matx01vmvh01 443 root
PowerCLI C:\Program Files (x86)\VMware\Infrastructure\vSphere PowerCLI> Get-VMHostFirmware -vmhost matx01vmvh01 -backupconfiguration -destinationpath C:\users\tingalls\Desktop
Host Data
---- ----
matx01vmvh01 C:\users\tingalls\Desktop\configBundle-matx01vmvh01.tgz
Restore
PowerCLI C:\Program Files (x86)\VMware\Infrastructure\vSphere PowerCLI> Set-VMHost -vmhost matx01vmvh01 -state 'Maintenance'
PowerCLI C:\Program Files (x86)\VMware\Infrastructure\vSphere PowerCLI> set-vmhostfirmware -vmhost matx01vmvh01 -restore -sourcepath c:\users\tingalls\desktop\config-bundle-matx01vmvh01.tgz -hostuser root
vCLI
Backup ESXi config:
C:\Program Files (x86)\VMware\VMware vSphere CLI\bin>vicfg-cfgbackup.pl --save --username root --server matx01vmvh01.nerdydrunk.net c:\Users\tingalls\Desktop\matx01vmvh01.bak
Enter username: root
Enter password:
Saving firmware configuration to c:\Users\tingalls\Desktop\matx01vmvh01.bak ...
# C:\Program Files\VMware\VMware vSphere CLI\bin>vicfg-cfgbackup.pl –save –server 10.2.5.80 backup.bak
# C:\Users\Username\AppData\Local\VirtualStore\Program Files\VMware\VMware vSphere CLI\bin\backup.bak
Restore ESXi config:
C:\Program Files\VMware\VMware vSphere CLI\bin>vicfg-cfgbackup.pl –load –server 10.2.0.200 backup.bak
ESXi Local CLI
Backup ESXi config local
Restore ESXi config local
[root@matx01vmvh01:~] vim-cmd hostsvc/maintenance_mode_enter
[root@matx01vmvh01:~] cp /vmfs/volumes/DS-VH01LOCL-VDPA/ISOs/configBundle-matx01vmvh01.tgz /tmp/configBundle.tgz
[root@matx01vmvh01:~] vim-cmd hostsvc/firmware/restore_config /tmp/configBundle.tgz