Page 1 of 4

Windows 7 Licensing and Immutable Disks

Posted: 6. Aug 2011, 15:31
by librarymark
Folks -

I have had some success with using immutable disks and running multiple WINXP vm's from one disk. We use them at our public library to run the online public access catalogs (OPAC's). We use thinclients to access each individual VM. It's nice to only have one disk to maintain - I wrote a bash script to wipe them all and copy the master disk to an immutable slave and updates are then totally automatic. However, in order to make it work, I had to turn off netbios otherwise each station complains about duplicate hostnames. That's no problem for the OPAC's because all they do is surf a single web page.

Now, I am thinking that it might be fun to try the same thing on our public computer stations. Keeping them updated is a nightmare. We currently use Windows 7 on each one, and it would be heaven to only have to maintain one disk image for all of them, too. My plan is to create about 50 VM's (to start) that pull from the same immutable image. The two issues as I see it would be hostnames and licensing.

The host name problem I can solve, although to do it I will have to reboot the machine after it discovers it does not have the correct hostname compared to its mac address. Some VBScript will handle that. Hostnames are important for the public PC's because the time metering software keys used hostnames to identify stations.

The other issues is how to handle windows 7's licensing. With XP it was not a problem, but I wonder what I will be facing with 7.

Has anyone tackled this before?

Thanks -

Library Mark

PS - some might say, "Just use XP instead of 7!". I would if it were up to me. The issue is I can't sell my idea to the management unless we use 7. That's where we are now with all the stations currently and there is no way they would let me go to XP.

Re: Windows 7 Licensing and Immutable Disks

Posted: 8. Aug 2011, 01:53
by scp
Have already looked at Multiple Activation Key (MAK) or Key Management Service (KMS)?
I have no experience with Windows 7 with this, but for Office 2007/2010 the MAK works most like a Volume Key.

http://www.microsoft.com/licensing/exis ... ry=Systems

Windows 7 has no real Volume Key Licensing anymore, because the all need activation.
The only exception are Volume Keys for OEM PCs (HP, Acer etc.), which require no activation. But this keys require a ACPI SLIC table, which contain the right data for your manufacturer.
In VirtualBox it is easy to implement in src\VBox\Devices\PC\DevACPI.cpp.
I wrote a patch for this to use OEM recovery CD/DVDs in VMs.

My patches contain no licensing data, so you need:
a) a 374 Byte copy of the SLIC table from the real device
b) a OEM.XRM-MS cert file from the manufacturer (can be found on the real machine)
c) the volume key from the manufacturer (can be found on the real machine)
d) enough genuine windows licensens for all VMs

DISCLAIMER: The procedure itself does not violate any law I think, because it modifies only VBox and not Windows. But using the resulting Windows may break the EULA in some countrys.

1. You have to self-compile by applying the attached patches

Code: Select all

patch -p0 < PcBios_Dmi_Board-4.0.0.patch
patch -p0 < ACPI_OemId-4.1.0.patch
patch -p0 < ACPI_SLIC-4.1.0.patch
2. After you installed your new VBox version and created the VM you need to set some parameters.
Example:

Code: Select all

VBoxManage setextradata "Win7 Test" "VBoxInternal/Devices/acpi/0/Config/SLICRom"            "%ProgramFiles%\VirtualBox\slic\FSC.bin"

VBoxManage setextradata "Win7 Test" "VBoxInternal/Devices/pcbios/0/Config/DmiBoardProduct"  "D2560-A2"
VBoxManage setextradata "Win7 Test" "VBoxInternal/Devices/pcbios/0/Config/DmiBoardVendor"   "FUJITSU SIEMENS"
VBoxManage setextradata "Win7 Test" "VBoxInternal/Devices/pcbios/0/Config/DmiSystemProduct" "ESPRIMO P"
VBoxManage setextradata "Win7 Test" "VBoxInternal/Devices/pcbios/0/Config/DmiSystemVendor"  "FUJITSU SIEMENS"
3. Inside the VM you have to install the cert and the key.

Code: Select all

%SystemRoot%\system32\slmgr.vbs -ilc %SystemRoot%\system32\OEM\OEM.XRM-MS
%SystemRoot%\system32\slmgr.vbs -ipk AAAAA-BBBBB-CCCCC-DDDDD-EEEEE
EDIT:
License: BSD 2-clause license

Re: Windows 7 Licensing and Immutable Disks

Posted: 19. Dec 2011, 06:04
by Technologov
Since it contains patch, maybe we should move this discussion to 'VirtualBox OSE' category ?

scp: please add a license to your patches.
If not sure, use the BSD-2clause one. BSD_licenses link

