Questions tagged [packer]

PACKER QUESTIONS MUST BE PROGRAMMING RELATED. Packer is a tool for creating identical machine images for multiple platforms from a single source configuration.

"Packer is a modern tool that embraces best benefits. It's completely automated, simply run a packer build, no human touches it, Packer builds it for you. " - Mitchell Hashimoto (Creator)

Packer is an open source tool for creating identical machine images for multiple platforms from a single source configuration. Packer is lightweight, runs on every major operating system, and is highly performant, creating machine images for multiple platforms in parallel. Packer does not replace configuration management like Chef or Puppet. In fact, when building images, Packer is able to use tools like Chef or Puppet to install software onto the image.

A machine image is a single static unit that contains a pre-configured operating system and installed software which is used to quickly create new running machines. Machine image formats change for each platform. Some examples include AMIs for EC2, VMDK/VMX files for VMware, OVF exports for VirtualBox, etc.

Resources

852 questions
2
votes
1 answer

Editing JSON with PowerShell for Packer

I would need some help or advise please. I am trying to build a PowerShell script to update a template packer file with some JSON values, but I am failing horribly. Hopefully someone can advise? The middle portion is the template JSON into which I…
krapulax
  • 115
  • 2
  • 10
2
votes
1 answer

Udacity Introduction to DevOps: Command 'packer build -only=virtualbox-iso application-server.json' not working

I'm taking the Udacity course to learn more in the field of DevOps (https://github.com/udacity/devops-intro-project), but if I use the following line in the Windows command prompt: packer build -only=virtualbox-iso application-server.json I get the…
Kelvin
  • 71
  • 1
  • 6
2
votes
0 answers

Disable WinRM after Packer Build

The question has probably been asked before, but I couldn't find a reference. I am using packer to build custom Windows AWS AMI. After the packer build, I provisioned an EC2 instance using the AMI and noticed WinRM service is running and the…
Amitabh Ghosh
  • 212
  • 2
  • 15
2
votes
1 answer

standalone javascript minifier (such as single-package zero-dependency version of packer)

I'm trying to find a single-packaged javascript minifier written in javascript for use outside of the browser. I've normally gone with Dean Edward's /packer/, however, after further inspection of the source code, there are way too many dependencies…
jerluc
  • 4,186
  • 2
  • 25
  • 44
2
votes
1 answer

Packer with vsphere waiting for IP timeout

I am attempting to create VMWare templates using Packer. I have a simple file that is essentially a copy of https://github.com/guillermo-musumeci/packer-vsphere-iso-windows/tree/master/win2019.base. When I build this it times out at "Waiting for…
Matt
  • 41
  • 2
  • 6
2
votes
1 answer

How do I use one provisioner for multiple Packer builds in an HCL-formatted template?

I'm using Packer to provision a VM for my project's CI pipeline, which is hosted on a supported cloud provider. My provisioning scripts are a little complicated, so I need to iterate on them carefully to get them right. To save money I'm using a…
JesseTG
  • 2,025
  • 1
  • 24
  • 48
2
votes
1 answer

Packer doesn't see my environment variables?

I have AWS_ACCESS_KEY and AWS_SECRET_KEY key/value pairs defined in my environment (I see them via env command on same terminal I run Packer), and I want Packer to use them in a build script. My Packer file looks like { "variables" : { …
Chris F
  • 14,337
  • 30
  • 94
  • 192
2
votes
0 answers

Building qcow2 Images using packer in AWS

As part of our CI/CD process, we are building qcow2 images to start KVM based VMs on bare metal machines. We are building them using packer which, in the process, starts a KVM based VM. Now we are thinking about moving the CI/CD Process (not the…
Nathan
  • 7,099
  • 14
  • 61
  • 125
2
votes
0 answers

Packer build is timing out on auto password generation

Currently trying to build a packer definition and am being met with timeouts once the build gets to the automatic password generation portion. I've included a snippet of my definition below: "type": "amazon-ebs", "ami_name": "{{user…
2
votes
1 answer

Can Packer build an AMI locally (that is, without connecting to AWS)?

Assume I have some special use-case. Please no answers like "why do you want to do this?" Simply put, is this supported behavior, and if so, could you point me to the relevant documentation?
Ram
  • 290
  • 1
  • 5
  • 14
2
votes
1 answer

Using docker volumes in packer build

Is it possible to use existing docker or external volumes in/during packer build? I saw in https://www.packer.io/docs/builders/docker/: "VOLUME /test1 /test2" What does it exactly mean? "VOLUME String EX: "VOLUME FROM TO"" doesn't explain much.…
xpt
  • 20,363
  • 37
  • 127
  • 216
2
votes
1 answer

making Image for GCP

I use packer build command to make imge for GCP when I ran this command I face this error == googlecompute: Error creating instance: 1 error(s) occurred: == googlecompute: == googlecompute: * The user does not have access to service account…
farzin
  • 21
  • 1
2
votes
1 answer

Packer build hangs on last command

My packer build seems to run all commands successfully, but keeps hanging on the last cmd. This is the end of my packer output on debug mode. I am unsure how to get past this. It seems to get stuck on removing the temporary script. ==> amazon-ebs:…
Lukeriggz
  • 167
  • 4
  • 17
2
votes
1 answer

How do I create custom Azure images smaller than 30GB with Packer + Terraform?

I want to create custom images that are 4GB for cost-saving purposes on a side project. I've been able set the size for the Azure-provided Ubuntu 18.04 base image in Terraform successfully using the following: resource "azurerm_managed_disk"…
2
votes
0 answers

Packer vs VM on Azure: Timeout waiting for WinRM

I'm using Packer to build VM images on Azure for a while, but today it stopped working without any changes from my side (Packer version is still 1.5.1 and template wasn't changed) I'm getting Timeout waiting for WinRM error I've checked: 1. Packer…
kagarlickij
  • 7,327
  • 10
  • 36
  • 71