We’ve covered snapshots here a few separate times in past. However most of these were focused on ESX classic or preforming the work using one API or another. As VMware is making the shift to ESXi, it makes sense that you will need a way to deal with snapshots from the ESXi console (aka TSM/Tech Support Mode).
List All VMs
You’ll need this step to identify the Vmid of the VM you want to work with. Note in all commands that follow, 16 is the VMID. You’ll need to change that for your situation.
~ # vim-cmd vmsvc/getallvms
Vmid Name File Guest OS Version Annotation
16 ProVMware Test [datastore1] New Virtual Machine/New Virtual Machine.vmx ubuntuGuest vmx-07
Create a Snapshot
~ # vim-cmd vmsvc/snapshot.create 16 TestSnap
List all Snapshots
~ # vim-cmd vmsvc/snapshot.get 16
–Snapshot Name : TestSnap
–Snapshot Desciption :
–Snapshot Created On : 1/25/2011 10:29:9
–Snapshot State : powered off
Remove the Snapshot
~ # vim-cmd vmsvc/snapshot.removeall 16
Remove All Snapshots:
- vim-cmd (http://www.yellow-bricks.com/2008/08/21/esxi-and-ssh-whats-next/)
- vi-toolkit (http://www.vi-toolkit.com/wiki/index.php/Vmware-vim-cmd)
- VMware KB (http://kb.vmware.com/kb/1026380)
The concepts behind snapshots still apply (deleting big ones sucks, etc), but now you know how to handle them from the ESXi TSM also.