Hyper-V 2012 Checkpoints

I wanted to ask a question about Windows 2012 R2 STD Hyper-V Checkpoints (formally known as snapshots)

There is a lot of misinformation out there on the internet about how to PROPERLY go about removing snapshots.

I have read a GUI way to remove them, but I have also read that you should use PowerShell to remove them (if PowerShell is the best way, which PowerShell version.  There are so many different kinds of PowerShell.  Such as AD Module for Windows PS, Windows PS, Windows PS ISE, etc )

If anyone can provide the best method, preferably both GUI (manual) and PowerShell on how to remove a snapshot that would be great.

Here is the information I have read so far but have not tried:
For virtual machines running on Hyper-V or VMware hosts
The Remove action removes the selected checkpoint and you can no longer restore the virtual machine to the checkpoint that you removed. No other checkpoints are removed, whether they were created before or after the checkpoint that you removed.
To remove a checkpoint
-In Virtual Machines view, navigate to the host on which the virtual machine is deployed.
-In the results pane, click the virtual machine, and then, in the Actions pane, click Manage checkpoints.
-In the Available checkpoints tree, select the checkpoint that you want to remove, and then click Remove.
-If the virtual machine is running on Virtual Server virtualization software, you will receive a confirmation prompt explaining that all checkpoints created after the selected checkpoint will also be removed. Click Yes to proceed.
grizrulesAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Steve WhitcherSystems AdministratorCommented:
I'm not aware of any reason that removing snapshots (checkpoints) from powershell is better than removing them from the GUI.  Can you point me to the link where you found that information?

In our environment, we regularly delete snapshots from Hyper-V Manger.  To do this, we simply select the appropriate Host, VM, and snapshot, then right click on the snapshot and choose delete.   After a moment, the host will begin the process of merging the current state of the VM and the snapshot back into a single vhd(x) image.  

As for there being many versions of powershell, I think you're a little confused there.   While there have been multiple versions (v5.0 is currently in a preview release), the things that you mention aren't really different versions at all.  If you open "Windows Powershell" and "Windows Powershell ISE", both of those are the same powershell engine, and you can run all the same commands.  ISE stands for "Integrated Scripting Environment", which just means that in addition to the command prompt you get when you open "Windows Powershell", ISE also includes a box to write scripts in, and tools to make writing and testing scripts easier.  As for the ActiveDirectory Module for powershell, a Module is just a set of commands you can load (or "import") into your powershell session.  If you see a shortcut specifically to the AD module for powershell, that's just going to open up a powershell window and import the module automatically. You get the exact same thing if you use the "Windows Powershell" shortcut and manually type "import-module activedirectory" in the powershell window when it opens.

There are LOTS of powershell modules available, serving all sorts of different functions.  Powershell gives you the core functionality, and the modules bring in the ability to manage various features, roles, or accomplish specific tasks.  

Enough from me... I hope that helps somewhat, and I'd love to see the recommendation regarding deleting snapshots from powershell instead of the GUI if you happen to have it.  Maybe I'll learn something...
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Cliff GaliherCommented:
Regarding Hyper-V, it makes absolutely no difference whether you use Powershell or use the GUI. They both send the exact same command to the VMM service via its API and it does the merging and deleting.  The GUI doesn't do it, nor does Powershell.  They just initiate the process. And that is a known and documented API.

As far as the rest, it depends.  The Hyper-V Manager GUI is different than the SCVMM GUI. There are 3rd-party GUIs too.  And Powershell is the same whether run as a command line or in the ISE.  The AD Module is like any module. It isn't a different version of Powershell. It is just a module that loads into the existing version of Powershell and in so doing, offers new cmdlets.  If you loaded the AD module, you'd be able to run cmdlets to manipulate Active Directory. And if you didn't, you wouldn't be able to run those cmdlets. For Hyper-V you usually don't need the AD module, but if it happens to be loaded it won't hurt anything either.
0
Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
It depends which Snapshot is selected when you issue the DELETE. As for from the GUI or Powershell, it makes no difference.
0
Simplify Active Directory Administration

