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

eval license runs out from the date the image is released #158

Closed
abbbi opened this issue Aug 3, 2020 · 9 comments
Closed

eval license runs out from the date the image is released #158

abbbi opened this issue Aug 3, 2020 · 9 comments
Assignees
Labels

Comments

@abbbi
Copy link
Contributor

abbbi commented Aug 3, 2020

hi,

it seems this issue is back since some time, i noticed a few months ago but just came around it again. If a freshly added libvirt box is spinned up, the license eval has already started to run out, showing the days since you have released the image to be gone .. It works out as you are releasing a new version within that timeframe, but once you stop, the boxes will become unusable after 180 days :)

I just tried with the last released 2019 box ('peru/windows-server-2019-standard-x64-eval' (v20200801.01) for libvirt
For those boxes the evaluation license already down to 177 days, if freshly spinned up.

I havent checked with the latest release you did today, (v20200803.01) but seems likey those will show the same situation after a few days have passed by.

I guess somethings going wrong during sysprep ..
Originally posted by @abbbi in #3 (comment)

@ruzickap
Copy link
Owner

ruzickap commented Aug 4, 2020

Hello.

You are probably right.
These images should be used for testing proposes or some "short-term actions". I do not expect anybody to use the same image for more than 2 or 3 months.

That's why I'm releasing the new images every month. Every new image should be fully up to date with latest software / security patches / updates / ...
Using anything "older" doesn't make sense. (Older images are removed from Vagrant Cloud anyway).

I'm not sure how it is with sysprep + licenses but the reasons why you should not bother about it are written above.

If I stop releasing the news boxes than users needs to do their own builds, because Windows images will stop working due to the licencing problems you described.

Anyway - if you have any kind of "legal licensing improvement", which I can implement, I'm happy to do it if you create the PR.

Thank you

@abbbi
Copy link
Contributor Author

abbbi commented Aug 4, 2020

hi,

i think the SkipRearm statement in the unattend.xml causes the situation:

https://github.com/ruzickap/packer-templates/blob/master/scripts/win-common/unattend.xml#L5

according to the documentation, that skips the license rearm during sysprep:

https://docs.microsoft.com/de-de/windows-hardware/customize/desktop/unattend/microsoft-windows-security-spp-skiprearm

the Rearm was deactivated while ago in commit e0af460 and the main issue here is:

hashicorp/packer#4134

Maybe that issue in packer is now gone and you can re-activate the Rearm during sysprep? Havent checked in detail.
Whats also important here is probably how during sysprep the devices are persistent:

hashicorp/packer#4134 (comment)

so in case you re-activate, not only enable rearm/revert e0af460 but be sure to set
those settings:

    <PersistAllDeviceInstalls>true</PersistAllDeviceInstalls>
    <DoNotCleanUpNonPresentDevices>true</DoNotCleanUpNonPresentDevices>

@ruzickap
Copy link
Owner

ruzickap commented Aug 4, 2020

Thanks for pointing it out.

I'll try to remove the <SkipRearm>1</SkipRearm> form

<SkipRearm>1</SkipRearm>
and run some tests to see how it will behave...

@abbbi
Copy link
Contributor Author

abbbi commented Aug 4, 2020

Thanks for pointing it out.

I'll try to remove the <SkipRearm>1</SkipRearm> form

<SkipRearm>1</SkipRearm>

and run some tests to see how it will behave...

Whats also important here is probably how during sysprep the devices are persistent:

hashicorp/packer#4134 (comment)

so in case you re-activate, not only enable rearm/revert e0af460 but be sure to set
those settings:

<PersistAllDeviceInstalls>true</PersistAllDeviceInstalls>
<DoNotCleanUpNonPresentDevices>true</DoNotCleanUpNonPresentDevices>

@ruzickap ruzickap self-assigned this Aug 12, 2020
@ruzickap ruzickap added the bug label Aug 12, 2020
@ruzickap
Copy link
Owner

I manually installed the following Windows instances and run slmgr.vbs /dli to see the activation details:

Type Days
windows-10-enterprise-x64-eval 90 days
windows-server-2012_r2-standard-x64-eval 180 days
windows-server-2016-standard-x64-eval 180 days
windows-server-2019-standard-x64-eval 180 days

I'll try to configure the build process to create the images with similar values after sysprep.

@ruzickap
Copy link
Owner

I'm not sure exactly where is the problem. I tried to build Windows images with / without SkipRearm / PersistAllDeviceInstalls / DoNotCleanUpNonPresentDevices, but the results are not like in the table above.

For now I would like to remove SkipRearm #165, because it doesn't make sense to have it there.

Any advice welcome, because I'm running out of ideas.

@abbbi
Copy link
Contributor Author

abbbi commented Aug 22, 2020

Do you have sysprep loggings which you could share? They should a least log someting that is related to the rearm actions taken during sysprep.

@ruzickap
Copy link
Owner

I was able to build the images with these "activation details":

Type Days
windows-10-enterprise-x64-eval 90 days
windows-server-2012_r2-standard-x64-eval 180 days
windows-server-2016-standard-x64-eval 180 days
windows-server-2019-standard-x64-eval 10 days

It's similar to the table I created by installing Windows from the iso files - except Windows Server 2019.

It's not possible to do sysprep of the Win2019 server and keep the 180 days trial:

https://social.technet.microsoft.com/Forums/en-US/f21b1bd9-ebe1-456b-a875-d844e03b1587/windows-server-2019-180-days-trail-issues

I'll rebuild all the images tomorrow and put them to the Vagrant Cloud.
After few days it should be visible how they behave...

@ruzickap
Copy link
Owner

I rebuilt the images and put them to Vagrant Cloud about 10 days ago.
I started the boxes several times and cscript C:\Windows\System32\slmgr.vbs /dli was giving me these values every time I ran them:

Type Days
windows-10-enterprise-x64-eval 90 days
windows-server-2012_r2-standard-x64-eval 180 days
windows-server-2016-standard-x64-eval 180 days
windows-server-2019-standard-x64-eval 10 days

The changes described above helped...

Thank you for letting me know about it - I'm going to close this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants