What is a VMware snapshot ?



A Vmware snapshot preserves the state and data of a virtual machine at a specific point in time.
The report includes the power state of the virtual machine (eg , on, off , suspension) .
The data include all the files that make up the virtual machine. This includes disks, memory and other devices, such as maps of virtual network interface .
A virtual machine provides several operations for creating and managing Vmware snapshots and chain plates . These operations allow you to create Vmware snapshots, reverting to a Vmware snapshot of the string, and delete Vmware snapshots. You can create Vmware snapshots extended trees.

Operation VMware Infrastructure 3 and vSphere 4.x, the Vmware snapshot of the virtual machine combines delete data consolidation and file deletion. This caused problems when the snapshot files are deleted from Snapshot Manager , but consolidation has failed. This left the virtual machine is still going on clichés , and the user may not realize until the database is full.

In vSphere 4.x, an alarm can be set to indicate whether a virtual machine is running in Vmware snapshot mode. For more information , see Configuring VMware vCenter Server to send alarms when virtual machines are running from Vmware snapshots ( 1018029 ) .

In vSphere 5.0 , improvements have been made to delete the Vmware snapshot . In vSphere 5.0 , you will be informed via the user interface if the part of the consolidation of an operation or RemoveSnapshot RemoveAll Vmware snapshots failed. A new option , consolidate, is available through the popup menu to restart the process of consolidation.

Creating a snapshot

When a snapshot is created , there are several options that can be specified :

Name : Used to identify the Vmware snapshot.
Description: Used to describe the Vmware snapshot.
Memory: If the <memory> flag is 1 or true , a discharge of the internal state of the virtual machine is included in the Vmware snapshot. Memory Vmware snapshots take longer to create .

Note: When a memory Vmware snapshot is taken , while the state of the virtual machine will be amazed. For more information, see Take a Vmware snapshot of the memory of the virtual machine that makes the virtual machine to an idle state when the memory is written to disk (1013163)

Rest: If <quiesce> flag is 1 or true , and the virtual machine is turned on when the picture is taken , VMware Tools is used to suspend the file system of the virtual machine. Queuing a file system is a process of bringing data to disk in a physical or virtual in an appropriate state for backup equipment. This process could include actions such as washing dirty operating system buffers cached to disk, or other application-specific top-level tasks.

Note: In standby mode indicates break or change the status of the processes running on a computer, especially those that could alter the information stored on the disk for a backup to ensure consistent and usable backup .
When a Vmware snapshot is created , consists of the following files:

<vm> - . vmdk and <vm> <number> - <number> delta.vmdk

A collection of files. Vmdk and - delta.vmdk for each virtual disk is connected to the virtual machine at the time of the Vmware snapshot. These files can be regarded as the child records, redo logs , or delta links. These records can be considered child rear discs disks for mothers of children. From the original disk array , each child is registering pointing to the current state of the virtual disk , one step at a time, with the original.

Note:
<number> Value may not be compatible with all discs in the same instant the child. File names are selected based on the availability of the file name .
If the virtual disk is larger than 2 TB in size, the log file is <vm> - <number> sesparse.vmdk format .

<vm> . VMSD

VMSD file. It is a database of information from the Vmware snapshot of the virtual machine and the main source of information for the Vmware snapshot manager . The file contains the line inputs that define the relationships between Vmware snapshots and disks in the child for each shot.

<vm> Vmware snapshot . the vmsn

Vmsn file. Includes state of the virtual machine. Capture the memory status of the VM allows you to return to an activated state of the virtual machine. Images out of memory , you can not return to a state of the virtual machine off . Memory Vmware snapshots take longer to create Vmware snapshots of memory.
notes:
The above files are placed in the working directory by default in ESX / ESX 3.x and 4.x. This behavior can be changed if desired. For more information about creating Vmware snapshots in another directory, see Creating Vmware snapshots in a different location than the default directory of the virtual machine ( 1002929 ) .
In ESXi 5.x and later fire descriptor VMDK delta files are stored in the same location as the virtual disks ( which may be in a different directory to the working directory ) . To change this behavior , see Changing the Vmware snapshot file location delta virtual machines on ESXi 5.0 ( 2007563 ) .

