Wednesday, July 10, 2013

Understanding Snapshot

Understanding Snapshot

Snapshot in VMware allows you to preserver the state and data of virtual machine at the time snapshot is taken. When you want to test some new application, update and you don’t know the effect of the new installation on your current state of virtual machine take the snapshot to preserve the current state and then do the installation (changes), so even if nothing work; you will have a proper working condition VM.
Snapshots to manage VMs
Snapshots preserve the state and data of a Virtual Machine at the time you take the snapshot. Snapshots are useful when you want to revert repeatedly to the same virtual machine state. Snapshots are useful as a short term solution for testing software with unknown or potentially harmful effects. For example, you can use a snapshot as a restoration point during a linear process, such as installing update packages, or during a branching process, such as installing different versions of a program. Using snapshots ensures that each installation begins from an identical baseline.
A snapshot preserves the following information:
  • Virtual machine settings: The virtual machine directory, which includes disks that were added or changed after you took the snapshot.
  • Power state: The virtual machine can be powered on, powered off, or suspended.
  • Disk state: State of all the virtual machine’s virtual disks.
  • Memory state (Optional): The contents of the virtual machine’s memory.
The relationship between snapshots is like that of a parent to a child. In the linear process, each snapshot has one parent snapshot and one child snapshot, except for the last snapshot, which has no child snapshots. Each parent snapshot can have more than one child. You can revert to the current parent snapshot or restore any parent or child snapshot in the snapshot tree and create more snapshots from that snapshot. Each time you restore a snapshot and take another snapshot, a branch, or child snapshot, is created.
A .vmsd file contains the virtual machine’s snapshot information and is the primary source of information for the Snapshot Manager. This file contains line entries, which define the relationships between snapshots and between child disks for each snapshot.
Taking a snapshot preserves the disk state at a specific time by creating a series of delta disks for each attached virtual disk or virtual RDM and optionally preserves the memory and power state by creating a memory file. Taking a snapshot creates a snapshot object in the Snapshot Manager that represents the virtual machine state and settings.
Each snapshot creates an additional delta .vmdk disk file. When you take a snapshot, the snapshot mechanism prevents the guest operating system from writing to the base .vmdk file and instead directs all writes to the delta disk file. The delta disk represents the difference between the current state of the virtual disk and the state that existed at the time that you took the previous snapshot. If more than one snapshot exists, delta disks can represent the difference between each snapshot. Delta disk files can expand quickly and become as large as the entire virtual disk if the guest operating system writes to every block of the virtual disk.
A Take Snapshot operation creates .vmdk, -delta.vmdk and .vmsn files. By default, the first and all delta disks are stored with the base .vmdk file. The .vmsn files are stored in the virtual machine directory.

Snapshot Limitations
Snapshots can affect virtual machine performance and do not support some disk types or virtual machines configured with bus sharing. Snapshots are useful as short-term solutions for capturing point-in-time virtual machine states and are not appropriate for long-term virtual machine backups.
  • VMware does not support snapshots of raw disks, RDM physical mode disks, or guest operating systems that use an iSCSI initiator in the guest.
  • Virtual machines with independent disks must be powered off before you take a snapshot. Snapshots of powered-on or suspended virtual machines with independent disks are not supported.
  • Snapshots are not supported with PCI vSphere Direct Path I/O devices.
  • VMware does not support snapshots of virtual machines configured for bus sharing. If you require bus sharing, consider running backup software in your guest operating system as an alternative solution. If your virtual machine currently has snapshots that prevent you from configuring bus sharing, delete (consolidate) the snapshots.
  • Snapshots provide a point-in-time image of the disk that backup solutions can use, but Snapshots are not meant to be a robust method of backup and recovery. If the files containing a virtual machine are lost, its snapshot files are also lost. Also, large numbers of snapshots are difficult to manage, consume large amounts of disk space, and are not protected in the case of hardwarefailure.
    Backup solutions, such as VMware Data Recovery, use the snapshot mechanism to freeze the state of the virtual machine. The Data Recovery backup method has additional capabilities that mitigate the limitations of snapshots.
  • Snapshots can negatively affect the performance of a virtual machine. Performance degradation is based on how long the snapshot or snapshot tree is in place, the depth of the tree, and how much the virtual machine and its guest operating system have changed from the time you took the snapshot. Also, you might see a delay in the amount of time it takes the virtual machine to power-on. Do not run production virtual machines from snapshots on a permanent basis.
Thanks to VMware, Information is from the white paper provided by VMware.
    

0 comments:

Post a Comment