Open magustin-telus opened 1 year ago
Currently, i am experiencing the same issue with packer 1.9.4
and image windows-server-2019-dc-v20231115
The latest Google Windows base images come with openSSH by default. Just need to enable at runtime.
https://cloud.google.com/compute/docs/connect/windows-ssh
Just include this in the Packer template file:
metadata = { “sysprep-specialize-script-cmd” = “googet -noconfirm=true update && googet -noconfirm=true install google-compute-engine-ssh" "enable-windows-ssh" = "TRUE" }
Set SSH communicators as normal
https://developer.hashicorp.com/packer/docs/communicators/ssh
Bear in mind it's still in preview though.
Overview of the Issue
sysprep commands from documentation to enable SSH not working.
Reproduction Steps
followed the documentation from https://developer.hashicorp.com/packer/plugins/builders/googlecompute#windows-over-winssh-ansible-provisioner
using GCP windows image windows-server-2019-dc-v20230510
Plugin and Packer version
packer version 1.9.1
Simplified Packer Buildfile
buildfile is the same as the documentation