hashicorp / hashicorp/packer-plugin-googlecompute

Google Compute Engine cannot start from custom-image created by Packer version 1.6.4

Open
#8 0 comments 0 reactions 0 assignees View on GitHub
bug builder/google help wanted question
Dominant language
Go
Stars
33
Forks
72
Avg merge
6h 47m
Merged PRs (30d)
3

Description

_This issue was originally opened by @j-flat as hashicorp/packer#10100. It was migrated here as a result of the [Packer plugin split](https://github.com/hashicorp/packer/issues/8610#issuecomment-770034737). The original body of the issue is below._


We have an issue on our Google project, where we are attempting to use Packer baked custom-image to spin up Google Compute Engine instances and the instance doesn't go beyond very first seconds of UEFI boot.

Nothing on Packer logs (with PACKER_LOG set to 1) states that something has gone wrong with the provisioning or other parts of Packer process, but on Google end there are also no issues.

If new instance is created from this custom-image, UEFI boot doesn't go beyond this point, if monitored on Serial Port 1 logs:
```
UEFI: Attempting to start image.
Description: UEFI Google PersistentDisk
FilePath: PciRoot(0x0)/Pci(0x3,0x0)/Scsi(0x1,0x0)
OptionNumber: 1.
[1m[37m[40m[01;01H[2J[01;01H2020/10/09 10:41:37 GCEGuestAgent: GCE Agent Started (version 20200813.01)
2020-10-09T10:44:00.5273Z OSConfigAgent Info: OSConfig Agent (version 20200901.01) started.
```

We are using public image from Windows 2019 Server family and this has been tested with both Packer v1.6.2 and Packer v1.6.4 for Windows 64bit Packer.

What Packer is doing on provisioning state is:
- installs & pre-configures IIS on the instance
- downloads Stackdriver Logging and Monitoring Agents
- installs MS Web Deploy 3.6. in order to later deploy .NET Web Application on the instances created from this custom image
- generalizes the image running gcesysprep at the end of the Packer process

We are attempting to generate these custom-images with both Packer v1.6.2 & newer Packer v1.6.4

What I can see is that Packer creates the temporary instance successfully and Google Compute Engine instance details page states that the source-disk should not be deleted when this temporary instance is deleted. However at the end of the Packer process when Packer deletes the temporary instance, also the source disk associated with the custom image gets deleted.

I add here Azure DevOps pipeline yaml configuration, packer.json as well as Azure DevOps logs from packer process to help to further describe how the process is now setup.

[Packer Support.zip](https://github.com/hashicorp/packer/files/5378459/Packer.Support.zip)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.