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

Can I create an AMI with packer on macOS?

I am trying to build a Windows AMI (Custom AWS Image) with Packer. Is there a way to use WinRM on macOS, or do I have to build the image on a windows machine? We are using a mix of Ubuntu and Windows servers and the majority are Ubuntu servers. I…
Martin Andersen
  • 2,460
  • 2
  • 38
  • 66
2
votes
1 answer

Parallel builds using identical json file

I have a base AMI which contains java and tomcat (ami-c1f3e7a6). My application stack consists of 6 separate java apps based on my base AMI, and I am using packer to create the 6 separate AMIs. The ansible playbook app_playbook.ymldownloads the war…
smilin_stan
  • 1,693
  • 2
  • 28
  • 40
2
votes
2 answers

Can packer with vmware-vmx connect to esxi?

Is it possible for the vmware-vmx provisioner of packer to connecto to an esxi server? The documentation (https://www.packer.io/docs/builders/vmware-vmx.html) does seem toe lack the variables remote_* which are available in…
Georg Heiler
  • 16,916
  • 36
  • 162
  • 292
2
votes
1 answer

Packer kms_key_id for ebs volumes

I'm trying to use packer to build an AMI with encrypted EBS volumes (but not an encrypted root volume). The packer documentation says: kms_key_id (string) - The ID of the KMS key to use for boot volume encryption. …
D Swartz
  • 155
  • 1
  • 11
2
votes
2 answers

packer build cannot ssh to aws instance

The following configuration will spin up an instance but fails to connect it... but the same key, vpc-id, subnet id, and security group id works in test kitchen without issues. { "variables": { "aws_access_key": "xxxxxxxxxxxxxxxxxxxxxxxxxxxx", …
TyMac
  • 783
  • 2
  • 9
  • 32
2
votes
1 answer

Adding raw data to PE .text section in Visual Studio

I am currently working on a packer and I need to copy raw data in the section containing the code (. text), is there any way to do this in VC++ ? If it's impossible, could you recommend me some good C/C++ lib to edit PE files ?
Omen
  • 85
  • 6
2
votes
0 answers

serverspec test fails to check if Docker service is running on AWS

I'm using Packer to create an AMI in AWS based on the Amazon Linux AMI, provisioned with Ansible. Some of my serverspec tests fail and I don't understand why. First one that always fails is trying to make sure that Docker is installed and running.…
Jose Armesto
  • 12,794
  • 8
  • 51
  • 56
2
votes
3 answers

Packer.io - installing chocolatey behind proxy

I'm trying install chocolatey using packer.io and powershell script. I have a two scripts, one for proxy configuration and one for chocolatey install. first script for proxy: $ErrorActionPreference = "Stop" # set global proxy $reg =…
esio
  • 1,592
  • 3
  • 17
  • 30
2
votes
4 answers

how to copy AMI from one aws account to other aws account?

Am trying to copy the custom built ami using packer from one AWS account to another AWS account; however, i was able to copy ami across regions within one account. "builders": [{ "account_id": "12345678910", "s3_bucket": "xyz/xqas/asd", …
2
votes
1 answer

Add a "shell-local" post-processor but run many times

I'm using Packer 0.9.0 and as post-processor "shell-local" to run one script. The problem is that the shell script run for each artifacts generated (.vmdk, .vmx, etc.) and I don't know the reason. The source code: { "variables": { …
enrique-carbonell
  • 5,836
  • 3
  • 30
  • 44
2
votes
1 answer

How to build libvirt box from scratch

I'm trying to build vagrant libvirt box from scratch. I insttalled ubuntu 14.04 and used this tutorial to prepare machine for vagrant using and then I used command virsh domblklist test to find my image file, so i find it here…
GALIAF95
  • 619
  • 1
  • 10
  • 25
2
votes
1 answer

simple shell inline provisionning

How can I just simple install apache2 package in a packer template for virtualbox-iso Ubuntu and the shell inline provisionning ? I'm testing this template : { "builders": [{ "boot_command": [ "", "", …
miltone
  • 4,416
  • 11
  • 42
  • 76
2
votes
1 answer

Packer Timeout waiting for SSH error with VirtualBox

Although I could ssh manually in VirtualBox, Packer does not know if ssh connection is established. I've seen the same issues, but I could not find any solution for this. My purpose of using packer is to convert my existing ovf file to Digital Ocean…
seoyoochan
  • 822
  • 3
  • 14
  • 28
2
votes
1 answer

Acquire interactive shell in Packer?

I'm trying to create a Packer AMI image for EC2 based off of CentOS 7. I'm able to get provisioning working just fine, I can upgrade and install packages without a hitch. The problem I'm having is that the Docker daemon won't start, and I need it…
Naftuli Kay
  • 87,710
  • 93
  • 269
  • 411
2
votes
1 answer

Using packer to create a vagrant qemu/kvm box

I am attempting to build a vagrant .box using the qemu/kvm hypervisor using packer. I am using the vagrant plugin vagrant-libvirt. In my packer base.json file, I am using the vagrant post-processor, like "post-processors": [ { "type":…
johncorser
  • 9,262
  • 17
  • 57
  • 102