How to export and import Checkpoints

Exporting checkpoints is one of those features that is very handy but not commonly used since it’s pretty situational. For example, picture this scenario: let’s say we just applied an update to a VM and the update went south. Thankfully, we created a checkpoint of the VM before we did the upgrade and we can use that checkpoint to revert the VM.

However, we want to perform more troubleshooting on this issue in a test environment to work out all the kinks with the upgrade. To do this, we take a checkpoint of the server after the upgrade was done, in its broken state, and then apply the previous checkpoint to revert the VM back to the point when everything was working. Now we can export the checkpoint of the VM from before the upgrade to a test environment for further analyzing.

How to export from a Checkpoint

If you are planning on importing a checkpoint into a Hyper-V environment that is using a different processor manufacturer, make sure to shut the VM down before you create the checkpoint. I will explain why when we go over importing the checkpoint. To export a checkpoint from a VM, left click on the VM in Hyper-V Manager to select it. In the Checkpoints window pane the checkpoints will be displayed. Right click on the checkpoint you wish to export and select Export. Also, notice in the screenshot below that the VM is currently running from the checkpoint of the VM state before we did the upgrade, as indicated by the green triangle:

1-exp

The Export Virtual Machine window will appear. Click the Browse button to save the checkpoint to another location. Click Export to begin the export process:

2-exp

Hyper-V Manager will indicate the progress of the export job in the status column of the VM:

3-exp

When the export job has finished, a copy of the VM is created from the checkpoint that we selected. When we look at the directory that was specified during the export, we can now see that a new VHDX file was created:

4-exp

The VM configuration and saved state files have also been created:

5-exp

We are now ready to copy the folder containing our checkpoint export over to our testing environment, which will allow us to perform more analysis on the update that broke our server.

How to import from a Checkpoint

To import the checkpoint as a VM, simply open up Hyper-V manager and select the option to Import Virtual Machine:

6-imp

Select the folder where your checkpoint was exported to and click Next:

7-imp

The VM name will be displayed. Select the name and click Next:

8-imp

Now we must choose the type of import to perform. There are three options available:

  • Register – Use this option if the VM and its files are already stored in the desired location and you just need to register the VM. It will keep the same  unique VM ID as before. The VM  ID is a globally unique identifier (GUID) that Hyper-V assigns to each VM for identification purposes. This option is also handy if you run into an issue where the VM is missing from Hyper-V Manager. You can simply register the machine again.
  • Restore – This option will copy the VM and its files to a desired location and keep the same existing VM ID. This is useful if you exported a VM to a flash drive and want to run the VM directly from the flash drive without copying the VM files.
  • Copy – This option will copy the VM (just like in the restore option) and will also register it with a new VM ID. You would normally choose this option if you are copying a VM and using that VM copy in the same environment as the original VM.

In our example we will select the option to Register. This is because I have already copied the VM over to the location I want it to run from and since our test lab is in a separate environment from our production environment we don’t need to change the VM ID:

9-imp

The following error will appear if the server we are importing to contains a different processor manufacturer than the one we exported it from. In our example we exported the checkpoint from a Hyper-V server configured with an AMD processor, and imported the VM to our test Hyper-V environment which runs off an Intel processor. This is also true when using Live Migration.:

10-imp

This basically means that we can’t import the VM and restore it to the “running” state that it was in before. Instead, we will have to click Delete Saved State. The VM will now import as in a “crash consistent” state. If we would have shut down the VM before we created the checkpoint in the example above, we wouldn’t have run into this issue.

Next, we have to configure the VM networking components since the virtual switch in our test lab is not the same as in our production environment:

11-imp

Then, click Next and then Finish. Now our VM is imported:

12-imp

We can now power up the VM and perform out testing and analysis.

 

Altaro Hyper-V Backup
Share this post

Not a DOJO Member yet?

Join thousands of other IT pros and receive a weekly roundup email with the latest content & updates!

Leave a comment or ask a question

Your email address will not be published. Required fields are marked *

Your email address will not be published.

Notify me of follow-up replies via email

Yes, I would like to receive new blog posts by email

What is the color of grass?

Please note: If you’re not already a member on the Dojo Forums you will create a new account and receive an activation email.