Using a SLIC license in a VM

SLIC licenses are interesting.  In my last post, I covered how you can get the SLIC installation medium for select HP machines.  Now, obviously, I went back to Linux, but it did open some experimenting opportunities using virtual machines.

Now, let’s be clear, my Windows needs are tiny and most are covered by a VM I run on my infrastructure and I connect using RDP+SSH.  I really just like to mess around and see where the limits of these things are.

So, back in Linux, I installed VirtualBox and looked how I could use the SLIC enabled license within a virtual machine.  Obviously, I need the installation medium, which I have in WIM format (look up the package wimtools on Linux: Invaluable for working with WIM images).  So, ignoring anything else, I used that installation medium to install Windows 7 Pro.  That worked fine, albeit it was a hassle to try boot from USB (Solution: Don’t. Boot from a second SATA disk containing an image of the USB).  It obviously wasn’t activated, and I though “VirtualBox Guest Additions will take care of it, right?”.  Well, no…

Googling around gave me the solution.  You can make your information from your firmware available to the machines running1.  Theoretically, you could use the following:

VBoxManage setextradata "DummyVM" "VBoxInternal/Devices/acpi/0/Config/CustomTable" "/sys/firmware/acpi/tables/SLIC"

(Where “DummyVM” is the name of your virtual machine)
It would be the most honest form, as you directly use the license information from the host machine.  It won’t work, though, because the rights of that table are readonly for root only.  No problem!  Everything is a file, so do simply copy the SLIC table and give yourself the rights:

sudo cp /sys/firmware/acpi/tables/SLIC ${HOME}/VirtualBox\ VMs/DummyVM/SLIC.bin ; sudo chown ${USER}:${USER} ${HOME}/VirtualBox\ VMs/DummyVM/SLIC.bin

At this point, you can tell VirtualBox to use the SLIC file:

VBoxManage setextradata "DummyVM" "VBoxInternal/Devices/acpi/0/Config/CustomTable" "${HOME}/VirtualBox VMs/DummyVM/SLIC.bin"

The path to the SLIC.bin file must be fully qualified.  Dispite my best efforts, I couldn’t get it to use relative paths.  Doesn’t matter as the vbox configuration file is littered with absolute paths.

Anyway, launch the Windows 7 virtual machine and it will be instantly activated.  It gets better though: cloning a COA (Certificate Of Authority) based Virtual Machine, will almost always trigger an activation, because normally cloning changes system-ids and MAC addresses.  Cloning this won’t, because Windows 7 thinks it runs on a machine that’s licensed based on the SLIC table.  Theoretically, but I didn’t try, it should not even complain when moving to a totally different host machine.

Starting from a clone, I investigated what would happen upon Windows 10 upgrade.  So, I launched the “Assistive Technologies Upgrade” and got Windows 10 Pro, fully activated running inside the VM.  I was still curious what would happen if I removed the SLIC file from that VM.  After all, under Windows 7, removing it would make it unactivated.  To remove the SLIC file from the VM execute:

VBoxManage setextradata "Dummy10VM" "VBoxInternal/Devices/acpi/0/Config/CustomTable" ""

The activation remained!

This is an upgrade, so perhaps I want a fresh install?  No problem.  Keep the Virtual Machine configuration as is, but delete the associated hard disk.  Create a new empty one, and hand the Win10 iso to the optical drive.  Boot, go through installer, skip license key.  Wait… a… long… time… and: Activated Windows 10 Pro.

Conclusion: neither SLIC, nor the hard disk are in the hash submitted to Microsoft.  Well, if they are, they do not count towards activation.  Oh, and the difference between a fully patched Win7 vs Win10 regarding disk usage?  Seventeen fucking Gigabytes!  Windows 7 patching eats storage for breakfast:

find /home/${USER}/VirtualBox\ VMs/ -name Win*.vdi -exec ls -sh {} \; | sed s/\\/.*\\///g
29G Win7Pro.vdi
12G Win10Pro.vdi

Reminds me, that I should write up on how to get a Windows 7 machine up to patch-level in minimal time.  It’s a nightmare frankly.


1 Source https://forums.virtualbox.org/viewtopic.php?f=2&t=43678&p=227455