GoogleCloudPlatform / compute-image-windows

Windows agents and scripts for Google Compute Engine images.
Apache License 2.0
105 stars 64 forks source link

BYOL Sysprep #234

Open smkfuk opened 1 year ago

smkfuk commented 1 year ago

sysprep/activate_instance.ps1 will skip activation if the following folder exists:

if (Test-Path "$env:ProgramFiles\Google\Compute Engine\sysprep\byol_image") { Write-Output 'Image imported into GCE via BYOL workflow, skipping GCE activation' exit }

However what process creates this path? We have tried various byol.wf.json and it always appears to try and activate with kms.windows.googlecloud.com

bkatyl commented 1 year ago

The creation is current in our import processes, but not the byol build workflows.

An open issue that should get some attention in the next few weeks is replacing this logic with instead looking at the License's listed in metadata for the instance, so it positively looks for a pay-as-you-go license from windows-cloud project.

They're listed at https://cloud.google.com/compute/docs/images/os-details#windows_server in the License tab.