Products you can use the snapshot feature ?

Besides being able to use the manager to create instant snapshots , snapshots are used by many VMware and third-party products and features. Some VMware products are widely used clichés :

VMware Data Recovery
VMware Lab Manager
VMware vCenter and VMware Infrastructure Client ( Snapshot Manager , Storage vMotion )
Note: This list is not exhaustive .

How do snapshots work ?

Our API allows VMware VMware and third-party products to perform operations with virtual machines and their clichés. This is a list of the most common operations can be performed on virtual machines and snapshots using our API:

CreateSnapshot : Create a new snapshot of a virtual machine. As a side effect , this day of the current snapshot .
RemoveSnapshot : Instantly removes and eliminates all the associated storage.
RemoveAllSnapshots : Remove all snapshots associated with a virtual machine. If a virtual machine does not have any pictures , then this operation returns only success.
RevertToSnapshot : Changes the status of the implementation of a virtual state in this machine cliché. This is equivalent to the Go to the Snapshot Manager use the vSphere Client GUI / VI.
Consolidate: Merges the hierarchy of log files. It is available in vSphere 5.0 and above .
It is a high-level overview of how to create, delete or instant requests are processed in the VMware environment :

An application to create , delete, or restore a snapshot of a virtual machine is sent from the client to the server using the VMware API .
The request is transmitted to the host VMware ESX hosting the virtual machine in question .

Note: This only happens if the initial request was sent to a different server as vCenter that manages the ESX server.

If the flash memory option is included, the ESX host writes the memory disk of the virtual machine .

Note: The virtual machine is removed along the length of time the memory is being written . The length of time the stun can be pre - calculate , based on the performance of the disc and the amount of memory being written and . Having 4.x ESX / ESXi and subsequently reduced stun time when memory is written Bs . For more information, see Take a snapshot of the virtual machine memory stuns the virtual machine while the memory is written to disk ( 1013163 ) .

If the snapshot includes the option to put to rest , the ESX host asks the client to pause disk through VMware Tools OS .

Note : Depending on the guest operating system, quiet operation can be done by the driver module synchronization vmsync or Microsoft Volume Shadow Copy Service ( VSS) . For more information on quiescing , see Troubleshooting Volume Shadow Copy (VSS issues ) related development Leisure ( 1007696 ) to VSS or a virtual machine can freeze in charge when snapshots are taken at idle or use custom quiescing scripts (5962168) for the SYNC driver.

The ESX host makes appropriate a snapshot of the database ( . VMSD Archive) virtual machine and the changes are reflected in the snapshot of the virtual machine manager changes.

Note: When you delete a snapshot, the snapshot feature is removed in the snapshot administrator before making changes to the disks of the child. The manager instant snapshot contains entries while the virtual machine is still running from the disk of the child. For more information , see Committing snapshots when there are no entrance snapshots in Snapshot Manager ( 1002310 ) .

The ESX host requires similar to the functions of the Virtual Disk API to make changes to child disks ( VMDK files . - Delta.vmdk y) function and the transmission chain .

Note : When removing the snapshot, if the disks of children is large, it may take some time. This can cause an error message timeout is VirtualCenter or VMware Infrastructure Client . For more information about error messages timeout , see the uptime of vCenter with the error: Operation failed since another task is in progress ( 1004790 ) .
The record of the child

The record of the girl , which is created by a snapshot, a low density disk . Scattered disks use the (GC ) copy on write mechanism , in which the virtual disk contains no data points , to copy writing. This optimization saves storage space. The grain is the unit of measure in which the low density disk uses the copy -on-write mechanism . Each grain is a block of sectors containing data virtual disks . The default size is 128 sectors or 64KB .

Note: The low density disk is usually created as a type VMFSSPARSE . Since vSphere 5.5, for any 2TB vmdk or more disk density is low class SESPARSE .
Music for children and disk usage

Importantly, these points concerning the use of disk space of the child:

