In the IT world we hear a number of terms frequently and sometimes we do not know for sure what they refer to..
One of these terms are the snapshots that we can take to a virtual machine , a snapshot is a capture of the state of the selected machine where the disk data and its configuration are included.
It is possible to take several snapshots of a virtual machine even when it is in operation or in production status, and if so, revert its status to any of the snapshots we have taken..
It is common that some snapshots can cause certain types of problems on the machines in which it is applied such as unexpected reboots, crash or instability, but today TechnoWikis brings good news and that is that today in Hyper-V for Windows 10 and Windows Server 2016 it is It adds the function of snapshots without affecting the production machine, much less generating an impact that may have consequences in the processes carried out.
1. Use Hyper-V snapshots with checkpoints
When a standard checkpoint is created, the guest operating system is not aware of the checkpoint that is currently being created. that is, there is no interaction with the Volume Shadow Copy Service or VSS to allow the guest operating system to become aware of a point in time when a checkpoint is being taken.
When applying a standard snapshot, keep in mind that the virtual machine moves back in time without having any reference point from VSS. Critical things can happen in the system, especially in the production workloads, since the standard snapshots are not consistent of the applications that are being executed..
If the backup jobs are supported by the applications, they interact with VSS to eliminate memory and pending disk I / O operations, so the VSS operation captures all application-specific transactions.
Note that if applications such as databases that require transactional consistency are used, it is important to remember that VSS and its writers are well placed to work with the application in order to empty the data correctly. It will end up giving us well-made backups and it is necessary to keep this in mind.
The production control points in Hyper-V are based on this backup technology. When creating production checkpoint, the checkpoint creation process interacts with VSS on the guest operating system running in the Hyper-V environment.
Since a production checkpoint uses VSS to create the checkpoint, the operation is the same for the virtual machine as a VSS backup. The application-specific data that is housed in memory is dumped to disk.
This means that the production control point is a snapshot of the virtual machine that is in a consistent state of application. Therefore, we can see why now, the control point is a complete production control point.
2. Use Hyper-V snapshots with checkpoints
In Hyper-V, in both Windows 10 and Windows Server 2016, the options to enable production control points are in the virtual machine configuration.
Step 1
To do this, we select the virtual machine and access its configuration using one of the following options:
- Right-clicking on the virtual machine and selecting the "Configuration" option.
- Select the virtual machine and click "Configuration" in the right panel on the properties of the virtual machine.
- From the "Action / Configuration" menu.
Step 2
When selecting this option, the following window will be displayed where we will go to the “Administration” section and there we will choose the “Control points” line:
Step 3
There we have the following options. There we will activate the boxes "Production control points" and "Create standard control points if the guest does not support the creation of production control points", click on Apply and OK.
Enable the Checkpoints check box
With this option we can enable or disable the control points completely. By default, checkpoints are enabled.
Production control points
This option uses backup technology in the guest operating system to create control points consistent with data that does not include memory.
Create standard checkpoints if guest does not support creation of production checkpoints
Verify the failover to the standard checkpoint.
Standard control points
They are standard snapshots that capture data and memory in an exact state. They are consistent with applications as they capture both memory and data in an exact state.
3. Create the production point with Hyper-V
Step 1
We can create a production control point once we have the options configured and for this we must right-click on the virtual machine and select the "Control point" option:
Step 2
Hyper-V will create the production checkpoint using backup technology in the guest operating system (also known as VSS) to create a consistent backup base / checkpoint.
We can see that the respective production control point is being created:
Step 3
We can cancel, if necessary, the control point from the right side. Once the process ends we will see our created control point:
4. Apply a checkpoint in Hyper-V
Step 1
To apply a control point on the created control point and select the "Apply" option:
Step 2
The following message will be displayed where we have the option to create another control point to capture the current state, or simply apply and lose the current state and return to the production control point:
Step 3
In this case we click on "Apply" and we will see that the process of applying the checkpoint to the virtual machine starts:
Step 4
One difference to keep in mind when applying production control points is that the virtual machine will shut down. This denotes that the production checkpoint method is actually being used. Also, as we recall, memory is not captured at a production checkpoint and is another reason why we have to restart the virtual machine.
Also, just like restoring a server using a VSS backup, the server restarts. Here it simply shuts off and when it comes back on, it is available in the consistent state of the production checkpoint application.
Step 5
We can click on the "Start" button to connect and start the machine and we can see the following:
Step 6
There we click on "Continue" and thus start the virtual machine:
In this way, this new Hyper-V function will help us create production control points to optimize the states of a virtual machine.