Step 6 (Optional): Test Snapshots, Pausing, and Saving

Applies To: Windows Server 2008 R2

There are several actions that you can take to control the state of a virtual machine in Hyper-V. For example, you can preserve the current state of a virtual machine by taking a snapshot of it, or you can change it to a future or a past state by applying an existing snapshot. You can also pause or save a virtual machine in a given state. When you pause or save a virtual machine, it stays in its current state for as long as you want.

Although pausing a virtual machine does not free up the memory that is allocated to that virtual machine, it frees up main processor resources. Saving a virtual machine frees up memory and main processor resources so that they can be used by other virtual machines or by the virtualization server.

The procedure in this topic helps you test the snapshots that you took of the base virtual machine, and it helps you test pausing and saving the base virtual machine so that you can better understand how you can control the states of a virtual machine in Hyper-V.

Note

For answers to frequently asked questions about virtual machine snapshots, see Hyper-V Virtual Machine Snapshots: Frequently Asked Questions (https://go.microsoft.com/fwlink/?LinkId=108561).

To test snapshots and to pause and save the base virtual machine

  1. Test the snapshots that you took of the base virtual machine as follows:

    1. Connect to the base virtual machine. In Hyper-V Manager, under Virtual Machines, double-click Base Virtual Machine. The Virtual Machine Connection window opens, showing that the base virtual machine is currently turned off.

    2. Minimize the Virtual Machine Connection window.

    3. In Hyper-V Manager, under Snapshots, right-click After completing installation of Windows Server 2008 R2, and then click Apply. The Apply Snapshot dialog box appears.

    4. In the Apply Snapshot dialog box, click Apply.

    5. In the Virtual Machine Connection window, in the Action menu, click Start. After a few seconds the base virtual machine starts, and it is in the state that it was when you took the first snapshot (before System Preparation Tool ran).

    6. To restore the virtual machine back to the previous state (after System Preparation Tool ran), minimize the Virtual Machine Connection, and then in Hyper-V Manager apply the After running sysprep snapshot in the same way that you applied the previous snapshot.

  2. Temporarily pause the base virtual machine as follows:

    1. Turn on the base virtual machine. In the Virtual Machine Connection window, in the Action menu, click Start. The virtual machine turns on and starts to boot.

    2. To pause the base virtual machine at any time during its boot process, on the Virtual Machine Connection window, in the Action menu, click Pause. (Or you can click the blue Pause button on the toolbar.)

    3. To resume the boot process, in the Virtual Machine Connection window, in the Action menu, click Resume. (Or you can click the green Resume button on the toolbar.)

  3. Save the current state of the base virtual machine as follows:

    1. In the Virtual Machine Connection window, in the Action menu, click Save. The current state of the base virtual machine is saved and the virtual machine is turned off.

    2. To restore the virtual machine to its saved state, in the Virtual Machine Connection window, in the Action menu, click Start.

  4. To restore the virtual machine back to the state it needs to be for export in the next step, minimize the Virtual Machine Connection window, and then in Hyper-V Manager, apply the After running sysprep snapshot in the same way that you applied snapshots previously.