How do I avoid needing to activate Windows when I move a VM? [Hyper-V]

It is possible to move virtual machines around between different physical computers running Hyper-V without needing to run activation inside Windows.  The trick is that you need to make sure that the virtual hardware does not change when you move the virtual machine.

The most common mistake that people make when moving a virtual machine by hand (e.g. not using SCVMM or Hyper-V Clustering) is that they just copy the virtual hard disks (.VHD files) and create a new virtual machine that uses these virtual hard disks.

This new virtual machine will have new hardware identifiers for all the virtual hardware it contains – so even if you setup the virtual machine with the same settings, Windows will ask to be reactivated.

The best way to avoid this is to export the virtual machine on the source Hyper-V server, and then import it on the target server.  This will ensure that all the virtual hardware has the same identifying information, and you will not need to reactivate Windows after moving the virtual machine.

Cheers,
Ben