For virtual machines on Hyper-V, a key mechanism designed specifically to distinguish cloned or snapshotted VMs is the VM Generation ID.
From the technical reference:
- VM Generation ID is a 128-bit integer assigned to a VM by the hypervisor.
- It is exposed to the guest (for example, via ACPI on Hyper-V).
- The value is reset whenever a snapshot is applied or similar operations occur.
Because of this behavior, a VM and its clone (or a VM before and after snapshot/restore) will have different VM Generation IDs, and software inside the guest can use this to detect that it is running as a different instance than before, or that it has been cloned/rolled back.
Other identifiers (such as MAC address, computer name, IP address, etc.) can be duplicated or manually copied when cloning and therefore are not guaranteed to be unique across original and clone. The VM Generation ID is specifically intended to provide a reliable, hypervisor-backed identity change signal for virtualized workloads (for example, virtualized domain controllers).
References: