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
1
vote
1 answer

Running VMWare Workstation 14 on a VM

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 randomly; The only thing I notice in my logs is: $ tail -f…
1
vote
1 answer

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", "inline": [ "sleep 15", "sudo apt-get update", …
fmartingr
  • 13
  • 4
1
vote
0 answers

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 bucket into one of this directories which has been…
1
vote
1 answer

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 by Mike Greiling and have since settled on an…
Peter M
  • 953
  • 2
  • 14
  • 27
1
vote
1 answer

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: Error launching source instance: The specified…
Soatl
  • 169
  • 1
  • 2
  • 12
1
vote
0 answers

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 distributions. KVM is available but they charge extra per…
paulkon
  • 159
  • 1
  • 5
1
vote
1 answer

Adding a machine to a domain fails with internal error

I've enabled winrm, disabled firewall, enable remoting, GPOs for winrm, enabled SMBv1 and completed updates first as troubleshooting but I still get the error. I can ping the DC as well. The error I get is: Add-Computer: Computer "server2019' failed…
1
vote
0 answers

Run script in Windows Azure VM after launch during packer build to configure WinRM and the firewall

Background: Apparently Packer has major issues configuring WinRM on Azure VMs created from the Microsoft Windows Server publisher. This is only one of the several issues and threads I've found on this and it dates back several years. Because of this…
codewario
  • 548
  • 3
  • 16
  • 33
1
vote
0 answers

How to end-to-end provision a virtual machine including OS on ESXi standalone using Terraform?

For a small environment I'm tasked to create automated infrastructure deployment for a couple of virtual machines running on a single ESXi host (without vCenter). The VMs should run CentOS 8 and I will use ansible later on to configure the…
Daniel
  • 155
  • 9
1
vote
1 answer

OpenVPN AMI's built with packer incorrectly use the old public IP from the build in generated config files

When I build AMI's using Hashicorp Packer, based off the AWS OpenVPN AMI, the public ip address from the first instance performing the build will persist in later usage of the AMI when it should instead update. So when I try to use the resulting AMI…
1
vote
0 answers

Heisenbug: ansible.windows.win_user fails with "Illegal operation attempted on a registry key that has been marked for deletion."

Using Packer to build an AMI based on Windows Server 2019, and Ansible as provisioner. This is the provisioners part of my packer-build.json: "provisioners": [ { "type": "ansible", "playbook_file":…
Amedee Van Gasse
  • 308
  • 3
  • 18
1
vote
3 answers

Can't connect to Windows EC2 instance built by Packer via SSM Agent

I'm using Packer to set up a Windows VM on the free tier of AWS EC2. The image is properly set up and I'm able to launch it, but I can't connect to it with SSM. Here's my Packer template: { "variables": { "aws_access_key": null, …
0
votes
1 answer

How to update existing manage packer image in Azure?

I have created a ubuntu image by following code { "builders": [{ "type": "azure-arm", "subscription_id": "XXXXXX",XXXXXXXX "client_id": "XXXXXXX", "client_secret": "06XXXXXXX", "tenant_id": "41X",XXXXXX …
sanjayparmar
  • 623
  • 8
  • 18
0
votes
1 answer

packer unable to parse json due to invalid character

I want to use packer to build an ami. The AMI was initially built by an aws_instance resource in terraform. It contains the following user_data winrm quickconfig -q winrm set winrm/config/winrs '@{MaxMemoryPerShellMB="300"}' winrm set…
Anthony Kong
  • 2,976
  • 10
  • 53
  • 91
0
votes
1 answer

xenserver-iso: Error downloading: open : no such file or directory

I'm trying to build a "vdi_vhd" image using packer on xenserver,but i have got the below error, could you please anyone help me on this,Thanks in advance. [root@localhost bin]# packer build /usr/local/test-scripts/main.json xenserver-iso output…