Export VMware ESXI config

From time to time I find it useful to export the esxi config from an esxi-host. One use-case for instance is if I have a server with onboard USB-card for esxi-storage. If this USB-storage is filled with unused mibs from custom esxi-installations from the manufacturer, and has been upgraded several time, it will fill up. There will be errors if I try to upgrade and a clean install is in order.Therefore, before I reinstall an esxi-host I export esxi-settings first.

  1. Document which network card is used for managment and ip-setup.
  2. Use a compatible version of Vmware PowerCLI vs. your esxi-host
  3. Connect to the esxi-server in question.
    • Connect-VIServer 172.16.0.2
  4. Export the esxi-config to a folder on your computer
    • Get-VMHostFirmware -VMHost 172.16.0.2 -BackupConfiguration -DestinationPath C:\tmp\esxi-01
  5. Re-install the host, make sure you use the same network-card and ip-setup which you documentet above
  6. Reconnect to the host with PowerCli
  7. Set the host in Maintenance Mode
    • Set-VMHost -VMHost 172.16.0.2 -State ‘Maintenance’
  8. Import the settings you exported above
    • Set-VMHostFirmware -VMHost 172.16.0.2 -Restore -SourcePath C:\tmp\esxi-01\configBundle-172.16.0.2.tgz -HostUser root -HostPassword Root-pwd -force
  9. Reboot you esxi-host

Learn more about exporting/importing esxi-configs at Vmware‘s KB-site:

https://kb.vmware.com/s/article/2150432?language=en_US

Attached commands used above in pdf for ease of use

Disclaimer: Every tips/tricks/posting I have published here, is tried and tested in different it-solutions. It is not guaranteed to work everywhere, but is meant as a tip for other users out there. Remember, Google is your friend and don’t be afraid to steal with pride! Feel free to comment below as needed.

2 thoughts on “Export VMware ESXI config

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s