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

New Windows 10 versions #128

Merged
merged 20 commits into from
Sep 5, 2019
Merged

New Windows 10 versions #128

merged 20 commits into from
Sep 5, 2019

Conversation

obilodeau
Copy link
Member

Current status: Our Windows 10 1607 Autounattend.xml doesn't pass on the 1903 iso. Something changed. Need to generate a new one.

@obilodeau
Copy link
Member Author

Spent several build cycles today trying to fix an issue with a WinRM timeout that turned out to be an Autounattend.xml regression. I think I've finally found a fix.

Sorry for the line noise but some of my previous changes mixed line
termination characters and this fixes that too.
@obilodeau
Copy link
Member Author

I realized during my workshop that with 1903, Defender was enabled. Need to investigate that and find a fix.

@obilodeau
Copy link
Member Author

Tamper Protection was what caused me trouble. You can read about it here: https://www.windowscentral.com/how-manage-windows-security-tamper-protection-windows-10-may-2019-update

I think I've found a way to bypass it reliably without requiring user intervention. Doing a full rebuild of all OSes with this patch now.

@obilodeau
Copy link
Member Author

Smoke tests passed but getting this in them:

    virtualbox-iso: + Set-ItemProperty -Path "HKLM:\Software\Microsoft\Windows Defender\Fea ...
    virtualbox-iso: + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    virtualbox-iso:     + CategoryInfo          : PermissionDenied: (TamperProtection:String) [Set-ItemProperty], UnauthorizedAccessExcept
    virtualbox-iso:    ion
    virtualbox-iso:     + FullyQualifiedErrorId : System.UnauthorizedAccessException,Microsoft.PowerShell.Commands.SetItemPropertyCommand
    virtualbox-iso:

Trying to run the scripts as system instead. Another round of tests required.

Turns out that the upstream feature was introduced in 1.3.3 released on December 5, 2018 and merged in hashicorp/packer#6972.
@obilodeau
Copy link
Member Author

Tests failed with the following:

* Must supply an 'elevated_password' if 'elevated_user' provided

Turns out the Packer version in the buildbot was older and didn't support using system accounts. See commit for details and here's the upstream issue: hashicorp/packer#6104

@obilodeau
Copy link
Member Author

With the latest changes 1607 runs fine but 1903 still complains but the build goes through. I'll see what the resulting image looks like but I might only add a note to manually disable defender for 1903 and later.

@obilodeau
Copy link
Member Author

Resulting image has Defender turned On. I'll need to introduce an exception starting with 1903 where we advice the user on how turning off Windows Defender TamperProtection and provide a batch script to run to disable it.

@obilodeau
Copy link
Member Author

Ready for another round of testing.

@obilodeau
Copy link
Member Author

obilodeau commented Sep 5, 2019

CI tests for the latest fixes failed but it seems unrelated:

==> virtualbox-iso: Error exporting virtual machine: VBoxManage error: 0%...
==> virtualbox-iso: Progress state: NS_ERROR_FAILURE
==> virtualbox-iso: VBoxManage: error: Appliance write failed
==> virtualbox-iso: VBoxManage: error: Could not open the medium '/var/jenkins_home/.cache/malboxes/builds/packer-virtualbox-iso-1567659328.vdi'.
==> virtualbox-iso: VBoxManage: error: VD: error VERR_FILE_NOT_FOUND opening image file '/var/jenkins_home/.cache/malboxes/builds/packer-virtualbox-iso-1567659328.vdi' (VERR_FILE_NOT_FOUND)
==> virtualbox-iso: VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component MediumWrap, interface IMedium
==> virtualbox-iso: VBoxManage: error: Context: "RTEXITCODE handleExportAppliance(HandlerArg*)" at line 1263 of file VBoxManageAppliance.cpp

On my machine the Windows 7 build failed with wireshark's dependencies troubles but I think they were transient and in any case a user can always remove it from the build and install it afterwards.

One last smoke test run and if all green, I'll merge.

@obilodeau obilodeau changed the title [WIP] New Windows 10 versions New Windows 10 versions Sep 5, 2019
@obilodeau
Copy link
Member Author

Build passed!

No longer required since we dropped the requirement on using SYSTEM elevated_user for powershell because that fix didn't work.
@obilodeau obilodeau merged commit 382a767 into master Sep 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant