MSSQL Image with Packer

128 views
Skip to the first unread message

Kris

unread,
3 Apr 2018, 1:42:30 pm3/4/18
to Packer
I am attempting to build a custom image for SQL server, using the sql-std-2016-win-2016 family in the projects/windows-sql-cloud .  I get the error messages below, is this because packer does not know about the projects/windows-sql-cloud?

* googleapi: Error 404: The resource 'projects/centos-cloud/global/images/family/sql-std-2016-win-2016' was not found, notFound
* googleapi: Error 404: The resource 'projects/coreos-cloud/global/images/family/sql-std-2016-win-2016' was not found, notFound
* googleapi: Error 404: The resource 'projects/cos-cloud/global/images/family/sql-std-2016-win-2016' was not found, notFound
* googleapi: Error 404: The resource 'projects/debian-cloud/global/images/family/sql-std-2016-win-2016' was not found, notFound
* googleapi: Error 404: The resource 'projects/google-containers/global/images/family/sql-std-2016-win-2016' was not found, notFound
* googleapi: Error 404: The resource 'projects/opensuse-cloud/global/images/family/sql-std-2016-win-2016' was not found, notFound
* googleapi: Error 404: The resource 'projects/rhel-cloud/global/images/family/sql-std-2016-win-2016' was not found, notFound
* googleapi: Error 404: The resource 'projects/suse-cloud/global/images/family/sql-std-2016-win-2016' was not found, notFound
* googleapi: Error 404: The resource 'projects/ubuntu-os-cloud/global/images/family/sql-std-2016-win-2016' was not found, notFound
* googleapi: Error 404: The resource 'projects/windows-cloud/global/images/family/sql-std-2016-win-2016' was not found, notFound
* googleapi: Error 404: The resource 'projects/gce-nvme/global/images/family/sql-std-2016-win-2016' was not found, notFound

Alvaro Miranda Aguilera

unread,
4 Apr 2018, 4:16:17 am4/4/18
to packe...@googlegroups.com
Hello

whats your packer version and can you share your template ?

Seems  sql-std-2016-win-2016 is correct in the list of public VMs.

Alvaro

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/packer/issues
IRC: #packer-tool on Freenode
---
You received this message because you are subscribed to the Google Groups "Packer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to packer-tool+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/packer-tool/2367edde-f0d2-4d04-9002-b0c858b85cee%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Alvaro

Kris

unread,
4 Apr 2018, 8:16:47 am4/4/18
to Packer
I was on version 1.2.1, but upgraded to 1.2.2 this morning and have the same issue.

I did find the root cause though.  In the driver_gce.go there is a function that lists the projects to search, windows-sql-cloud is not one of the projects.



func (d *driverGCE) GetImage(name string, fromFamily bool) (*Image, error) {
projects := []string{d.projectId, "centos-cloud", "coreos-cloud", "cos-cloud", "debian-cloud", "google-containers", "opensuse-cloud", "rhel-cloud", "suse-cloud", "ubuntu-os-cloud", "windows-cloud", "gce-nvme"}
var errs error
for _, project := range projects {
image, err := d.GetImageFromProject(project, name, fromFamily)
if err != nil {
errs = packer.MultiErrorAppend(errs, err)
}
if image != nil {
return image, nil
}
}

Alvaro Miranda Aguilera

unread,
4 Apr 2018, 11:07:19 am4/4/18
to packe...@googlegroups.com
Hi there,

What about you open an issue and send a PR. ?

Alvaro.


--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/packer/issues
IRC: #packer-tool on Freenode
---
You received this message because you are subscribed to the Google Groups "Packer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to packer-tool+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Alvaro

Reply all
Reply to author
Forward
0 new messages