Windows 7 Licensing and Immutable Disks

Discussions about using Windows guests in VirtualBox.

Windows 7 Licensing and Immutable Disks

Postby librarymark » 6. Aug 2011, 15:31

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.
librarymark
 
Posts: 18
Joined: 28. Apr 2010, 15:16
Primary OS: Ubuntu other
VBox Version: OSE other
Guest OSses: Ubuntu, WIndows XP, freebsd

Re: Windows 7 Licensing and Immutable Disks

Postby scp » 8. Aug 2011, 01:53

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   Expand viewCollapse view
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   Expand viewCollapse view
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   Expand viewCollapse view
%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
Attachments
ACPI_SLIC-4.1.0.zip
(6.01 KiB) Downloaded 520 times
Last edited by scp on 20. Dec 2011, 01:36, edited 1 time in total.
scp
 
Posts: 106
Joined: 14. Feb 2010, 22:12
Primary OS: Ubuntu 12.04
VBox Version: OSE self-compiled
Guest OSses: Windows XP, 2003, 7, 8.1

Re: Windows 7 Licensing and Immutable Disks

Postby Technologov » 19. Dec 2011, 06:04

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
Technologov
Site Moderator
 
Posts: 2754
Joined: 10. May 2007, 16:59
Location: Israel

Re: Windows 7 Licensing and Immutable Disks

Postby scp » 20. Dec 2011, 01:39

I am sure to use BSD-2clause :-)
Thanks for the hint, just forgot to add.
scp
 
Posts: 106
Joined: 14. Feb 2010, 22:12
Primary OS: Ubuntu 12.04
VBox Version: OSE self-compiled
Guest OSses: Windows XP, 2003, 7, 8.1

Re: Windows 7 Licensing and Immutable Disks

Postby Technologov » 20. Dec 2011, 09:24

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.
Technologov
Site Moderator
 
Posts: 2754
Joined: 10. May 2007, 16:59
Location: Israel

Re: Windows 7 Licensing and Immutable Disks

Postby zigg » 20. Dec 2011, 15:18

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.
zigg
 
Posts: 13
Joined: 13. May 2010, 03:29
Primary OS: Ubuntu other
VBox Version: OSE Debian
Guest OSses: Windows XP, Windows 7

Re: Windows 7 Licensing and Immutable Disks

Postby zigg » 20. Dec 2011, 18:41

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.
zigg
 
Posts: 13
Joined: 13. May 2010, 03:29
Primary OS: Ubuntu other
VBox Version: OSE Debian
Guest OSses: Windows XP, Windows 7

Re: Windows 7 Licensing and Immutable Disks

Postby scp » 21. Dec 2011, 05:10

So here is the new "all-in-one" patch for the current VBox release.
Attachments
ACPI_OEM_SLIC-4.1.8.zip
(4.55 KiB) Downloaded 372 times
scp
 
Posts: 106
Joined: 14. Feb 2010, 22:12
Primary OS: Ubuntu 12.04
VBox Version: OSE self-compiled
Guest OSses: Windows XP, 2003, 7, 8.1

Re: Windows 7 Licensing and Immutable Disks

Postby Technologov » 21. Dec 2011, 12:22

They need not for 4.1.8 but for 4.2.0-alpha (trunk SVN).
Technologov
Site Moderator
 
Posts: 2754
Joined: 10. May 2007, 16:59
Location: Israel

Re: Windows 7 Licensing and Immutable Disks

Postby zigg » 21. Dec 2011, 15:45

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.
zigg
 
Posts: 13
Joined: 13. May 2010, 03:29
Primary OS: Ubuntu other
VBox Version: OSE Debian
Guest OSses: Windows XP, Windows 7

Re: Windows 7 Licensing and Immutable Disks

Postby zigg » 23. Dec 2011, 01:00

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.
Attachments
slic-trunk.zip
(5.97 KiB) Downloaded 204 times
zigg
 
Posts: 13
Joined: 13. May 2010, 03:29
Primary OS: Ubuntu other
VBox Version: OSE Debian
Guest OSses: Windows XP, Windows 7

Re: Windows 7 Licensing and Immutable Disks

Postby scp » 27. Dec 2011, 01:08

Thanks for the help, I submitted it now.
scp
 
Posts: 106
Joined: 14. Feb 2010, 22:12
Primary OS: Ubuntu 12.04
VBox Version: OSE self-compiled
Guest OSses: Windows XP, 2003, 7, 8.1

Re: Windows 7 Licensing and Immutable Disks

Postby Frank Mehnert » 6. Feb 2012, 16:07

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?
Frank Mehnert
Oracle Corporation
 
Posts: 2523
Joined: 7. Jun 2007, 09:11
Location: Dresden, Germany
Primary OS: Debian Lenny
VBox Version: PUEL
Guest OSses: Linux, Windows

Re: Windows 7 Licensing and Immutable Disks

Postby scp » 7. Feb 2012, 02:05

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/git/stable/linux-stable.git;a=blob;f=include/acpi/actbl2.h;hb=refs/heads/linux-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.
Attachments
acpicust-trunk.zip
(5.33 KiB) Downloaded 142 times
scp
 
Posts: 106
Joined: 14. Feb 2010, 22:12
Primary OS: Ubuntu 12.04
VBox Version: OSE self-compiled
Guest OSses: Windows XP, 2003, 7, 8.1

Re: Windows 7 Licensing and Immutable Disks

Postby Frank Mehnert » 7. Feb 2012, 16:55

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.
Frank Mehnert
Oracle Corporation
 
Posts: 2523
Joined: 7. Jun 2007, 09:11
Location: Dresden, Germany
Primary OS: Debian Lenny
VBox Version: PUEL
Guest OSses: Linux, Windows

Next

Return to Windows Guests

Who is online

Users browsing this forum: mpack, Yahoo [Bot] and 12 guests