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
2 answers

Authentication Error on Building with Packer

Packer build fails with: amazon-ebs: error validating regions: AuthFailure: AWS was not able to validate the provided access credentials I severally encountered the above error while trying build an AMI on AWS. My template contains the necessary…
Samuel
  • 31
  • 6
2
votes
2 answers

Packer won't create image on GCloud

I've been using the tools from HashiCorp (Packer and Terraform) to create images and then build VMs by using Jenkins on AWS. Now I have a project that is on GCloud and I have successfully configured Terraform to create a VM but when I try to run…
Dimitar Dimov
  • 91
  • 2
  • 7
2
votes
0 answers

How to create custom filesystem partitions (/var, /home/, /var/log etc) on a AWS EBS disk during boot process using hashicorp packer

To elaborate, I would like to partition the root disk and create separate partitions for /var, /var/log, /home etc. as part of the AMI build process and create a custom image. I do not want all the filesystems to be part of /. I would like to know…
sam_V
  • 49
  • 3
2
votes
0 answers

Packer - Unresponsive after Windows VM reboots via Powershell script provisioner

Issue: I cannot get Packer to work when running a powershell script that ends up rebooting the Windows VM after software install. Upon script completion (scripts/watchMaker_stigVM.ps1), the machine will reboot, and Packer moves on to the next…
Gvazzana
  • 583
  • 1
  • 8
  • 21
2
votes
1 answer

Assigning a Custom Role to an Packer Application on Azure

We currently have a Packer enterprise application that is running with the Contributor Role at the subscription level. However, we feel that the application has too much scope. Instead we would like to give it Contributor level access for just one…
x3nr0s
  • 1,946
  • 4
  • 26
  • 46
2
votes
2 answers

How to track the progress of unattended-upgrades or cloud-init?

I am looking to use Packer (builds images) and Ansible (provisioner) to provision an Ubuntu AMI. "name": "ubuntu/images/*ubuntu-xenial-16.04-amd64-server-*", I am having difficulties because some of the tasks try to install packages using apt, but…
Slackware
  • 960
  • 1
  • 13
  • 29
2
votes
1 answer

how to build aws ami with packer conditionally?

I am working on building a new ami with packer ONLY if a result (shell command) matches a value in the "provisioner" section I am looking for a solution to have a conditional statement in "provisioner" section "provisioners": [ { "type":…
Maurice Amar
  • 129
  • 1
  • 9
2
votes
2 answers

azure-arm Windows VM provisioning with Ansible

Is it possible to use Packer on a Mac to create a Windows VM on azure-arm with Ansible as provisioner? I am looking for a working example. Packer documentation mentions that winrm communicator needs a connection_plugin for Packer, but it has not…
bbaassssiiee
  • 6,013
  • 2
  • 42
  • 55
2
votes
1 answer

Packer google cloud authentication within vpc

We are using Packer to build images in a GCP compute instance. Packer tries to grab the image based on project and image as follows: https://www.googleapis.com/compute/v1/projects//global/images/?alt=json Then it throws an…
2
votes
1 answer

How to set variables for bash script using packer?

I want to achive following: Create Linux VPN server image with Packer Pull config files from S3 bucket and configure StrongSwan, BGPD, keepalive etc The troubles starts with pulling files from S3 bucket, where i need to set variable in order for…
Dejan Bodiroga
  • 143
  • 2
  • 12
2
votes
0 answers

Do AWS Centos 6.9 and 6.10 AMIs support NVMe and ENA driver?

Do Centos 6.9 and 6.10 support NVMe ? We want to create AMI of Centos 6.10 with ENA and NVMe drivers. Can it be done using packer?
Madhurima Mishra
  • 1,063
  • 3
  • 14
  • 27
2
votes
1 answer

Is it possible to use output from a script run on the packer provisioners to create tags for the generated AMI?

I am using packer to generate AMIs that are preconfigured with some programs - both installed from apt and compiled from source. I would like to be able to tag the generated AMI with the versions of the installed programs but I can't figure out how…
guribe94
  • 1,551
  • 3
  • 15
  • 29
2
votes
2 answers

Ansible variable from packer script

I have one variable in ansible script like - host:{{host}} I want to send {{host}} variable value from packer script. I want to send {{host}} value using packer build or using packer variable. Is there anyway do it?
2
votes
1 answer

why does packer build is showing no such file or directory while trying to build image?

I have following packer script for building image: { "variables": { "aws_access_key": "", "aws_secret_key": "", "aws_region": "us-east-2", "version": "", …
2
votes
1 answer

How do you change Windows locale, language and home location using packer?

I'm creating Windows server 2016 images in Azure using Packer. The only thing i'm unable to change is the locale, language and home location in the image. I'm in the UK and everything defaults to US. I've tried the following Powershell (which works)…
darren25
  • 275
  • 1
  • 5
  • 16