Virtualization Hyper-V - Preserve virtual machine digital license (activation)


In case you want to activate your Windows virtual machines, it is important that you will preserve the activation and resulted digital license. When done correctly, you can delete the virtual machine when it is no longer needed, then restore it whenever required. You can even import it to another Hyper-V host computer, preserving its activation status.

This tutorial will show you how to preserve a VM digital license in Hyper-V. Tutorial applies to Windows 8 and all later Windows versions.

Hyper-V logo.png


Use links below to jump to any part of this tutorial, back button of your browser to return to this list.

Contents





Part ONE

Digital license explained


1.1 Windows Digital License was introduced in Windows 10. What it means in simple terms is, that once a specific Windows edition has been activated on a physical computer or a virtual machine, next time it is online, its license status and activation will be saved on Microsoft's activation servers. All future installations of that same edition will be automatically activated. When clean installing, user can select I don't have a product key, Windows will be automatically activated based on existing digital license.

No product key.jpg


1.2 Windows Digital License is edition specific. However, it is not bit architecture or language specific. In other words, if you have installed and activated a 32-bit Windows 10 PRO in French, you can clean install a 64-bit Windows 10 PRO in Swedish on that same machine, and it will be automatically activated based on existing digital license.

1.3 Windows Digital License is based on so called hardware ID (HWID). Windows 10 has 15 different hardware IDs, none of them includes any information about internal or external storage media (HDD, SSD, VHD, DVD, USB Flash Drive and so on):

HWID
  • HardwareID-0 Manufacturer + Family + Product Name + SKU Number + BIOS Vendor + BIOS Version + BIOS Major Release + BIOS Minor Release
  • HardwareID-1 Manufacturer + Family + Product Name + BIOS Vendor + BIOS Version + BIOS Major Release + BIOS Minor Release
  • HardwareID-2 Manufacturer + Product Name + BIOS Vendor + BIOS Version + BIOS Major Release + BIOS Minor Release
  • HardwareID-3 Manufacturer + Family + Product Name + SKU Number + Baseboard Manufacturer + Baseboard Product
  • HardwareID-4 Manufacturer + Family + Product Name + SKU Number
  • HardwareID-5 Manufacturer + Family + Product Name
  • HardwareID-6 Manufacturer + SKU Number + Baseboard Manufacturer + Baseboard Product
  • HardwareID-7 Manufacturer + SKU Number
  • HardwareID-8 Manufacturer + Product Name + Baseboard Manufacturer + Baseboard Product
  • HardwareID-9 Manufacturer + Product Name
  • HardwareID-10 Manufacturer + Family + Baseboard Manufacturer + Baseboard Product
  • HardwareID-11 Manufacturer + Family
  • HardwareID-12 Manufacturer + Enclosure Type
  • HardwareID-13 Manufacturer + Baseboard Manufacturer + Baseboard Product
  • HardwareID-14 Manufacturer
Digital license is based on HWID 3.

More about HWID: Specifying Hardware IDs for a Computer | Microsoft Docs

1.4 As disks are out of the equation, having nothing to do with HWID and digital license, once a computer or virtual machine has been activated with a digital license for a specific edition of Windows, you can replace the HDD, SSD, or VHD and clean re-install on a new disk, Windows being automatically activated.

This is extremely practical with virtual machines. Your VHD has grown, it's too big, or you just want to start from scratch. Simply delete the VHD, create a new one, install Windows, and it will be automatically activated.

1.5 An additional benefit is, that all Windows installations (same edition) on the PC or virtual machine have a digital license. An example: I always install first the UK English Windows PRO edition on my computers, and activate it. When activated, I will install same edition in both my native languages Finnish and Swedish, and in language of my adopted home country German on same computer in so called multi boot scenario.

I can now select any of the four language versions of Windows and boot to it, Windows being automatically activated.



Part TWO

Install Windows


2.1 Install Windows normally on a Hyper-V VM, and activate it.

