1

I run Hyper-V on Windows 10 Pro. I have my dev machines hosted on it.

I was playing with some NAS software that uses WinRT to backup all Hyper-V machines onto NAS and I enabled CBT for my Hyper-V. Now it creates the .mrt and .rct files.

I would like to understand it a bit more.

How to enable/disable this CBT from my Windows host machine that has Hyper-V installed on? Is there any PowerShell command or option in GUI?

I know I can do it via NAS software again. But I would like to know how to do it vai tool in Windows directly.

2
  • What OS is Hyper-V running on, what version Hyper-V is the host running? You are attaching NAS to VMs via Hyper-V, right? Commented Jan 31, 2021 at 22:32
  • @DrinkSomePimpJuiceIT I clarified my question a bit and included information you asked about.
    – Hooch
    Commented Feb 1, 2021 at 8:27

1 Answer 1

1

Newer versions of Hyper-V have the Change Block Tracking functionality built into it and enabled by default. It's not something you disable easily per a native configuration. You hook into functions of this via Win32 / WMI Hyper-V APIs and such—so you either use it or don't use it basically.

It's an improved and more robust Hyper-V backup, snapshot, and recovery solution which overcomes many of the early Hyper-V version limitations, constraints, and complexities or performance issues depending on your backup operations and scale.

It somewhat of reminds me of the "Essentially" section of the canonical answer provided here regarding rdiff with regard to the way the base is merged with the delta to give you a new matching or recovered VM in an effective and non-wasteful fashion.

It's important to understand what it is and how it works to master using it for the best understanding and clarity.

  1. I've included the TechEd video link to watch more about its inner workings and such with more detail.

  2. I've also included the link to the Install-Module -Name xHyper-VBackup so you can start using and testing it.

Hyper-V WMI Based Backup

Starting in Windows Server 2016, Hyper-V started supporting backup through the Hyper-V WMI API. This approach still utilizes VSS inside the virtual machine for backup purposes, but no longer uses VSS in the host operating system. Instead, a combination of reference points and resilient change tracking (RCT) is used to allow developers to access the information about backed up virtual machines in an efficient manner. This approach is more scalable than using VSS in the host, however it is only available on Windows Server 2016 and later.

  1. To understand this architecture better – refer to this presentation:

  2. There is also an example on how to use these APIs available here:

    To be utilized with Windows Server Technical Preview for the purposes of testing and developing against the new Hyper-V backup and restore APIs. This module is provided without expectation of support, guarantees or warrantee - use at your own risk and discretion.

    Install Module

    Install-Module -Name xHyper-VBackup
    

Win32 APIs

Developers can use the SetVirtualDiskInformation, GetVirtualDiskInformation and QueryChangesVirtualDisk APIs on the Virtual Hard Disk Win32 API set as documented here: Virtual Hard Disk.

Note that to use these APIs, Hyper-V WMI still needs to be used to create reference points on associated virtual machines. These Win32 APIs then allow for efficient access to the data of the backed up virtual machine. The Win32 APIs do have several limitations:

  • They can only be accessed locally
  • They do not support reading data from shared virtual hard disk files
  • They return data addresses that are relative to the internal structure of the virtual hard disk

Source


More Correlated Resources


2
  • @Hooch ... There's some detail for you with my take on it but keep digging at it and testing and getting your hands dirty to master this functionality and then you can tell me more about it and perhaps have some additional scripts and such to help others in the future. I added the resource as they are related but I found that requirement square bracket comment interesting about Window 10 but lots of resources reference and talk about Server 2016 too. So the Windows 10 API may be more limited than Server 2016 but play and dig and test and do the other trivial stuff to figure it out. Commented Feb 3, 2021 at 4:10
  • 1
    Thank you very much for your anwer.
    – Hooch
    Commented Feb 3, 2021 at 9:52

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .