Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add passing SLIC ACPI table to HVM guest to allow activate OEM Windows #5279

Closed
jevank opened this issue Aug 28, 2019 · 13 comments
Closed

Add passing SLIC ACPI table to HVM guest to allow activate OEM Windows #5279

jevank opened this issue Aug 28, 2019 · 13 comments
Labels
C: windows-vm P: default Priority: default. Default priority for new issues, to be replaced given sufficient information.
Milestone

Comments

@jevank
Copy link

jevank commented Aug 28, 2019

Allow use SLIC ACPI table to activate OEM installed Windows
In order to use Windows OEM install media, the SLIC table must be passed to a
guest. In addition all the OEM table IDs must match the SLIC or Windows will
think it is invalid and the install ends up unactivated.

Describe the solution you'd like
Libxl support passing additional ACPI tables to HVM guest (acpi_firmware param), but it need also updating OEM ID it tables. It could possible with OpenXT patch.

Second problem is libvirl libxl driver have no support to use acpi_firmware setting while have supporting SLIC table defining in domain common schema.

Where is the value to a user, and who might that user be?
Any user with OEM Windows 7 could activate it

Additional context
All PR are ready to use

@jevank jevank added P: default Priority: default. Default priority for new issues, to be replaced given sufficient information. T: enhancement labels Aug 28, 2019
@andrewdavidwong andrewdavidwong added this to the Far in the future milestone Aug 28, 2019
@jevank
Copy link
Author

jevank commented Aug 28, 2019

short HowTo:

  1. Copy base xen template to create custom one
    cp /usr/share/qubes/templates/libvirt/xen.xml /etc/qubes/templates/libvirt/xen/by-name/win7.xml
  2. In <os> section add
    <acpi>
    <table type='slic'>/sys/firmware/acpi/tables/SLIC</table>
    </acpi>

@andrewdavidwong andrewdavidwong modified the milestones: Far in the future, Release 4.1 Aug 28, 2019
@marmarek
Copy link
Member

Instead of copying the whole template, it should be enough to extend os block, like this:

{% extends "libvirt/xen.xml" %}
{% block os %}
{% super() %}
<acpi>
<table type='slic'>/sys/firmware/acpi/tables/SLIC</table>
</acpi>
{% endblock %}

As for the patches, have you considered sending them upstream (libvirt and xen respectively)?

@jevank
Copy link
Author

jevank commented Aug 29, 2019

ok, extending looks appropriate.

I think to offer libvirt patch to upstream, it is simple and useful. As for xen patch first I got in from OpenXT, second right now difficult to test upstream build for me. Perhaps patching to R4.1 packages will help with it.

@unman
Copy link
Member

unman commented Aug 29, 2019

@jevank I'm intrigued, because I have activated Win7 on various machines without this patch without any problem.
Which manufacturer and Windows version gave you trouble?

Even if you couldn't register automatically, were you not able to activate by phone? I've had to do that in the past even with machines straight from the manufacturer.

@marmarek
Copy link
Member

I don't think it's about inability to activate manually. It's rather about activating automatically with built-in OEM license (instead of of manually typing the key from the sticker).

@jevank
Copy link
Author

jevank commented Aug 29, 2019

@unman OEM SLP type of license

Computers that come pre-installed with Windows from large manufacturers usually come with two Product Keys.

OEM SLP: This is the key that came in Windows (from the factory). It works by connecting to a BIOS flag (the SLIC table) found only on computers from that Manufacturer. It also checks for the existence of proper matching licenses in the OS itself. Once it sees both, it self-activates every time the machine is rebooted.

COA SLP: This is the key seen on the sticker located on the side, bottom or in the battery compartment of your machine. This key is for use if the OEM SLP self-activation stops working for whatever reason.

You need to change the Product Key to the one on the COA sticker on the machine's case (or inside the battery compartment), using the Change Product Key link at the bottom of the System properties page.

You may need to activate by phone.

https://social.microsoft.com/Forums/en-US/6fb311e4-8498-4fdb-82ea-c29a3001dfca/windows-7-hp-oem-activation-from-clean-install

@jevank
Copy link
Author

jevank commented Aug 29, 2019

This type of activation could be offine completely

@marmarek
Copy link
Member

This type of activation could be offine completely

Oh, that's really cool!

@unman
Copy link
Member

unman commented Aug 29, 2019

I know about the licenses. I'm pointing out that in my experience, offline activation is pretty hit and miss even on OEM hardware, and that manual is always a fallback.

@jevank
Copy link
Author

jevank commented Aug 29, 2019

This method requires saving xrm-ms certificate from OEM recovery media/partition and using it after fresh installation. Often it is necessary with hard disk to SSD replacement on Laptop. Without this certificate OS will not be activated.

@jevank
Copy link
Author

jevank commented Nov 5, 2019

All patches are in stable repository now, so close the issue. Thanks.

@jevank jevank closed this as completed Nov 5, 2019
@brendanhoar
Copy link

brendanhoar commented Nov 6, 2019

Can this be enabled/disabled per VM in Qubes?

@jevank
Copy link
Author

jevank commented Nov 7, 2019

Can this be enabled/disabled per VM in Qubes?

yes, look at this way and simple way comments in thread. And here is doc about customizing libvirt VM config

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: windows-vm P: default Priority: default. Default priority for new issues, to be replaced given sufficient information.
Projects
None yet
Development

No branches or pull requests

5 participants