GoogleCloudPlatform / GoogleCloudPlatform/compute-image-windows
GCESysprep - makecert.exe utility not included in sysprep package
- Dominant language
- PowerShell
- Stars
- 112
- Forks
- 68
- PR merge metrics
- No merged PRs in 30d
Description
### Overview
When attempting to run GCESysprep on a Windows 7 VM, the "Import-PfxCertificate" cmdlet is not available, so the script attempts to use an alternative method to install the self-signed certificate for WinRM. This method calls the "makecert.exe" utility that should be located at "C:\Program Files\Google\Compute Engine\tools\makecert.exe".
However, this utility is not present at this location, so the certificate generation fails and the WinRM HTTPS listener is not created.
### Steps to Reproduce
1. Import a Windows 7 VM using the GCE Image Import tool.
2. Run GCESysprep on the VM.
3. Power on the VM after GCESysprep completes (or create an image and a new VM).
4. Observe the Serial port 1 output to confirm that no errors are reported and the "Setup of WinRM complete." message is logged
5. 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
6. Note that the HTTPS listener is not present.
7. Note that a self-signed certificate is not present in the Computer Certificate store.
### Proposed workaround
Include the 'makecert.exe' utility in the google-compute-engine-sysprep Googet package.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.