Jun 16 2011

My updated series on VMware Snapshots

I did a 3-part series on VMware snapshots years ago for Tech Target that was based on VI3, I recently updated the series to include changes that have occurred with the technology since the release of vSphere.

Part 1 – How VMware snapshots work

A disk “snapshot” is a copy of the virtual machine disk file (VMDK) at a certain point in time. It preserves the disk file system and system memory of your VM by enabling you to revert to the snapshot in case something goes wrong. Snapshots can be real lifesavers when upgrading or patching applications and servers. This article will go over everything you need to know about using snapshots with VMware, including what they are, how they work and advanced techniques.

Snapshot disk space used and rate of growth
If you create more than one snapshot of your virtual machine (VM), then you’ll have multiple restore points available to revert to. When you create a snapshot, what was currently writable becomes read-only from that point on. Using in-file delta technology, new files are created that contain all changes (delta) to the original disk files.

The size of a snapshot file can never exceed the size of the original disk file. Any time a disk block is changed, the snapshot is created in the delta file and simply updated as changes are made. If you changed every single disk block on your server after taking a snapshot, your snapshot would still be the same size as your original disk file. But there’s some additional overhead disk space that contains information used to manage the snapshots. The maximum overhead disk space varies and it’s based on the Virtual Machine Files System block size.

Read the full article at searchvmware.com…

Part 2 – Deleting virtual machine snapshots without wasting disk space

Taking snapshots of your virtual machines (VMs) is a useful way to preserve and restore VM configurations. But proper management is needed to avoid performance problems. In this tip, we’ll explore advanced snapshot management topics. (For a review of snapshot basics or review how VMware snapshots work, see my previous tip.)

Disk space and deleting multiple snapshots
It’s important to plan ahead and allow for ample disk space on your VMware virtual machine file system (VMFS) volumes for snapshot files. A good rule of thumb is to allow for disk space of at least 20% of the virtual machine’s total disk size. But this amount can vary depending upon the type of server, how long you keep the snapshots, and if you plan on using multiple snapshots. If you plan on including the memory state with your snapshots, you’ll also need to allow for extra disk space equal to amount of RAM assigned to the VM.

A VM with only one snapshot requires no extra disk space when deleting, or committing, it. (The term committing is used because the changes saved in the snapshot’s delta files are now committed to the original virtual machine disk file, or VMDK.) There is also an extra helper delta file that is created when you delete snapshots. It contains any changes that are made to the VM’s disk while the snapshot is deleted. The size of the helper delta file varies and it’s based on how long the snapshot takes to delete. But it’s generally small, because most snapshots are deleted in less than an hour.

Read the full article at searchvmware.com…

Part 3 – Troubleshooting VMware snapshots

Virtualization administrators can use snapshots in vSphere to travel back in time and figure out what went wrong with their virtual machines (VMs). In part one of this series, I discussed how to use VMware snapshots. In part two, I explained how to delete snapshots without wasting disk space. But what do you do when your snapshots start acting funny? In this tip, we’ll troubleshoot potential problems that may come up when using snapshots in vSphere.

Locating VMs that have snapshots
Finding out which VMs have snapshots can be challenging. In VMware Infrastructure 3, there wasn’t a centralized, built-in way to accomplish this task in the vSphere Client or vCenter Server. You had to use methods, such as scripts and command-line utilities, that made locating snapshots difficult. But there were some enhancements in vSphere that made locating snapshots much easier. Here are a few of the methods that you can use.

Method 1: Find command
Use the find command in the ESX service console or ESXi Tech Support Mode

1. Log in to the console.
2. Change to your /vmfs/volumes/ directory.
3. Type find -iname “*-delta.vmdk” -mtime +7 -ls to find snapshot files that have not been modified in seven days or simply find -iname “*-delta.vmdk” to find all snapshot files.

Read the full article at searchvmware.com…

Share This: