none
HyperV: How to enable/disable RCT (changeTracking) using WMI ? RRS feed

  • Question

  • Hi Experts,

    With WMI, there is a way to query and get the changedblocks using WMI but Is there a way to enable/disable RCT using WMI ? 

    With Win32 API, there are API functions to perform these operations but i am looking for WMI methods that can enable/disable/getRctState.

    - Balu

    Wednesday, June 26, 2019 11:42 AM

Answers

  • Hi,

    Thanks for your question.

    I agree with Leon, Resilient Change Tracking is enabled by default in Windows Server 2016 Hyper-V. However, it is only used if the VM configuration version is set to version 8. Furthermore, if the Hyper-V deployment is clustered, then all of the nodes that participate in the cluster must be running Windows Server 2016.

    Starting in V8.1.2, all Hyper-V VM backup operations in the Windows Server 2016 or later environment uses RCT. Because previous VSS backups do not have RCT change-tracking information, the first time you use Data Protection for Microsoft Hyper-V V8.1.2 to back up your VMs on Windows Server 2016, an incremental-forever full backup is created.

    After you backed up a VM using RCT, you can no longer use Data Protection for Microsoft Hyper-V V8.1.0 to run VSS backups on that VM.

    Reference Link:

    https://www.itprotoday.com/business-resources/microsoft-brings-resilient-change-tracking-rct-windows-server-2016

    https://www.vembu.com/blog/microsoft-hyper-v-resilient-change-tracking/

    Please Note: Since the web site is not hosted by Microsoft, the link may change without notice. Microsoft does not guarantee the accuracy of this information.

    Furthermore, we could also consult our DPM forum for this question,

    https://social.technet.microsoft.com/Forums/office/en-US/home?forum=dataprotectionmanager

    Hope above information can help you. If you have any question or concern, please feel free to let me know.

    Best regards,

    Michael


    Please remember to mark the replies as an answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com

    • Marked as answer by SBT1234 Thursday, June 27, 2019 3:32 PM
    Thursday, June 27, 2019 4:07 AM
    Moderator
  • You can check the Hyper-V virtual machine configuration version (hardware version) by running the following PowerShell command:

    Get-VM * | Select-Object Name, Version


    Blog: https://thesystemcenterblog.com LinkedIn:

    • Marked as answer by SBT1234 Thursday, June 27, 2019 3:32 PM
    Thursday, June 27, 2019 5:35 AM
  • Thanks for the info. if i understand correctly, RCT is default enabled for VMs with hardware version 8. If so, is there a way to get the hardware version using WMI ?

    as mentioned, there are APIs introduced in Virtdisk.dll to get the RCT state, enable/disable it ?

    • SetVirtualDiskInformation
    • GetVirtualDiskInformation
    • QueryChangesVirtualDisk 

    Do we have any equivalent in WMI ?

    "Version" is a property of the "Msvm_ComputerSystemSettingData" class which is connected to the virtual machine's "Msvm_ComputerSystem".

    How you acquire it depends on the language that you're using and if you're using the old WMI API or the newer MI API. In PowerShell, using MI, you can get all VMs' versions like this:

    Get-CimInstance -Namespace root/virtualization/v2 -ClassName Msvm_ComputerSystem | Get-CimAssociatedInstance -ResultClassName Msvm_VirtualSystemSettingData | select ElementName, Version

    I have not looked at anything with the backup APIs though, so I don't know anything about querying RCT. HTH


    Eric Siron
    Altaro Hyper-V Blog
    I am an independent contributor, not an Altaro employee. I accept all responsibility for the content of my posts. You accept all responsibility for any actions that you take based on the content of my posts.

    • Marked as answer by SBT1234 Thursday, June 27, 2019 3:32 PM
    Thursday, June 27, 2019 1:39 PM

All replies

  • Hi,

    As far as I know you cannot disable Resilient Change Tracking (RCT), as it is a native Microsoft Hyper-V mechanism.

    Best regards,
    Leon


    Blog: https://thesystemcenterblog.com LinkedIn:

    Wednesday, June 26, 2019 11:45 AM
  • Hi,

    Thanks for your question.

    I agree with Leon, Resilient Change Tracking is enabled by default in Windows Server 2016 Hyper-V. However, it is only used if the VM configuration version is set to version 8. Furthermore, if the Hyper-V deployment is clustered, then all of the nodes that participate in the cluster must be running Windows Server 2016.

    Starting in V8.1.2, all Hyper-V VM backup operations in the Windows Server 2016 or later environment uses RCT. Because previous VSS backups do not have RCT change-tracking information, the first time you use Data Protection for Microsoft Hyper-V V8.1.2 to back up your VMs on Windows Server 2016, an incremental-forever full backup is created.

    After you backed up a VM using RCT, you can no longer use Data Protection for Microsoft Hyper-V V8.1.0 to run VSS backups on that VM.

    Reference Link:

    https://www.itprotoday.com/business-resources/microsoft-brings-resilient-change-tracking-rct-windows-server-2016

    https://www.vembu.com/blog/microsoft-hyper-v-resilient-change-tracking/

    Please Note: Since the web site is not hosted by Microsoft, the link may change without notice. Microsoft does not guarantee the accuracy of this information.

    Furthermore, we could also consult our DPM forum for this question,

    https://social.technet.microsoft.com/Forums/office/en-US/home?forum=dataprotectionmanager

    Hope above information can help you. If you have any question or concern, please feel free to let me know.

    Best regards,

    Michael


    Please remember to mark the replies as an answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com

    • Marked as answer by SBT1234 Thursday, June 27, 2019 3:32 PM
    Thursday, June 27, 2019 4:07 AM
    Moderator
  • Thanks for the info. if i understand correctly, RCT is default enabled for VMs with hardware version 8. If so, is there a way to get the hardware version using WMI ?

    as mentioned, there are APIs introduced in Virtdisk.dll to get the RCT state, enable/disable it ?

    • SetVirtualDiskInformation
    • GetVirtualDiskInformation
    • QueryChangesVirtualDisk 

    Do we have any equivalent in WMI ?

    Thursday, June 27, 2019 5:30 AM
  • You can check the Hyper-V virtual machine configuration version (hardware version) by running the following PowerShell command:

    Get-VM * | Select-Object Name, Version


    Blog: https://thesystemcenterblog.com LinkedIn:

    • Marked as answer by SBT1234 Thursday, June 27, 2019 3:32 PM
    Thursday, June 27, 2019 5:35 AM
  • Thanks for the info. if i understand correctly, RCT is default enabled for VMs with hardware version 8. If so, is there a way to get the hardware version using WMI ?

    as mentioned, there are APIs introduced in Virtdisk.dll to get the RCT state, enable/disable it ?

    • SetVirtualDiskInformation
    • GetVirtualDiskInformation
    • QueryChangesVirtualDisk 

    Do we have any equivalent in WMI ?

    "Version" is a property of the "Msvm_ComputerSystemSettingData" class which is connected to the virtual machine's "Msvm_ComputerSystem".

    How you acquire it depends on the language that you're using and if you're using the old WMI API or the newer MI API. In PowerShell, using MI, you can get all VMs' versions like this:

    Get-CimInstance -Namespace root/virtualization/v2 -ClassName Msvm_ComputerSystem | Get-CimAssociatedInstance -ResultClassName Msvm_VirtualSystemSettingData | select ElementName, Version

    I have not looked at anything with the backup APIs though, so I don't know anything about querying RCT. HTH


    Eric Siron
    Altaro Hyper-V Blog
    I am an independent contributor, not an Altaro employee. I accept all responsibility for the content of my posts. You accept all responsibility for any actions that you take based on the content of my posts.

    • Marked as answer by SBT1234 Thursday, June 27, 2019 3:32 PM
    Thursday, June 27, 2019 1:39 PM
  • Thanks for the replies. That will definitely help me to understand this feature from MS.

    if you have any idea on WMI API to enable/disable, then do share it.

    -Balu

    Thursday, June 27, 2019 3:35 PM
  • Hi,

    I'm very glad that the information here is helpful to you. 

    Also thanks for your sharing and support.

    Have a nice day!

    Best regards,

    Michael


    Please remember to mark the replies as an answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com

    Friday, June 28, 2019 2:17 AM
    Moderator