Today's content is very simple and very real, and at some point we need to take snapshots of our virtual machines, which have been renamed checkpoints in server R2, but the functionality is still exactly the same. Today, we are not going to discuss the deep workings of the snapshot feature, but rather how to make it easier to do snapshot operations. Perhaps a lot of friends are asking, the snapshot is not the right button, the snapshot? To do so, we can select the virtual machine to take snapshots, and then right-click to select the snapshot.
In addition to a single virtual machine snapshot, we can select more than one virtual machine, use the CTRL or SHIFT key to select, and then right-click to select the snapshot, so that you can complete snapshot capture of multiple virtual machines at once.
As shown in the figure above, we capture snapshots of multiple virtual machines and get the following results:
Then wait a moment and we get the following results:
In fact, this capture will still create some confusion, for example, we will find that all virtual machine snapshot name is the default virtual machine name-time, this format. Although this format can be used, but a long time, a lot of snapshots, it will be very difficult to identify, resulting in some unnecessary trouble. So what do we do? In fact, it's easy to open the connection to the snapshot virtual machine in Hyper-V Manager and take a snapshot in the Virtual Machine Connection window.
This allows you to modify the snapshot name directly at the time of the snapshot, without the need for the capture to be completed.
It's a good idea to take snapshots of a handful of virtual machines, but it might not be convenient to take snapshots at the same time.
In this case, we can use the PowerShell cmdlet of Hyper-V to achieve a fast capture of a set of similar names (which can be called groups) for snapshots. First, we start PowerShell and then try to output the virtual machine that the current machine is running using the GET-VM command:
If there is no problem with the command, the virtual machine on the current host is successfully exported, so we can quickly capture the group snapshot with the following command.
Note: This command applies only to server 2012 and to Windows 8 versions of Hyper-V hosts, which are not PowerShell Hyper-V cmdlet-less than these versions.
Get-vm-name adds* | Checkpoint-vm-snapshotname "Snapshot Name of Group ADDS"
Let's take a look at this command, first half of the statement is Get-vm–name adds*, representing the output of the current host on the "ADDS" virtual machine.
Then use the pipe symbol "|" Pass it to the CHECKPOINT-VM command and configure the captured snapshot name "Snapshot name of Group ADDS".
Let's take a look at the results in Hyper-V Manager:
So far, the technique of snapshots is so much, the content is very simple, personally, I feel more practical, because for some of the same type of virtual machine at some times it is necessary to take snapshots, if the time difference is too long may have an abnormal problem, It is more convenient to use PowerShell commands to capture snapshots of virtual machines.