You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Have some windows server 2016 images pre-built from Packer/Chef, based on the stock GCE base images. We are then deploying new GCE instances from the custom images. The problem we are seeing is that instance_setup.ps1 doesn't appear to run for the new instances, thus the hostname doesn't get properly set, it gets left as the name of the instance during creation.
Is there a pattern to solve this effectively short of copying the hostname resetting code to a custom startup script?
The text was updated successfully, but these errors were encountered:
This is most likely due to Packer's process in which the first boot already happened. In the normal case, instance setup will happen on first boot with sysprep. You can run gcesysprep at the end of your process to reset the state (https://github.com/GoogleCloudPlatform/compute-image-windows/blob/master/sysprep/gcesysprep.bat) so that the resulting image will then run initial setup correctly.
Have some windows server 2016 images pre-built from Packer/Chef, based on the stock GCE base images. We are then deploying new GCE instances from the custom images. The problem we are seeing is that instance_setup.ps1 doesn't appear to run for the new instances, thus the hostname doesn't get properly set, it gets left as the name of the instance during creation.
Is there a pattern to solve this effectively short of copying the hostname resetting code to a custom startup script?
The text was updated successfully, but these errors were encountered: