Using snapshots of guest operating system sessions

Hyper-V enables snapshots of guest sessions using Volume Shadow Copy Service, for rollback and disaster recovery. This chapter excerpt provides a step-by-step guide to creating snapshots.

A highly versatile function in Windows 2008 Hyper-V is the option to create a snapshot of a guest session. A snapshot in Windows Hyper-V uses Microsoft Volume Shadow Copy Service (VSS) technology that captures an image of a file on a server -- in this case, the file is the VHD image of the virtual server itself. At any point in time in the future, the snapshot can be used for recovery.

Snapshots for Image Rollback

One common use of a guest image snapshot is to roll back an image to a previous state. This is frequently done with guest images used for demonstration purposes, or test labs where a scenario is tested to see the results and compared with identical tests of other scenarios, or for the purpose of preparing for a software upgrade or migration.

For the case of a guest image used for demonstration purposes, a user might run through a demo of a software program where they add information, delete information, make software changes, or otherwise modify information in the software on the guest image. Rather than having to go back and delete the changes, or rebuilding the image from scratch to do the demo again, with a snapshot, the user can simply roll the image back to the snapshot that was available before the changes were made to the image.

Image rollback has been successfully used for training purposes where an employee runs through a process, then rolls back the image so they can run through the same process all over again repeating the process on the same base image but without previous installations or configurations.

In network infrastructures, a snapshot is helpful when an organization applies a patch or update to a server, or a software upgrade is performed and problems occur; the administrator can simply roll the image back to the point prior to the start of the upgrade or migration.

Snapshots for Guest Session Server Fault Tolerance

Snapshots are commonly used in business environments for the purpose of fault tolerance or disaster recovery. A well-timed snapshot right before a system failure can help an ¬organization roll their server back to the point right before the server failed or problem occurred. Rather than waiting hours to restore a server from tape, the activation of a ¬snapshot image is nothing more than choosing the snapshot and selecting to start the guest image. When the guest image starts up, it is in the state that the image was at the time the snapshot was created.

Creating a Snapshot of a Guest Image

Snapshots are very easy to create. To create a snapshot, do the following:

  1. From the Server Manager console or from the Hyper-V MMC snap-in, click to select the guest session for which you want to create a snapshot.
  2. Right-click the guest session name, and choose Snapshot. A snapshot of the image will immediately be taken of the guest image and the snapshot will show up in the Snapshots pane, as shown in Figure 37.8.

Rolling Back a Guest Image to a Previous Snapshot Image

The term used in Windows 2008 Hyper-V to roll back an image is called "applying" a snapshot to an existing image. When an image is rolled back, the image that is currently running has the snapshot information applied to the image, thus bringing the image back to an earlier configuration state. To apply a snapshot, do the following:

  1. From the Server Manager console or from the Hyper-V MMC snap-in, click the snapshot to which you want to revert the running guest image.
  2. Right-click the snapshot image and choose Apply. The configuration state of the image will immediately be reverted to the state of the image when the snapshot was taken.
  3. Figure 37.8 Viewing snapshots of a guest server.

Reverting a Snapshot Session

When working with snapshots, if you snapshot a session and then apply an older session snapshot to the current session, to effectively undo the rollback, choose Action, Revert to bring the server back to the state it was in before the rollback had occurred.


Microsoft Hyper-V has come a long way in just a few short years. As recently as 2003, Microsoft wasn't even in the virtualization game, and now with Windows 2008, virtualization provides organizations a way to consolidate server applications onto a fewer number of virtual server systems. Key to the release of Windows 2008 Hyper-V is the ability to run 64-bit guest sessions and allow for memory, disk, and processor support that meet the demands of enterprise-level physical servers into individualized guest operating sessions.

Hyper-V in Windows 2008 provides the ability of hosting Windows server, Windows client, and non-Windows guest sessions with the ability of consolidating dozens of physical servers into a single virtual server system. By adding additional virtual server systems to an enterprise, an organization can drastically reduce the number of physical servers it has plus provide a method of implementing server redundancy, clustering, and disaster recovery without the need to double the number of physical servers the organization requires to provide better computing services to the organization.

Best Practices

The following are best practices from this chapter:

  • Plan for the number of virtual guest sessions you plan to have on a server to properly size the host system with respect to memory, processor, and disk requirements.
  • Have the installation media and license keys needed for the installation of the guest operating system handy when you are about to install the guest operating system session.
  • Apply all patches and updates on guest sessions soon after installing the guest operating system just as you would for the installation of updates on physical systems.
  • For Microsoft Windows guest sessions, install the Windows add-in components to improve the use and operation of the guest session.
  • After installing the guest session and its associated applications, confirm whether the memory of the guest session is enough, and adjust the memory of the guest session accordingly to optimize the performance of the guest session.
  • Allocate enough disk space to perform snapshots of images so that the disk subsystem can handle both the required guest image and the associated snapshots of the guest session.
  • Consider using snapshots before applying major patches, updates, or upgrades to an image session to allow for a rollback to the original image.

Use the following table of contents to navigate to chapter excerpts

Windows Server 2008 Unleashed
  Home: Deploying and using Windows virtualization: Introduction
  1: Understanding Microsoft's virtualization strategy
  2: Planning your implementation of Hyper-V
  3: Installation of the Microsoft Hyper-V server role
  4: Becoming familiar with the Hyper-V administrative console
  5: Installing a guest operating system session
  6: Modifying guest session configuration settings
  7: Launching a Hyper-V guest session
  8: Using snapshots of guest operating systems sessions
Windows Server 2008 Unleashed covers the planning, design, prototype testing, implementation, migration, administration and support of a Windows 2008 and Active Directory environment, based on more than three and a half years of early-adopter experience in full production environments. This book addresses not only what is new in Windows 2008 compared with previous versions of the Windows Server product, but also what is different and how the similarities and differences affect an organization's migration to Windows 2008. Chapters are dedicated to the migration process from Windows 2000/2003 to Windows 2008, how to properly use Group Policies in Windows 2008, and tips and tricks on managing and administering a Windows 2008 environment. Purchase the book from InformIT.
Rand Morimoto has been in the computer industry for more than 30 years and has authored, co-authored or been a contributing writer for dozens of bestselling books on Windows 2003, Exchange 2007, security, BizTalk Server, and remote and mobile computing. Michael Noel has been involved in the computer industry for nearly two decades and has significant real-world experience with enterprise information technology environments. Michael has authored several major publications, such as SharePoint 2007 Unleashed and Exchange 2007 Unleashed Omar Droubi has been in the computer industry for more than 15 years, has co-authored one of Sams Publishing's bestselling books, Windows 2003 Unleashed, and has been a contributing writer and technical reviewer on several other books on Windows Server 2003 as well as Exchange 2000, 2003 and 2007. Ross Mistry is a seasoned veteran in Silicon Valley and has spent more than a decade in the computer industry. As a principal consultant and partner with Convergent Computing (CCO), he had the opportunity to work with Windows Server 2008 for three years before the product was released to the public. Chris Amaris is the chief technology officer and co-founder of CCO. He has more than 20 years' experience consulting for Fortune 500 companies, leading them in the selection, design, planning and implementation of complex information technology projects. Chris worked with Windows 2008 for three years before its release to the general public.

Dig Deeper on Storage virtualization technology and services

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.