Administration of Active Directory does not have to be hard.  Too often what should be a simple task is made more difficult than it needs to be.The solution?  Hyena from SystemTools Software.  With ease-of-use as well as powerful importing and bulk updating capabilities.

grizrulesAuthor Commented:
Here is the link I was viewing:
https://technet.microsoft.com/en-us/library/cc956007.aspx

I don't find the link very help at ALL because using the Hyper-V GUI on Win2012 R2 Has NO RESULTS PANE clearly marked as such that I cannot locate.

 Within the Action PANE (which is not listed as the Action Pane) "Manage Checkpoints" as this article refers to, is no option named "manage checkpoints".
If I click on any of my Virtual Machines that has an existing Checkpoint I have the options (see attachment)
I can see "delete checkpoint..." , but no manage.

Also the Hyper-V Machine that I currently have no checkpoints on , have a Checkpoint option under, I guess under the Action's pane, but there are no elipses (....) so If you click on checkpoint it automatically creates one without any prompts and just automatically creates a checkpoint is a default location.

Lastly I was told that in Hyper-V if you want to backup your Hyper-V machine you simple can do it while it's running or turn it off and select Export.  Apparently you can export this to a backup device.
I have tried this and when I go to my backup device I do not see the .vhd file when I do an import.  Only when I use INPECT DISK does it recognize the any .vhd .  

I have used VMWARE and Virtualbox.  Those are so simple.   You can merely just copy the .vhd file from one location to another and POW, it's backs up the entire VM.

The company I'm at now uses Hyper-V and I have been learning a lot about Hyper-V, but this issue has me a little baffled.

Thank you
0
Cliff GaliherCommented:
Well, your link is to a page for System Center.  So unless you've bought, installed, and configured SCVMM (as I mentioned above, that is an option) then almost nothing on that page applies.

To keep from muddying the waters, I'd recommend taking the backup stuff to a different question. Otherwise we can play whack-a-mole with each new random confusion that crops up during this conversation.
0
Steve WhitcherSystems AdministratorCommented:
I've not messed with VMWare in years, so I'm not sure how they handle it, but for Hyper-V, a .vhd file is not the whole VM, it's just the disk.  Moving or copying only the .vhd file to a new location is like pulling the hard drive out of a computer.  The hard drive needs the rest of the computer to make it work.  However, the "rest of the computer" in this case is just some tiny config files that contain the details of the VM, so it's trivial to move them around as well.

That said, I agree with Cliff, it's probably best to move the backup questions into another discussion to keep this one on track.
0
grizrulesAuthor Commented:
Understood, and Yes I have read up on SCCVM, but unfortunately we are not in a position to purchase that.

How would I move this thread somewhere else?  Would the MOD's do it or should I start a new one elsewhere?
0
Steve WhitcherSystems AdministratorCommented:
Grizrules -- I'm not suggesting you need to move the thread, but rather keep it focused on just the snapshot issue, and start a new thread with questions about backups.  

I think Cliff's point was that you were looking at the wrong documentation.  The link you posted is about VMM, not about Hyper-V in general.  On top of that, it's for a version of VMM that is several years old.  Anything you read in that document is very likely not relevant to using Hyper-V manager, and/or out of date.
0
Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
@Steve & @grizrules

VMware vSphere and Workstation, Player are exactly the same, substitute VMDK for VHD.

What is different between VMware vSphere, Workstation or Player and Hyper-V - the folder structure for the VM contains all the files, this is somewhat different with Hyper-V, the data disk (vhd) and meta data (machine config), are in different folders.

Rightly or Wrongly, this has led users, to copying random files from the folder, when distributing VMs, which to be honest is not the correct method of distributing a VMware VM. - however it can work!

Copy/Moving a VM, that are better methods, like Exporting and Importing, the Microsoft Hyper-V way!
0
grizrulesAuthor Commented:
So Andrew Hancock
You stated "Copy/Moving a VM, that are better methods, like Exporting and Importing, the Microsoft Hyper-V way!"

