rgl / windows-vagrant

Windows 11/2022 Base Vagrant Box (https://app.vagrantup.com/rgl)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

provisioner type not found: windows-update

robertmilowski opened this issue · comments

Hi,

When I run packer I have error as below

packer build -only=windows-2016-amd64-virtualbox windows-2016.json
Failed to initialize build 'windows-2016-amd64-virtualbox': provisioner type not found: windows-update
windows-2016-amd64-virtualbox output will be in this color.

System Windows 10 Enterprise, 1607
Packages installed using choco. I even check with packer 1.2.2, still it doesn't work

I solved this by putting the bin in the cloned repo directory.

Since I was on a mac, I had to massage the provider a little but I got it to work (Working up a couple PRs for that, since the massaging happened across a few repos) just fine once I recompiled the go binary.

Have a look at the last paragraphs of https://github.com/rgl/packer-provisioner-windows-update/blob/master/README.md. That is, set the packer log environment variable, and run packer again. The log should give more insight of why it's not finding the plugin.

Ah, I assumed that he was referring to the provider's readme which had this statement:

Download the binary from the releases page and put it in the same directory as your packer executable.

Which didn't work for me. But placing the bin file in the directory I was running packer from fixed the problem.

Hi, when I run packer build command with windows-update provisioner, it gives me the following error of - Failed to initialize build 'sql-server-image': error initializing provisioner 'windows-update': fork/exec /usr/local/bin/packer-provisioner-windows-update: permission denied.

I am running this on my mac. @rgl

I do not publish macos binaries (I no longer have a Mac). Only for windows and Linux.

Let me clarify my question: I have a packer.json file which will create an AMI for SQL Server on Windows server and I am going to run that packer file from my mac. So do I need to install the plugin on my mac? If yes, then I can't as the binaries are not available for mac. Also, do you have a script that updates windows? @rgl

The packer plugins run in the same machine as packer itself, so yes, you would need to install it in your mac, but you have to compile/test it yourself.

What do you mean by "a script that updates windows"?

So if I am not able to use the plugin, I need to write a script (ex: a PowerShell script) that updates windows, correct?

I advice you to just compile the packer-provisioner-windows-update plugin in your mac.

Just install the latest golang in your mac, remove GOOS=linux GOARCH=amd64 from the Makefile, and type make to build the binary (as described at the Development section).