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
Test the snapshots that you took of the base virtual machine as follows:
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.
Minimize the Virtual Machine Connection window.
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.
In the Apply Snapshot dialog box, click Apply.
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).
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.
Temporarily pause the base virtual machine as follows:
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.
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.)
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.)
Save the current state of the base virtual machine as follows:
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.
To restore the virtual machine to its saved state, in the Virtual Machine Connection window, in the Action menu, click Start.
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.