2.2 My recommendation, not obligatory: Rename your VM to remind you it is activated. I simply add (activated) to VM name. For example. if the VM name is W11 PRO x64, I rename it to W11 PRO x64 (activated) as soon as I have activated it (#1 in next screenshot).

2.3 My recommendation, not obligatory: Create a checkpoint, rename it with something descriptive. I usually rename the first checkpoint as Clean install, activated (#2 in next screenshot). When necessary to start from scratch, I can simply apply this checkpoint.

VM activated & initial checkpoint.jpg





Part THREE

Export VM


3.1 Shut down the VM. Select it in Hyper-V Manager, select Export on VM pane bottom right:

Export VM.jpg


3.2 Click Browse to select where to export:

Select where to export.jpg


3.2 My recommendation is to create a folder called Hyper-V Export on an external HDD or NAS, and select it:

Export folder.jpg


3.3 When you now need to free storage space on your Hyper-V host, you can simply delete the VM.



Part FOUR

ImportVM


4.1 When you again need the VM, select Import Virtual Machine on Actions pane in Hyper-V Manager (top right pane):

Import VM.jpg


4.2 Click Browse, and select the folder where you exported your VM. Click Select Folder to start the import:

Select Import Folder.jpg


Please notice:

After re-installing Windows on your Hyper-V host, or renaming your Hyper-V virtual switches, you might get the following error message when importing a VM. Simply select another virtual switch from drop-down list to proceed.

Virtual Switch not found.jpg




4.3 IMPORTANT: In Import Virtual Machine wizard, always select Restore the virtual machine (use the existing unique ID). This will import the VM, preserving its activation status:

Restore VM.jpg


4.4 Selecting Register the virtual machine in-place will also preserve the activation status, but if you later delete the VM from Hyper-V Manager, it will also be deleted from your Export folder, and cannot be imported anymore.

Selecting Copy the virtual machine will create a new SID, and VM will not be activated.


That's it, geeks! Keep your activated virtual machines safe.

Kari
 
Last edited:
Hi folks
Seems simple enough to me -- whether Windows is activated or not on a VM.

With a VM : IF (and I mean IF !!! you activate it successfully - by whatever (legit of course) means - it can be moved around and exported (even to different HOST hardware) provided you keep the same UUIDD in the config
The point is that the VM does NOT need to be activated first!
 

My Computers

System One System Two

  • OS
    Windows 11
    Computer type
    PC/Desktop
    Manufacturer/Model
    Homebuilt
    CPU
    AMD Ryzen 7 3800XT
    Motherboard
    ASUS ROG Crosshair VII Hero (WiFi)
    Memory
    32GB
    Graphics Card(s)
    EVGA GeForce GTX 1080 Ti
  • Operating System
    Windows 11 Education
    Computer type
    Laptop
    Manufacturer/Model
    Dell Inspiron 7773
    CPU
    Intel i7-8550U
    Memory
    32GB
    Graphics card(s)
    Nvidia Geforce MX150
    Sound Card
    Realtek
    Monitor(s) Displays
    17"
    Screen Resolution
    1920 x 1080
    Hard Drives
    Toshiba 512GB NVMe SSD
    SK Hynix 512GB SATA SSD
    Internet Speed
    Fast!
Here's a scenario:

1. Create a new VM.
2. Optional: install Windows 10 or Windows 11 on it using the generic product key so that it does NOT activate.
3. Export the VM.
4 Import the same VM onto 9 other host computers.
5. Install the same edition of Windows 10 or 11 on each VM using the generic product key only. So let's say you now have 10 different host computers with the same VM installed on each one and each has Windows 10 or 11 Pro with the generic product key only and none of them are activated.
6. Now use a legitimate product key to activate only one of the 10 VMs.
7. The other nine VMs will also activate with no change to their generic product keys.
 

My Computers

System One System Two

  • OS
    Windows 11
    Computer type
    PC/Desktop
    Manufacturer/Model
    Homebuilt
    CPU
    AMD Ryzen 7 3800XT
    Motherboard
    ASUS ROG Crosshair VII Hero (WiFi)
    Memory
    32GB
    Graphics Card(s)
    EVGA GeForce GTX 1080 Ti
  • Operating System
    Windows 11 Education
    Computer type
    Laptop
    Manufacturer/Model
    Dell Inspiron 7773
    CPU
    Intel i7-8550U
    Memory
    32GB
    Graphics card(s)
    Nvidia Geforce MX150
    Sound Card
    Realtek
    Monitor(s) Displays
    17"
    Screen Resolution
    1920 x 1080
    Hard Drives
    Toshiba 512GB NVMe SSD
    SK Hynix 512GB SATA SSD
    Internet Speed
    Fast!
To rescue the license that was bound to the VM you just deleted.
Gotcha, that part is very true. Thanks for the clarification!
 

My Computers

System One System Two

  • OS
    Windows 11
    Computer type
    PC/Desktop
    Manufacturer/Model
    Homebuilt
    CPU
    AMD Ryzen 7 3800XT
    Motherboard
    ASUS ROG Crosshair VII Hero (WiFi)
    Memory
    32GB
    Graphics Card(s)
    EVGA GeForce GTX 1080 Ti
  • Operating System
    Windows 11 Education
    Computer type
    Laptop
    Manufacturer/Model
    Dell Inspiron 7773
    CPU
    Intel i7-8550U
    Memory
    32GB
    Graphics card(s)
    Nvidia Geforce MX150
    Sound Card
    Realtek
    Monitor(s) Displays
    17"
    Screen Resolution
    1920 x 1080
    Hard Drives
    Toshiba 512GB NVMe SSD
    SK Hynix 512GB SATA SSD
    Internet Speed
    Fast!
I did something silly and deleted the folder which contained my activated Hyper-V VMs, but did not realise it until written other stuff to drive which basically killed option to use Recuva.

Fortunately, I had backed up my VMs in Onedrive, so I downloaded them, and to my horror Hyper-V crashed when I tried to restore them!

So I decided to try copying them with a new unique ID in the faint hope I could reactivate them using the Activation Troubleshooter, selecting "I have changed my hardware". I say faint hope as this means of activating has always been flakey at best.


1628368510261.png

Imagine my surprise when the VM just activated automatically!

I tested all the vms, clean installs, and they all activated!

I have no idea why this should be!!!
 

My Computer

System One

  • OS
    Windows 10 Pro + others in VHDs
    Computer type
    Laptop
    Manufacturer/Model
    ASUS Vivobook 14
    CPU
    I7
    Motherboard
    Yep, Laptop has one.
    Memory
    16 GB
    Graphics Card(s)
    Integrated Intel Iris XE
    Sound Card
    Realtek built in
    Monitor(s) Displays
    N/A
    Screen Resolution
    1920x1080
    Hard Drives
    1 TB Optane NVME SSD, 1 TB NVME SSD
    PSU
    Yep, got one
    Case
    Yep, got one
    Cooling
    Stella Artois
    Keyboard
    Built in
    Mouse
    Bluetooth , wired
    Internet Speed
    72 Mb/s :-(
    Browser
    Edge mostly
    Antivirus
    Defender
    Other Info
    TPM 2.0
Weird, I tried that as recently as maybe 2 months ago and it didn't work for me. I had to use a new unique ID because the system kept telling me that a VM with the already existing ID already existed on the system, but it didn't!

That's one thing that I wish were easier in Hyper-V. In VMware Workstation it's insanely easy to save and restore the unique ID. It's simply one line in a plain text file.
 

My Computers

System One System Two

  • OS
    Win11 Pro 23H2
    Computer type
    PC/Desktop
    Manufacturer/Model
    Home Built
    CPU
    Intel i7-11700K
    Motherboard
    ASUS Prime Z590-A
    Memory
    128GB Crucial Ballistix 3200MHz DRAM
    Graphics Card(s)
    No GPU - CPU graphics only (for now)
    Sound Card
    Realtek (on motherboard)
    Monitor(s) Displays
    HP Envy 32
    Screen Resolution
    2560 x 1440
    Hard Drives
    1 x 1TB NVMe Gen 4 x 4 SSD
    1 x 2TB NVMe Gen 3 x 4 SSD
    2 x 512GB 2.5" SSDs
    2 x 8TB HD
    PSU
    Corsair HX850i
    Case
    Corsair iCue 5000X RGB
    Cooling
    Noctua NH-D15 chromax.black cooler + 10 case fans
    Keyboard
    CODE backlit mechanical keyboard
    Mouse
    Logitech MX Master 3
    Internet Speed
    1Gb Up / 1 Gb Down
    Browser
    Edge
    Antivirus
    Windows Defender
    Other Info
    Additional options installed:
    WiFi 6E PCIe adapter
    ASUS ThunderboltEX 4 PCIe adapter
  • Operating System
    Win11 Pro 23H2
    Computer type
    Laptop
    Manufacturer/Model
    Lenovo ThinkBook 13x Gen 2
    CPU
    Intel i7-1255U
    Memory
    16 GB
    Graphics card(s)
    Intel Iris Xe Graphics
    Sound Card
    Realtek® ALC3306-CG codec
    Monitor(s) Displays
    13.3-inch IPS Display
    Screen Resolution
    WQXGA (2560 x 1600)
    Hard Drives
    2 TB 4 x 4 NVMe SSD
    PSU
    USB-C / Thunderbolt 4 Power / Charging
    Mouse
    Buttonless Glass Precision Touchpad
    Keyboard
    Backlit, spill resistant keyboard
    Internet Speed
    1Gb Up / 1Gb Down
    Browser
    Edge
    Antivirus
    Windows Defender
    Other Info
    WiFi 6e / Bluetooth 5.1 / Facial Recognition / Fingerprint Sensor / ToF (Time of Flight) Human Presence Sensor
This tutorial will show you how to preserve a VM digital license in Hyper-V.
I have run into a problem with importing an exported Hyper-V VM into another Host machine. The scenario is that I now have a newer more powerful machine that I wish to transfer all my existing VMs to. All bar one of them imported successfully and retained their activation.

The one that wouldn't run on the new Host reported that "the key protector could not be unwrapped".

Hyper-V Shielded VM - The Key Protector could not be unwrapped.png


This VM was an install of Windows 11 Home. The Host machine (on Windows 10 Pro) had its own TPM turned on when the VM was created. The VM also had its own virtual TPM, as required to install Windows 11. The new Host machine is running Windows 11 Pro and also has TPM turned on.

This error on starting an imported VM would normally correspond to a failure to startup a Shielded VM.

Hyper-V Shielded VM - HostGuardianService-Client event 2014.png


But the Security Policy settings for the VM on the original Host clearly showed that shielding was not enabled.

Hyper-V Shielded VM - Settings OFF.png


Despite that, the original Host machine does now have a Shielded VM Signing Certificate, as shown by the command:
certutil -viewstore "Shielded VM local Certificates"

Hyper-V Shielded VM Certificate.png


I could get the imported VM to run on the new Host, but only if I turned off TPM in its settings. This was not a satisfactory solution as it prevented any testing of TPM related issues in Windows 11. It also meant that it would be impossible to perform an in-place upgrade as Setup would fail on there being no TPM.

It would appear that in addition to exporting and importing the VM, I would also need to export and import the signing certificate in order to run the VM on its new Host. I did not attempt this. I did not need to as I found another way to activate the transferred copy of the original VM.

Although the imported VM was behaving as if it were a shielded VM its .vhdx was not bitlocker protected (no bitlocker in Home) so I could just attach it to another newly created VM, also with TPM enabled. But it did not activate as the installed key was the generic Home key and not the key I had used later to activate the original VM.

Then I signed in to the activated VM on the old host and switched it from a local account to a Microsoft account. Next I shut it down and signed in to the unactivated new VM on the new Host. Running the Activation Troubleshooter and selecting 'I have changed hardware' enabled me to transfer activation to this new clone VM. Having done so the new Host machine now has its own signing certificate, something it did not have before creating the new VM. When I try to export this new VM and import it into another Host I run into the same issue all over again.
 

My Computers

System One System Two

  • OS
    Windows 11 Home
    Computer type
    Laptop
    Manufacturer/Model
    Acer Aspire 3 A315-23
    CPU
    AMD Athlon Silver 3050U
    Memory
    8GB
    Graphics Card(s)
    Radeon Graphics
    Monitor(s) Displays
    laptop screen
    Screen Resolution
    1366x768 native resolution, up to 2560x1440 with Radeon Virtual Super Resolution
    Hard Drives
    1TB Samsung EVO 870 SSD
    Internet Speed
    50 Mbps
    Browser
    Edge, Firefox
    Antivirus
    Defender
    Other Info
    fully 'Windows 11 ready' laptop. Windows 10 C: partition migrated from my old unsupported 'main machine' then upgraded to 11. A test migration ran Insider builds for 2 months. When 11 was released on 5th October it was re-imaged back to 10 and was offered the upgrade in Windows Update on 20th October. Windows Update offered the 22H2 Feature Update on 20th September 2022. It got the 23H2 Feature Update on 4th November 2023 through Windows Update.

    My SYSTEM THREE is a Dell Latitude 5410, i7-10610U, 32GB RAM, 512GB ssd, supported device running Windows 11 Pro (and all my Hyper-V VMs).

    My SYSTEM FOUR is a 2-in-1 convertible Lenovo Yoga 11e 20DA, Celeron N2930, 4GB RAM, 256GB ssd. Unsupported device: currently running Win10 Pro, plus Win11 Pro RTM and Insider Beta as native boot vhdx.

    My SYSTEM FIVE is a Dell Latitude 3190 2-in-1, Pentium Silver N5030, 4GB RAM, 512GB NVMe ssd, supported device running Windows 11 Pro, plus the Insider Beta, Dev, and Canary builds as a native boot .vhdx.
  • Operating System
    Windows 11 Pro
    Computer type
    Laptop
    Manufacturer/Model
    Dell Lattitude E4310
    CPU
    Intel® Core™ i5-520M
    Motherboard
    0T6M8G
    Memory
    8GB
    Graphics card(s)
    (integrated graphics) Intel HD Graphics
    Screen Resolution
    1366x768
    Hard Drives
    500GB Crucial MX500 SSD
    Browser
    Firefox, Edge
    Antivirus
    Defender
    Other Info
    unsupported machine: Legacy bios, MBR, TPM 1.2, upgraded from W10 to W11 using W10/W11 hybrid install media workaround. In-place upgrade to 22H2 using ISO and a workaround. Feature Update to 23H2 by manually installing the Enablement Package.

    My SYSTEM THREE is a Dell Latitude 5410, i7-10610U, 32GB RAM, 512GB ssd, supported device running Windows 11 Pro (and all my Hyper-V VMs).

    My SYSTEM FOUR is a 2-in-1 convertible Lenovo Yoga 11e 20DA, Celeron N2930, 4GB RAM, 256GB ssd. Unsupported device: currently running Win10 Pro, plus Win11 Pro RTM and Insider Beta as native boot vhdx.

    My SYSTEM FIVE is a Dell Latitude 3190 2-in-1, Pentium Silver N5030, 4GB RAM, 512GB NVMe ssd, supported device running Windows 11 Pro, plus the Insider Beta, Dev, and Canary builds as a native boot .vhdx.
Thanks for the tutorial @Kari, I now have my activated Win 10 Pro VM exported to drive D:. I went through so much trouble because I didn't turn off Windows Hello and I don't want to go through the hassle of calling MS to reactivate again.
 

My Computers

System One System Two

  • OS
    Windows 11 Canary Channel
    Computer type
    PC/Desktop
    Manufacturer/Model
    PowerSpec B746
    CPU
    Intel Core i7-10700K
    Motherboard
    ASRock Z490 Phantom Gaming 4/ax
    Memory
    16GB (8GB PC4-19200 DDR4 SDRAM x2)
    Graphics Card(s)
    NVIDIA GeForce GTX 1050 TI
    Sound Card
    Realtek Audio
    Monitor(s) Displays
    Samsung SAM0A87 Samsung SAM0D32
    Screen Resolution
    1920 x 1080
    Hard Drives
    NVMe WDC WDS100T2B0C-00PXH0 1TB
    Samsung SSD 860 EVO 1TB
    PSU
    750 Watts (62.5A)
    Case
    PowerSpec/Lian Li ATX 205
    Keyboard
    Logitech K270
    Mouse
    Logitech M185
    Browser
    Microsoft Edge and Firefox
    Antivirus
    ESET Internet Security
  • Operating System
    Windows 11 Canary Channel
    Computer type
    PC/Desktop
    Manufacturer/Model
    PowerSpec G156
    CPU
    Intel Core i5-8400 CPU @ 2.80GHz
    Motherboard
    AsusTeK Prime B360M-S
    Memory
    16 MB DDR 4-2666
    Monitor(s) Displays
    23" Speptre HDMI 75Hz
    Screen Resolution
    1920x1080
    Hard Drives
    Samsung 970 EVO 500GB NVMe
    Mouse
    Logitek M185
    Keyboard
    Logitek K270
    Browser
    Firefox, Edge and Edge Canary
    Antivirus
    Windows Defender

Latest Support Threads

Back
Top Bottom