WilliamLam.com

  • About
    • About
    • Privacy
  • VMware Cloud
  • Tanzu
    • Application Modernization
    • Tanzu services
    • Tanzu Community Edition
    • Tanzu Kubernetes Grid
    • vSphere with Tanzu
  • Home Lab
  • Nested Virtualization
  • Apple
You are here: Home / ESXi / Quick Tip - How to snapshot & revert a physical ESXi host

Quick Tip - How to snapshot & revert a physical ESXi host

04.04.2014 by William Lam // 5 Comments

Nested environment, which is something I did quite a bit of as a customer and still continue to do so today. I could easily snapshot my Nested ESXi environment, perform my tests and then quickly rollback to my original starting state. However, when it comes to testing a physical ESXi host, it is a bit more challenging as there is no "quick" snapshot functionality as far as I was aware of. It was only until recently did I have a use case for this and picked up a nice tidbit from one of our engineers on the team. It turns out you could "snapshot" a physical or even virtual ESXi host by just backing up the state.tgz file and then restoring it. As the name suggest, the state.tgz file contains all the configurations of your ESXi host. The process is pretty straight forward:

  1. SCP /bootbank/state.tgz and back that up to your local system or shared storage
  2. Perform your tests or make changes to the system
  3. When you are ready to restore, copy the state.tgz back into /bootbank folder
  4. Login to ESXi Shell and run reboot -f which will ensure no changes are saved to our state.tgz

Once the ESXi host reboots, it will use the restored state.tgz file and your system will be back at its original state. This process is actually not new, ESXi already provides a way to backup/restore

More from my site

  • ESXi Advanced & Kernel Settings Reference
  • High-end Dell Precision 7770 & 7670 laptops with 128GB memory for ESXi
  • Quick Tip - Using ESXi Scripted Installation (kickstart) to configure IPv6 networking
  • ESXi running in unexpected places ...
  • DFI GHF51 - Worlds smallest AMD Ryzen SBC

Categories // ESXi Tags // bootbank, esxi, state.tgz

Comments

  1. mwpreston says

    04/04/2014 at 3:25 pm

    Would this revert an upgrade? Or is it simply just configuration type parameters?

    Reply
    • William Lam says

      04/04/2014 at 3:39 pm

      Good question. I don't believe so, since state.tgz is just "config" data. The bits for the release itself is spread across the other VIBs, so I would guess it would not

      Reply
  2. Fabrizio de Luca says

    04/04/2014 at 10:05 pm

    Besides being an interesting alternative to the "official" backup/restore process for ESXi hosts, is this procedure officially supported or does it "just work"?

    If the latter, I would still use the usual esxcfg-cfgbackup command, using -s for saving the config file and -l to load it back into the host after resetting it to factory settings from within the DCUI...

    Reply
    • William Lam says

      04/04/2014 at 10:21 pm

      My understanding is it is performing the same operation that vicfg/esxcfg-cfgbackup is but instead of requiring SSH access to ESXi host, you can perform the operation remotely which leverages the APIs

      This method is more of a quick/dirty way if you don't want to rely on any external tools/scripts.

      Reply
  3. Haim Chibotero says

    04/12/2014 at 5:40 pm

    Have a look on this cool tool 🙂

    http://www.shogan.co.uk/vmware/esxi-5-0-host-backup-restore-gui-utility-powercli-based

    Reply

Thanks for the comment! Cancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Search

Author

William Lam is a Senior Staff Solution Architect working in the VMware Cloud team within the Cloud Infrastructure Business Group (CIBG) at VMware. He focuses on Cloud Native technologies, Automation, Integration and Operation for the VMware Cloud based Software Defined Datacenters (SDDC)

Connect

  • Email
  • GitHub
  • LinkedIn
  • RSS
  • Twitter
  • Vimeo

Recent

  • vSphere with Tanzu using Intel Arc GPU 01/26/2023
  • Quick Tip - Automating allowed and not allowed Datastores for use with vSphere Cluster Services (vCLS) 01/25/2023
  • ESXi with Intel Arc 750 / 770 GPU 01/24/2023
  • How to bootstrap vSAN Express Storage Architecture (ESA) on unsupported hardware? 01/19/2023
  • Automating Virtual Machine screenshots in vSphere 01/18/2023

Advertisment

Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.
To find out more, including how to control cookies, see here: Cookie Policy

Copyright WilliamLam.com © 2023