How to work with VMware snapshots
What is a snapshot?
A snapshot preserves the state and data of a virtual machine at a specific point in time.
State includes the virtual machine’s power state (powered‐on, powered‐off, suspended, etc).
Data includes all the files that make‐up the virtual machine, including disks, memory, and other devices, such as virtual network interface cards.
To commit all snapshots by using the command line:
Log in to the ESX host as root via the console or an SSH session. For more information about SSH, see Unable to connect to an ESX host using Secure Shell (SSH) (1003807).
Note: The following commands can also be executed remotely using the vSphere Command Line for both ESX and ESXi hosts. For more information, see vSphere Command Line Interface documentation.
Type vmware-cmd -l and press Enter.
The output appears similar to:
/vmfs/volumes/UUID/VMNAME/VMNAME.vmx
Type vmware-cmd /vmfs/volumes/UUID/VMNAME/VMNAME.vmx hassnapshot and press Enter to confirm that there is a snapshot. If the output displays a value of 1, a snapshot is present. If the output displays a value of 0, there is no snapshot present.
Type vmware-cmd /vmfs/volumes/UUID/VMNAME/VMNAME.vmx createsnapshot and press Enter to create a new snapshot.
For example, the command vmware-cmd /vmfs/volumes/UUID/VMNAME/VMNAME.vmx createsnapshot “test” “” 0 0 makes a snapshot without memory, quiescing, or a description called test .
Note: You can use any name you like. The name appears in the snapshot manager. For more information about the syntax of the vmware-cmd command, see vSphere Command Line Interface documentation.
Type vmware-cmd /vmfs/volumes/UUID/VMNAME/VMNAME.vmx removesnapshots and press Enter to remove the snapshot.
GUI
1. Select Inventory > Virtual Machine > Snapshot > Take Snapshot.
You can also right-click the virtual machine and select Snapshot > Take Snapshot.
The Take Virtual Machine Snapshot window appears.
2. Type a name for your snapshot.
3. (Optional) Type a description for your snapshot.
4. (Optional) Select the Snapshot the virtual machine’s memory check box if you want to capture the memory of the virtual machine.
5. (Optional) Select the Quiesce guest file system (Needs VMware Tools installed) check box to pause running processes on the guest operating system so that file system contents are in a known consistent state when the snapshot is taken. This applies only to virtual machines that are powered on.
6. Click OK. When the snapshot has been successfully taken, it is listed in the Recent Tasks field at the bottom of the vSphere Client.
7. Click the target virtual machine to display tasks and events for this machine or, while the virtual machine is selected, click the Tasks & Events tab.
Reference:
http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1002310
http://pubs.vmware.com/vsp40u1/wwhelp/wwhimpl/js/html/wwhelp.htm#href=admin/t_take_a_snapshot.html
http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1015180
Leave a Comment