Questions tagged [packer]

Packer is a tool which automates building and provisioning of VM and Docker images.

Packer automates the creation and provisioning of images for many desktop and cloud-based virtualization environments. It also includes integrations with post-processors such as Vagrant.

73 questions
3
votes
1 answer

How do I set locale when building an Ubuntu Docker image with Packer?

I'm using Packer to build a Docker image based on Ubuntu 14.04, i.e., in my Packer template I have: "builders": [{ "type": "docker", "image": "ubuntu", "commit": true }], and I build it using: $ packer build my.json What do I need to…
Toasty
  • 39
  • 2
3
votes
1 answer

Best practice for unattended upgrades on immutable servers

I use packer to build immutable Ubuntu 20.04 servers. How can it work smoothly with unattended upgrades? Since the image is not bundled like it was in the past the updates do not apply to new instances. It means that when a server comes up…
Niro
  • 1,401
  • 4
  • 20
  • 36
3
votes
0 answers

What the best way to export a Vagrant box to OVF?

My goal was to create a Virtual Machine programmatically like you would do for a container with docker and be able to export it in an OVF. So I used Vagrant to create the VM. Combining Vagrant and Packer I found 3 ways to achieve this with…
noraj
  • 273
  • 3
  • 9
2
votes
1 answer

Packer failing sysprep on AWS windows 2016 AMI

Packer seems to fail at the Amazon Scripts to sysprep the machine. I have tried a bunch of different things. Putting the scripts in their own script, running, them 'inline' like many people show but nothing seems to work. I keep getting the…
2
votes
1 answer

Building an AMI using Packer with a shell provisioner

I'm trying to create an AMI (based on ubuntu; ami-2d39803a) that I can reuse for a project with the a set of components installed. I'm using packer to achieve this with a shell script that gets executed by a provisioner: #/bin/bash # salt sudo…
2
votes
4 answers

Using Packer with Google Cloud and getting an SSH connection issue w/ Debian Build

Here's my Packer file. { "variables": { "account_json": "{{env `packer_account_json`}}" }, "builders": [ { "type": "googlecompute", "account_file": "{{user `account_json`}}", "project_id":…
Adron
  • 614
  • 1
  • 8
  • 16
2
votes
2 answers

How to debug "Select and install software" issue with unattended Ubuntu install (14.04)

I am using Packer to build a VirtualBox image for Ubuntu 14.04. I have a Packer script here, which used to work, but then for some reason (and several VirtualBox updates later) started failing. The install keeps getting stuck on the "Select and…
Hugo Rodger-Brown
  • 3,719
  • 2
  • 18
  • 12
2
votes
1 answer

How to create a Docker image by downloading an ISO using Packer?

It is possible to create images from scratch using Packer by downloading an ISO from the internet. Aim: to create Docker images by downloading an ISO using Packer Attempts Attempt 1 It is possible to import a Docker image [username@hostname]$ cat…
030
  • 5,901
  • 13
  • 68
  • 110
2
votes
1 answer

Amazon Linux builds using Packer?

I've been trying to chase this down but evidently have not found the right documentation. It it possible (and how) to build Amazon Linux machines with Packer? Would this be just mirror AMI's that are prebuilt if so? I know that Amazon Linux does not…
ehime
  • 597
  • 2
  • 7
  • 15
2
votes
2 answers

Any way to re-run the chef-solo provisioner on a packer built machine?

I'm building VirtualBox machines using Packer and the chef-solo provisioner. Is there a way to re-run chef from within the VM as recipes are updated without needing to re-run packer build?
jwh
  • 41
  • 4
2
votes
1 answer

Replace WinRM with OpenSSH on Windows for use with Ansible on AWS

Currently when running extended builds (Packer/Ansible based) on Windows we have found that WinRM has errors so frequently as to be unusable and have had to fall back to running some large build jobs manually as a result. Using a host in AWS as the…
Adam C
  • 5,222
  • 2
  • 30
  • 52
2
votes
2 answers

Proxmox & Packer: VM quit/powerdown failed during a Packer build. Anyone have any ideas why?

I am trying to create a Proxmox VM template using Packer. However I am getting a Proxmox error saying Build 'proxmox' errored: Error converting VM to template, could not stop: VM quit/powerdown failed - got timeout. According to the Proxmox GUI, the…
Eddingston
  • 21
  • 2
1
vote
1 answer

Partially Immutable infrastructure in AWS with Packer?

I'm a very young systems engineer/contractor sysadmin with a bandwidth-heavy workload that just moved to an area where I get 2mbps download and 20 upload on my internet connection. I'm moving my Debian 10 workstation to AWS because of that, and I…
user550919
1
vote
1 answer

How to provide ssh_username when using packer to build a windows AMI

When I run packer build -var aws_access_key=$AWS_ACCESS_KEY_ID -var aws_secret_key=$AWS_SECRET_ACCESS_KEY windows-2012.json I got this error: 1 error(s) occurred: * An ssh_username must be specified Note: some builders used to default…
Anthony Kong
  • 3,288
  • 11
  • 57
  • 96
1
vote
1 answer

Packer errors with qemu-system-aarch64

I have some success creating Vagrant base boxes with Packer for x86 and x86_64 guests, including VirtualBox, VMware, and qemu hypervisors. Now, I want to start making ARM guests with Packer and qemu, but I am not sure how to resolve the error that I…
mcandre
  • 168
  • 8