If a virtual machine is running a snapshot , make changes to a child or the scattered disk . Write operations do more on this album, the more it grows .
The disk space requirements are for kids , besides the main disk on which it depends . If a virtual machine has a 10 GB hard drive with a child, the space used will be 10 + GB disk size of the child.
Records of children have been known to grow large enough to fill an entire database .
The speed at which the discs child develops depends directly on the amount of I / S is performed for the disk.
The child disk size has a direct impact on the amount of time it takes to delete the snapshot associated with the disk of the child.
These sections of the knowledge base are themed discs children and disk usage :

No more room for error log when you try to start a virtual machine (1002103)
Why snapshot removal can stop a virtual machine long (1002836)
Troubleshooting a datastore or VMFS volume that is full or near capacity (1003412)
Chain drive

In general, when a snapshot for the first time , the first record of the child is created from the master disk is created . Successive snapshots generate new child records from the last disc of the Child on the chain. The relationship may change if you have multiple branches of the chain of the snapshot.

This diagram is an example of a shot string. Each box represents a data block or grain , as described above:



Warning: manually manipulate individual records of the child or any of the configuration files may jeopardize the instantaneous transmission chain. VMware recommends that you do not manually change the disc channel because it can cause data loss . For more information, see the snapshot consolidation ( 1,007,849 ) .

additional information
To determine if a virtual machine running on snapshots, see Determining if a virtual machine using snapshots ( 1004343 ) .

There are specific to host a Microsoft Active Directory in a virtual environment considerations. For a complete list of considerations , see article 888794 in the Microsoft Knowledge Base .

Note: The above link is valid from August 1, 2012 . If you find the link is broken, the comments on the article and a VMware employee will update the article if necessary.

Factor in time sensitive applications may be affected by a return to a previous snapshot . Instant reverse Returning virtual machine at the time the snapshot was created . This includes all service operations or the application time - sensitive in the guest operating system.

Reverting to a snapshot of virtual machines, all settings return guests for instant operating system. The configuration that is returned includes but is not limited to, IP addresses, DNS names above , versions of UUID of the guest operating system patches , etc.
A snapshot operation can not be performed in a virtual machine using third party software iSCSI initiators and running on VMware Infrastructure 3 . You can take a snapshot on a vSphere environment , but requires additional steps . For more information , see Using a software initiator Microsoft or 3rd party iSCSI in a VMware environment ( 1010547 ) or Running an iSCSI initiator in the third section of the virtual machine :

VMware Infrastructure 3 : Design and deployment of SAN systems
VMware vSphere 4: Design and deployment of SAN systems

Changes have occurred in the manufacturing of instant Remove patch releases for ESX / ESXi 3.5 and 4.0. For more information, see :

VMware ESX 3.5 , Patch ESX350 - 201006401 -SG : Updates VMkernel , VMware Tools , hostd , VMX , VMNIX ( 1022899 )
VMware ESXi 3.5 , Patch ESXe350 - 201006401 -I- SG : Firmware Update ( 1020052 )
VMware ESX 4.0 , Patch ESX400 - 201006201 -UG : Updates CIM 4.0 Main Components and VMware ESX ( 1017721 )
VMware ESXi 4.0 , Patch ESXi400 - 201006201 -UG : Updates Firmware ( 1017739 )

For earlier versions of VMware ESX 4.0 Update - 2, the task of consolidating all snapshots (Delete all Snapshots tasks ) caused only changes stored on the second disk snapshot delta chain copy the snapshot and the first snapshot , or his "father." This effect is recursive for each previous main file.

Example : You have a basic disk size of 8 GB and 2 levels of blocks, each of 4 GB each. A Delete All snapshot tasks , the first delta file can worsen stage flash drive , 8GB, like all new blocks are written to the second screen . Any common modification stored in two levels of snapshots requires no additional space.

From day 2 onwards ESX4.0 , the snapshot mechanism has changed. VMware ESX now includes improved consolidation procedures that reduce the demand for space . You are able to consolidate virtual machines delta disk even though the minimum free space in your database is available.