Re: Windows 7 Licensing and Immutable Disks

Posted: 20. Dec 2011, 01:39
by scp
I am sure to use BSD-2clause :-)
Thanks for the hint, just forgot to add.

Re: Windows 7 Licensing and Immutable Disks

Posted: 20. Dec 2011, 09:24
by Technologov
If you think this patch is good for the general audience, Please submit it to vbox-devel ML, otherwise it will get lost in the forum. (+patch VBox user manual)

(I have no personal demand for this feature, so I can't test it -- but having it accepted by upstream VBox may find it's users/testers)

As a side advantage of having your work official - I'm now working on - Unattended Guest OS Install - vbox-unattended (here), so I can generate proper keys on the fly, plus setup them in guest OS automatically. (Transparent to the user)

Not submitting this patch (or forgetting to patch docs) almost guarantees it will lost in few years.

Re: Windows 7 Licensing and Immutable Disks

Posted: 20. Dec 2011, 15:18
by zigg
I'll be happy to do the updates to the manual if needed. Just shoot me a PM or email me at matt@zigg.com.

Re: Windows 7 Licensing and Immutable Disks

Posted: 20. Dec 2011, 18:41
by zigg
I went looking at what it takes to submit doc changes and I found the contributor information here:

https://www.virtualbox.org/wiki/Contributor_information

This suggests that scp can either do a copyright assignment to Oracle or use the MIT license (similar to 2-BSD). Recent posts to vbox-dev suggest this is the way to go, and I'd suggest the latter.

I also went ahead and wrote the short documentation section on how to use it. While doing that I thought it would be good to rename SLICRom to SLICTable to more accurately reflect what it is for.

if you'd like, scp, I can go ahead and get the patches together and work with you offline to get them all in good shape and (if you like) take it through vbox-dev myself. Let me know.

Re: Windows 7 Licensing and Immutable Disks

Posted: 21. Dec 2011, 05:10
by scp
So here is the new "all-in-one" patch for the current VBox release.

Re: Windows 7 Licensing and Immutable Disks

Posted: 21. Dec 2011, 12:22
by Technologov
They need not for 4.1.8 but for 4.2.0-alpha (trunk SVN).

Re: Windows 7 Licensing and Immutable Disks

Posted: 21. Dec 2011, 15:45
by zigg
I had actually applied the old set of patches to trunk yesterday (at first I had trouble, but I was applying them in the wrong order) ;) and tested them.

I can repeat that experiment today with the new patches, though unless scp changed anything apart from the name of the parameter I expect there will not be an issue.

Re: Windows 7 Licensing and Immutable Disks

Posted: 23. Dec 2011, 01:00
by zigg
Sorry about the delay. Tested against trunk. Checked that the SLIC table shows up in Linux in the VM, too.

My piddly little doc patch is in the zip, with the MIT license on it. Feel free to submit it.

Re: Windows 7 Licensing and Immutable Disks

Posted: 27. Dec 2011, 01:08
by scp
Thanks for the help, I submitted it now.

Re: Windows 7 Licensing and Immutable Disks

Posted: 6. Feb 2012, 16:07
by frank
I had a look at the patch. So far it looks good but the missing bit is the documentation of the ACPI SLIC table. Where do you have the information about the structure of this table from?

Re: Windows 7 Licensing and Immutable Disks

Posted: 7. Feb 2012, 02:05
by scp
OK, login works again now, so I can post here what I also sent to the mailing list:

I did not know any documents, I just compared the tables from different hardware. But this linux header seems to point it out good:
http://git.kernel.org/?p=linux/kernel/g ... 3.2.y#l717
The first 128 data Bytes seem to be vendor-specific, each vendor has only one "public key".
The 22 Bytes in the middle are just a combination of OemId, OemTabId and "WINDOWS" followed by a space.
The second 128 data Bytes seem to be product group-specific, each product group has its own signature.
The other parts are fields for length, type and version information.

But all this is not required for the patch, because the full table will just be copied and not modified.
There are some fields like OemId and OemTabId which will be extracted from the SLIC table and inserted into other tables, but they are all from inside the standard header.

I attached a generic version of the patch, which just allows to add a custom ACPI table with any kind of type.
In this patch I also fixed the "Handle" value of the DMI OEM strings, because it was equal to the DMI Board Info I added.
In addition there could be a switch like "UseCustomTableOemData" to control if the other ACPI tables should be touched or not.

Re: Windows 7 Licensing and Immutable Disks

Posted: 7. Feb 2012, 16:55
by frank
I have revised and applied that patch. I can use a custom ACPI table but I did not test if Windows is happy about that.