What happens to the license when a Windows VM is deleted?

I'm considering purchasing a Windows 10 PC, but would probably want only to run Windows in a VM on the original hardware.

However, it's not inconceivable that I might delete the VM, or even format the hard drive. In that event, what precautions can I preemptively take?

To my understanding, the Windows activation is lost when the VM is deleted.

One interesting option would, seemingly, be to never boot the Windows OS itself but to grab the licensing information through Linux. However, that seems rather high-stakes given the replacement cost for a Windows license.

the seller just replied to an e-mail: It will come with Windows 10 Professional installed and activated. There will also be a Windows 10 Professional license sticker on the desktop for future installation.


Solution 1:

If you purchase just a license and purchase a Retail License, then you can re-use the license.

If you purchase a Windows 10 PC, very likely that will be an OEM license which cannot be re-used.

In order to re-use a license, you need a Retail License for your Windows 10 VM.

Solution 2:

However, it's not inconceivable that I might delete the VM, or even format the hard drive. In that event, what precautions can I preemptively take?

I can only comment about VMWare, not too sure about VirtualBox. Also I am not a legal expert. Use your discretion if you want to try out the following. While Retail key has transfer rights, OEM or upgrade does not.

  1. Create a Virtual Windows 10 machine in your VMWare.
  2. Install Windows 10 in it and activate it using your key.
  3. If you have unused Windows 7 retail license, you can even install Windows 7 first, then activate it and then upgrade your Windows 7 to Windows 10. Even though the free upgrade window is over long back, it still works and you will hopefully get a Windows 10 digital license.
  4. Eventually regardless if you upgraded from Windows 7/8.1 or got your Windows 10 activated using your key, you will have a Digital License whereby the hardware fingerprint will be stored on Microsoft Activation Servers. As a result you do not need to enter the key again on the same hardware even when you do a clean install of matching edition of Windows 10 on it.
  5. Access .VMX file that holds the Virtual Hardware parameters for your Windows 10 and note down the following two lines. You can right click on the file and open the file in any plain text editor. You must not lose these two lines. That's sort of your Virtual Motherboard. So copy them exactly as they are in a separate document, preferably a plain text file and keep it safe.

    uuid.bios = xxxxxxxxxxxxxxx

    uuid.location = xxxxxxxxxxxxx

  6. Go ahead and delete the VM whenever you wish.

  7. Create a new VM, preferably on the same Host Machine as earlier. A new .VMX file will be created.
  8. Do not attach any CD/DVD/ISO/Bootable pen drive to it and just run it once. It will boot to nothing. Shut it down. This first run creates UUID in the .VMX.
  9. Open .VMX and replace the uuid.bios and uuid.location entries with what you copied from earlier VM. Update them exactly as they were, in this new .VMX.
  10. Save .VMX and run the VM, again without any CD/DVD/ISO/Bootable pen drive etc
  11. VMWare will prompt you something like, 'Did you copy or move the Virtual Machine?' (This is because VMWare records the hash of certain parameters from .VMX including the path where it is located, change in UUID or change in path = You either copied or moved the machine)
  12. Select 'I Moved it' option.
  13. Now VMWare will allocate or rather keep the same UUID that you updated before in the .VMX file and configure the VM.
  14. Close the VM, attach your Windows 10 bootable device, go ahead and install the matching edition of your Windows 10 for which you had a Digital License earlier on VM. Select 'I don't have a product key' option during install and proceed.
  15. Windows 10 in that new VM will get automatically activated when you connect your VM to the Internet as the hardware fingerprint will match.

Option 2

After you install and activate Virtual Windows 10, shut it down and take a copy of the entire folder where it resides elsewhere, may be a backup hard drive/SSD/Pen drive or so. However you might need at least 40 - 50 GB of free space as your virtual disks might hold that much of volume.

Delete the original VM. Now replace it with the copy such that the original path must match. If original folder was D:\VM\My-Windows-10 then you must move it to the same path.

Everything is now same as earlier. Your Windows 10 remains activated and back to the original state as you installed it first.

Note - Even though Moving and Copying is in principle possible due to virtualization environment and software, make sure that you never run the backup copy even if you have an option to choose 'I moved it', then you are running two copies of your Windows 10 and that's a clear violation of licensing terms. 1 Key - 1 Machine.

Solution 3:

I am not a lawyer, but as far as I know Windows doesn't "activate" until the first post-install boot.

So you might be able to, say, add a 2nd disk, install Linux in that, and set up a VM that boots off the original disk. Or dd the disk to, say, a ZFS zvol before booting the VM. It would also enable you to snapshot it, so you always have a pristine 1st boot image for your VM.