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.

75 questions
12
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
  • 638
7
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
  • 629
7
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
  • 71
7
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
  • 193
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,745
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
4 answers

Removing install user with Packer

When a VM is first created, it gets an install user that is used to run the provisioning. I want to remove this user at the last step because it's not necessarily secure and it's unnecessary. However, Packer runs all of the provisioners as this…
siride
  • 629
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
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
  • 553
4
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
  • 317
  • 3
  • 9
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

Packer - AWS Windows 2016 SysPrep returns exit code 1

When attempting to SysPrep an AWS Windows Server 2016 instance using Packer the following error is thrown: Build 'amazon-ebs' errored: Script exited with non-zero exit status: 1. Allowed exit codes are: [0] I'm calling the SysprepInstance.ps1…
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…
1
2 3 4 5