Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [packer]

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

0
votes
0answers
30 views

Packer Works Locallly but fails in Gitlab CI/CD w/ executable file not found in $PATH

Here is a snippet of my JSON file for packer. Pretty much running packer build example.json via adhoc - it works smoothly and builds the AMI out in AWS. When i execute this in my GitLabCI Pipeline, it ...
0
votes
0answers
7 views

Multiline annotation parameter in ovftool

I use the ovftool.exe on Windows to generate an OVA package of a virtual machine prebuilt using packer. I want to enter a long, multi-line description of the package using the --annotation parameter. ...
0
votes
0answers
26 views

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 ...
0
votes
0answers
39 views

serial0 failure when building ubuntu VM on esxi host

I am using packer to build an virtual machine on ESXI 6 host. At some point the process halts and I can see several repetitions of the following message: 2018-09-13T12:48:53.747Z| vcpu-2| I120: ...
1
vote
1answer
82 views

Running VMWare Workstation 14 on a VM [closed]

I have set up VMWare Workstation on a esxi 6.0 hosted VM. (Ubuntu 16.04.05) I am trying to run some packer builds that use the specific (VMWare Workstation) hypervisor. The builds get stuck ...
0
votes
0answers
67 views

Build custom Coreos Ami Image

I need create my own ami image of coreos, I have already tried using packer and coreos sdk but, i can't understand in packer case how i build ami image from coreos iso and then upload to aws. Exist ...
0
votes
0answers
48 views

Shell provisioner in Packer cannot set the default boot option in grubenv after installing a new kernel

I'm using Packer to build some CentOS 7 VM's. A part of this process is installing Linux Kernel ver. 4.15. Installing the Kernel has been pretty straightforward but getting the VM to recognize the new ...
1
vote
0answers
57 views

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 ...
0
votes
0answers
148 views

Imutable deployments with Packer and Terraform on VMWare

I'm working on using Packer for baking vmware images - that will be ready for production deployment. Basically deployment artifacts are currently being packaged as rpms and installed via ansible. ...
0
votes
1answer
102 views

serverspec nginx should be listening using packer

I am using packer to build an ami on aws, after the provision of the ami, I am testing the image using serverspec, but the test fail testing nginx, this is the test cat test/spec/localhost/...
0
votes
1answer
74 views

How do I use debconf in salt with pillars?

I have the following: newrelic-debconf: debconf.set: - name: newrelic-php5 - data: 'newrelic-php5/application-name': { 'type': 'string', 'value': '{{ salt['pillar.get']('newrelic:...
3
votes
0answers
972 views

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 ...
1
vote
1answer
559 views

Packer with ansible from local works but from another server ask for root permissions

For a bit of context, I'm using packer with an ansible provisioner to create AMI images on AWS. The relevant parts of the packer and ansible: packer.json "provisioners": [{ "type": "shell", "...
0
votes
1answer
257 views

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, ...
4
votes
0answers
969 views

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 ...
1
vote
0answers
31 views

Data disappears after launching EC2 instance from AMI

I am launching an EC2 instance out of an AMI that i am building using packer . In packer build i specify a provisioning shell script which will mount the drives as well as get some files from S3 ...
1
vote
2answers
2k views

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 ...
2
votes
1answer
769 views

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 ...
3
votes
2answers
760 views

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 ...
0
votes
1answer
908 views

Using Packer to build a GCE with “error creating instance” error, next steps?

I've been working with using Packer v0.10.1 to build an image and am running into this access security issue when trying to run via Hashicorp's Atlas tool. Packer v0.10.1 [1;32mgooglecompute ...
3
votes
0answers
622 views

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": [ { ...
0
votes
3answers
1k views

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 ...
5
votes
1answer
2k views

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, ...
0
votes
1answer
425 views

Ansible not executing within Packer Build

I am currently experimenting with deploying using Packer’s Ansible local provisioning and for some odd reason, it doesn’t appear to be executing the tasks in the playbook. Packer, after installing ...
1
vote
2answers
3k views

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 ...
5
votes
1answer
100 views

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 ...
2
votes
1answer
7k views

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 ...
5
votes
3answers
2k views

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 ...
1
vote
1answer
595 views

What is the best workflow to build and test your aws opsworks chef cookbooks locally?

For months I've been struggling to find the best workflow for building and testing my aws opsworks cookbooks locally prior to pushing to opsworks. After a lot of stalled attempts I found a blog post ...
1
vote
1answer
635 views

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 ...
1
vote
1answer
800 views

Packer with amazon-ebs VS amazon-instance

I am looking into using Packer to generate some of our VMs, and I have been working thorough the example here. When I try to run the packer build command I get the following error: ==> amazon-ebs: ...
2
votes
2answers
636 views

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?
4
votes
2answers
8k views

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 ...
6
votes
2answers
5k views

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 ...
5
votes
3answers
5k views

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:...
0
votes
3answers
612 views

How to configure ssh access for an unattended linux-distro ISO image for local development env similar to accessing cloud service VM instances?

I configured Packer to build unattended ISO installs of various Debian-derived distros to VMware fusion. As I configure the VMs manually for ssh access, it times out and the build artifacts created ...
0
votes
1answer
352 views

Chef installation in a chroot (packer): not starting services

I'm trying to use packer.io to create a machine image for a server who's deployment I already have automated using Chef (chef-solo specifically), using the amazon-chroot builder and the chef-solo ...
3
votes
0answers
2k views

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 ...
1
vote
0answers
2k views

Deploy packer images on bare metal server?

How can I match my dev and production bare metal box? The hosting provider does not allow or have a process to install custom images and only provides a selection from all the latest popular ...
5
votes
1answer
3k views

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 ...
6
votes
2answers
2k views

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 ...
0
votes
1answer
771 views

No builder returned for name: vagrant Packer.io error

I just want to provision a standard Ubuntu 12.04 image with a shell script, and then package it so I can use it with Vagrant. This is the configuration I wrote: { "builders": [{ "type": "...