What would be the best way step by step to take a snapshot (checkpoint) in Hyper-V running on Windows 2012R2
Step-1
Step-2 etc..
Then what can you do to ensure a backup of a checkpoint if you do not have the SCCVM software?
Thank you all very much
0
Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
Snapshots are not backups.

If you want to backup/keep the current state of the VM, Backup the VM at that point in time.

e.g. Export the VM, this will give you a backup of the VM, at this point in time.

You cannot backup a snapshot.

Keeping a VM running on a snapshot, you will experience performance issues. Snapshots are designed as a quick method of rolling back applied changes, but we personally do not use them.

Snapshots on either platform VMware or Microsoft are evil!
0
Steve WhitcherSystems AdministratorCommented:
FWIW, according to MS, snapshots have always been intended for test/dev environments, and not for use in production.  Still, many people do use them in production, generally as a quick replacement for backing up the VM before making potentially dangerous changes.  Then they can roll back if something goes wrong, or delete the snapshot if everything goes right.  Snapshots weren't originally designed for this, and it can cause problems in some cases.  Basically, it's more like taking a "Crash Consistent" backup, and doesn't actually play nice with applications or do anything to prepare the machine for backup.
Windows 10 server will introduce a new feature, Production Snapshots, which IS designed for this use.  When this feature is enabled, any VM will only be able to have one snapshot at a time, but when you take a snapshot it will use vss and prepare things for backup properly before creating the snapshot, so that if you do have to roll back, it will bring everything back up cleanly.
0
grizrulesAuthor Commented:
I installed the Windows backup Server on my HOST1 and HOST2 machines.  This was a suitable backup solution until we have a better one.

So Steve are you saying I should DELETE my CHECKPOINTS?

IF SO, what is the best way to delete a checkpoint without leaving any metadata behind?

I do not have SCCVM, only the HYPER-V Management.
From what I can see (I'm not an expert at Powershell) I can go via the GUI to DELETE checkpoints and the CHECKPOINT TREE for each HYPER-V machine I have (running 2012R2 and Running within Win2012R2)

See Attachment.

I thought at least one checkpoint every now and then would be a GOOD idea, especially if you need to roll back incase of a windows update issue or any install that screws up something.

I do have it where each HYPER-V machine replicates to an offline copy on a different physical host.
So all Hyper-V's on HOST1 will replicate to HOST2 and vice a versa.
This is good is case we have a crash, however it provides no use if an windows update is applied for within 15 minutes the offline copy of the VM will be replicated.

-Original question:
-Checkpoints or No checkpoints?
-Best way for ME to delete checkpoints?

Thank you
0
Steve WhitcherSystems AdministratorCommented:
As a rule, you should not have any checkpoints on production VM's.  Checkpoints add significant overhead in the form of CPU and disk i/o.  Based on the purposes you're describing, regular backups of the VM's would be the right solution, not checkpoints.

Deleting checkpoints from the hyper-v gui is what I have always done.  I rarely delete an entire tree, but that's probably because I rarely have more than one checkpoint on any given VM other than in my test environment.
0
grizrulesAuthor Commented:
So delete the tree or delete just one checkpoint?

As you said " I rarely delete an entire tree, but that's probably because I rarely have more than one checkpoint on any given VM other than in my test environment"

Which means you have ONE checkpoint on a production machine.   However you stated above that you discourage checkpoints in a production environment?
0
Steve WhitcherSystems AdministratorCommented:
I do use checkpoints in production periodically, for short periods of time.  For example, before installing a major service pack or similar.  Once the install is complete without issues, I delete the checkpoint.  (That's the kind of use that MS doesn't recommend/officially support, but will support in Windows 10 server.)  I try to never leave a checkpoint for a VM more than just for the short time I need it, and I virtually never keep multiple checkpoints on a production VM.  Each checkpoint adds another layer of indirection that the host has to process when reading/writing to the drive, so the more checkpoints, the worse the performance gets.
0
grizrulesAuthor Commented:
10-4 Thank you
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Hyper-V

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.