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

GCESysprep - WinRM HTTPS Listener configuration on Windows 10 2004 silently fails #201

Open
aaronfury opened this issue Nov 4, 2020 · 1 comment
Assignees

Comments

@aaronfury
Copy link

Overview

On a "vanilla" Windows 10 Enterprise 2004 image, the instance_setup.ps1 script fails to configure the HTTPS listener for WinRM. The script does not produce an error, but when the GCESysprep has completed, the HTTPS listener has not been created.

Steps to reproduce

  1. Prepare a VMware VM running Windows 10 Enterprise 2004
  2. Apply all available Windows Updates
  3. Install the Google Cloud SDK
  4. Import the VM using the GCE Import Image tool
  5. Use the image to create a VM on a sole-tenant node.
  6. Connect to the GCE VM and run GCESysprep (no command-line switches)
  7. Power on the VM after GCESysprep completes (or create an image and a new VM).
  8. Observe the Serial port 1 output to confirm that no errors are reported and the "Setup of WinRM complete." message is logged
  9. Connect to the instance via RDP (or non-HTTPS remote PowerShell) and run the following PowerShell command from an elevated prompt: Get-ChildItem -Path WSMan:\localhost\Listener
  10. Note that the HTTPS listener is not present.

Proposed workaround

Running 'winrm quickconfig' prior to configuring the listener resolves the issue.
I inserted the following commands at line 134 of instance_setup.ps1 and confirmed that the HTTPS listener is successfully created:

winrm quickconfig -quiet -force

bkatyl added a commit to bkatyl/compute-image-tools that referenced this issue Dec 11, 2020
Configuring WinRM on Windows clients, this is to address GoogleCloudPlatform/compute-image-windows#201.
@bkatyl
Copy link
Contributor

bkatyl commented Dec 11, 2020

Thanks for reporting this issue. Since configuring winrm can take a few seconds, I think it's better to do this in the import process instead of in the first boot.

The PR to address this is GoogleCloudPlatform/compute-image-tools#1455

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

No branches or pull requests

2 participants