How to disable the feature.
The VM GenerationID acts as an important safeguard feature when virtualizing Domain Controllers. The operations are described here. Without this protection, the DC cannot detect that a snapshot-restore has occurred and cannot take the necessary recovery actions.
Typically, the VM GenerationID feature should be enabled in all production environments.
However, in certain setups, for example, controlled lab setups, you might want to remove this option. If running multiple virtual Domain Controllers in lab scenarios, you might want to be able to repeatably return to one consistent base configuration.
This could, for example, be accomplished by shutting down all virtual machines in the lab environment and take “cold” snapshots on all VMs in an offline state. The VMs could then be started and various experiments conducted, later to be snapshot-restored to the same base state – running various scenarios multiple times.
In such lab setup, the hypervisor-intervention of signalling the snapshote-restore action into the guest Domain Controller, triggering the DC repair mechanism might not be required, which may instead interfere with the lab process.

The VM GenerationID device is a virtual unit, presented to the guest operating system as a device attached to the virtual motherboard. The item can be viewed, in the guest operating system, through the Device Manager control panel tool.

Open Device Manager and select “Show hidden devices“.

Expand “System devices” and find the item named “Microsoft Hyper-V Generation Counter“. (Note that this device name will be the same in non-Microsoft hypervisors too.)

Examining the Details tab of the virtual device and selecting the “Service” property, we can note the value “gencounter“. This is the internal service/driver name of this device (as opposed to the Display Name which is “Microsoft Hyper-V Generation Counter”).

Now, open the Registry Editor and locate the following path:
HKLM\System\CurrentControlSet\Services\gencounter
The “Type” value of 1 indicates a system-level driver, to be loaded by the operating system kernel at boot time.
The “Start” value of 3, combined with the Type, means “Load automatically by PnP if needed for this device.”

To disable the virtual device, set the Start value to 4, meaning “Disabled”.
The change will take effect at the next Domain Controller restart.
NOTE: Do not conduct this action in an Active Directory production environment.
Disabling this feature should only be used in well-controlled lab scenarios.

After restart, in Device Manager, with hidden devices enabled, the now disabled state of the VM GenerationID item can be verified.
Now, snapshots can be taken which will not be “protected” when reverted.
If later reverting the lab machines to a previous snapshot state, the DC will not be triggered by the hypervisor and will not conduct any of the actions described in part 3.
Additionally, if you would wish to return to the default protected state, simply reverse the registry change, replacing the modified value 4 with the original value of 3.
Summary of part 4:
- The VM GenerationID is an important safeguard in all virtualized Domain Controller production environments.
- In controlled and isolated lab setups, the protection mechanisms might cause issues, where repeated snapshot reverts are indeed expected.
- By altering the registry key locally on each DC, the safeguard can be disabled.