WilliamLam.com

  • About
    • About
    • Privacy
  • VMware Cloud Foundation
  • VKS
  • Homelab
    • Resources
    • Nested Virtualization
  • VMware Nostalgia
  • Apple
You are here: Home / New Parameter in vim-cmd snapshot.remove for ESX(i) 4.1 Update 2

New Parameter in vim-cmd snapshot.remove for ESX(i) 4.1 Update 2

11.22.2011 by William Lam // 2 Comments

While going through my ghettoVCB backlog this past weekend, I came across an issue reported by a user with snapshot removal using vim-cmd in ghettoVCB. It looks like with the recent release of ESX(i) 4.1 Update 2, the "snapshot.remove" required parameters have changed. Prior to 4.1 Update 2, the command would just require a virtual machine's vmid and if it only had a single snapshot, it would automatically consolidate the snapshot.

If a VM had more than one snapshot, users would then need to specify some additional parameters that identified the particular level of the snapshot tree and the snapshot index to be removed. This was pretty difficult to use, even for myself. It now looks like VMware has simplified this command and introduced a new required parameter called snapshotId in ESX(i) 4.1 Update 2.

Here's an example VM with several snapshots and let's say we would like to consolidate snapshot3

First we'll need to query the VM snapshots using vim-cmd vmsvc/snapshot.get [vmid]

As you can see from the screenshot, there is a new property called "Snapshot Id" which can now be passed into the snapshot.remove operation.

After the snapshot3 is consolidated, the snapshot tree is re-displayed again to verify the operation. We can also confirm by looking at the vSphere Client UI

This now makes snapshot manipulation using vim-cmd extremely easy to use.

There is a fix in ghettoVCB.next that will support the new snapshot.remove operation which hopefully I'll be able to release very soon.

More from my site

  • How to Create Custom Roles on Standalone ESX(i) Host
  • Automating Active Directory User Management in ESXi Kickstart
  • VM snapshot retention-based removal in vSphere 8.0 Update 3
  • Preserving VM snapshot hierarchy across vCenter Servers
  • Managing VM snapshot retention policies using the VMware Event Broker Appliance (VEBA)

Categories // Uncategorized Tags // ESXi 4.1, snapshot, vim-cmd, vimsh

Comments

  1. *protectedincenselam says

    12/22/2011 at 2:35 am

    Hi.
    My Esxi is 5.0, but when I run the snapshot.get, I could not get the snapshotid~~and I try the 4.10,the same result. I do not find "ESX(i) 4.1 Update 2" on the
    http://www.vmware.com/patchmgr/download.portal, which esxi version you used? Would you like to share me?

    Reply
  2. *protectedWilliam says

    12/23/2011 at 6:07 pm

    @incenselam,

    As mentioned in the post, this is specific to ONLY ESX(i) 4.1 Update 2 - http://www.vmware.com/support/vsphere4/doc/vsp_esxi41_u2_rel_notes.html

    This does not apply to previous releases nor ESXi 5.0

    Reply

Thanks for the comment!Cancel reply

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

Search

Thank Author

Author

William is Distinguished Platform Engineering Architect in the VMware Cloud Foundation (VCF) Division at Broadcom. His primary focus is helping customers and partners build, run and operate a modern Private Cloud using the VMware Cloud Foundation (VCF) platform.

Connect

  • Bluesky
  • Email
  • GitHub
  • LinkedIn
  • Mastodon
  • Reddit
  • RSS
  • Twitter
  • Vimeo

Recent

  • Programmatically accessing the Broadcom Compatibility Guide (BCG) 05/06/2025
  • Quick Tip - Validating Broadcom Download Token  05/01/2025
  • Supported chipsets for the USB Network Native Driver for ESXi Fling 04/23/2025
  • vCenter Identity Federation with Authelia 04/16/2025
  • vCenter Server Identity Federation with Kanidm 04/10/2025

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 © 2025