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.

69 questions
11
votes
1 answer

Is there any way to provision bare-metal with Packer?

Can Packer be used to install and provision a bare metal server? Packer provides webserver with repository packages and preseed/kickstart and can run some other provision softwares(ansible,puppet, chef, etc). Could it be used to install bare metal…
9
votes
3 answers

Passing variables to use in the preseed file for a Debian Jessie installation

Is it possible to add a variable via the boot prompt to the Debian installer, so that variable can be used in a preseed file? In particular, I'm trying to solve the following problem: We have a pretty extensive post-install script that is generally…
Tim Stoop
  • 578
  • 5
  • 19
6
votes
1 answer

Packer won't correctly use private key for SSH auth in provisioning step

I use Packer to build VirtualBox images, with the Ansible provisioner to set up the images. The builder step creates a temporary user (ssh_username and ssh_password). The Ansible provisioner runs using this temporary user. I, of course, want to get…
siride
  • 529
  • 2
  • 7
  • 18
6
votes
2 answers

Active Directory, create user just for adding computers to the domain

I'm a linux admin by trade, and my new job has me managing windows servers. I'm trying to create a windows server 2012 base image using packer. As part of the provisioning, the VM needs to be connected to active directory via a script. Obviously I…
spuder
  • 1,695
  • 2
  • 25
  • 42
6
votes
1 answer

cloud-init does not grow the partition nor the filesystem

I am currenty preparing OpenStack-ready images of CentOS 7 and Ubuntu 14.04. For the "automation" I use Packer, which is provided by you with a JSON-template. Packer then starts the installation using the virtualization you specify (in my case…
Korni22
  • 61
  • 1
  • 3
6
votes
2 answers

How to use terraform.io to change the image of a stateful server without downtime or data loss?

Say I have application servers, database servers, and a few dns-round-robin load balancers. All this powered by images created with Packer with deployment managed with Terraform. How do I change the image of the database servers without nuking their…
jpadvo
  • 183
  • 1
  • 5
5
votes
3 answers

inconsistent `apt-get update` behaviour on official Ubuntu AWS AMI

I get various and inconsistent errors with apt on the official Ubuntu images (ami-83e769fb). I'm using Packer to build my AMI and it fails about 40% of the time. Rerunning the script succeeds. My script runs: sudo apt-get clean all sudo apt-get…
Mystic
  • 151
  • 4
5
votes
3 answers

Packer unable to pack aws image into VPC

I am trying to make a packer image, but on our amazon account we DO NOT have a default VPC. It has been removed. And have been getting this error when trying to pack the image: ==> amazon-instance: Inspecting the source AMI... ==> amazon-instance:…
Daryl B
  • 153
  • 1
  • 1
  • 7
4
votes
1 answer

Why are Puppet effects disappearing after Packer post-process?

I decided to learn Packer by putting together a FreeBSD Vagrant box. The whole setup is on GitHub. Everything works well until the post-processing stage. Actually, that stage likewise claims to complete without error, but when I try to launch a…
kojiro
  • 559
  • 3
  • 8
  • 25
4
votes
2 answers

Extremely slow qemu storage performance with qcow2 images

I'm running some images using libvirt on a small Openstack cluster. Storage performance on these machines is extremely poor: my monitoring tool shows 100% utilisation (usually on writes but sometimes on reads) with throughputs as low as ~50KB/s - up…
Cera
  • 533
  • 3
  • 6
  • 12
3
votes
0 answers

How to pass environment variables to packer in AWS?

I am building a custom AMI in AWS using packer and bash + salt provisioning. However, I am in need of being able to pass some variables from my local environment to the build system and I don't really know how to do that when building using "ebp"…
3
votes
2 answers

Sysprepping with packer.io returns exit 1, packer doesn't create AMI

I'm trying to build a Windows AMI with packer.io. In the powershell file I have run the following command as the last command of the provisioning step: Write-Host "Running the EC2Config.exe file to sysprep the image for UserData to run on next…
Ian Wilson
  • 226
  • 2
  • 6
3
votes
0 answers

Qemu packer ssh failed connection reset by peer

I am trying to get packer to create a qemu/kvm image. I feel like it should be fairly straightforward but my build keeps failing on ssh. Here are the relevant files template.json: { "builders": [ { "type": "qemu", "iso_url":…
C413
  • 61
  • 5
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,371
  • 3
  • 17
  • 35
1
2 3 4 5