Wednesday, August 13, 2014

Part - 5 : PowerShell and Hyper-V - Creating Hyper-V Virtual Machine's Checkpoint Snapshots.


Sometimes, we need to save the current state of the virtual machines, as an example, if you are testing some software and want to know, how installation and uninstallation  may went and if something bad happen during testing, you can revert back to checkpoint. Or if you created and patched a Virtual Machine, and before joining it to domain, you want to create a Snapshot so that, if something may went wrong, we can revert back to the old stage.
There are lot's of other reason for creating a snapshots of the virtual machines.
We can create Checkpoint (A.K.A Snapshots) using Hyper-v Cmdlet. We do use "Checkpoint-VM" cmdlet to create snapshots.
We mainly need to pass two parameters, -Name and -SnapshotName , in -Name we have to provide the name of the virtual machine whose snapshot we want to create and in -SnapshotName parameter, we just need to provide the description of the checkpoint.
Let's create a checkpoint.
Import-Module Hyper-VCheckpoint-VM -Name 'MediaWiki' -SnapshotName "Checkpoint Crated using POSH"

In the above command, we are creating a checkpoint for our "MediaWiki" virtual machine and in description, we are saying "Checkpoint created using Posh"

In the below screenshot, you can see that, it has started creating "Checkpoint".

Capture

In the below screenshot, you can see that our command has completed without throwing any error.

 Capture_2

If you open "Hyper-V Manager" GUI console, you can see that, our checkpoint is successfully created.

Capture_3



That's all for now, see you in next blog posts.

tumblr_n12e6gTe9d1st0dt8o3_250



Thanks.

Aman Dhally

If you like, you can follow me on Twitter and Facebook. You can also check my “You Tube channel for PowerShell video tutorials. You can download all of my scripts from “Microsoft TechNet Gallery”.

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.