Re: [packer] AWS new VM (Private IP)

2020-07-27 Thread Rickard von Essen
I would handle it like this. 1) run shell (not local) curl the metadata service and save it to a file, say /tmp/ipaddress 2) use file provisioner download to fet it to your machine. 3) in a shell-local script read the IP into a variable. On Mon, Jul 27, 2020, 15:05 Renato Marcandier wrote: >

Re: [packer] Re: Running Packer from Jenkins - nothing appearing in console

2020-06-14 Thread Rickard von Essen
See https://learn.hashicorp.com/packer/getting-started/install#troubleshooting On Sat, Jun 13, 2020, 06:39 'Tarun Mittal' via Packer < packer-tool@googlegroups.com> wrote: > > I don't about why this issue is coming, but what I did in Jenkins job > shell execution:- > 1 . which packer -- in this,

Re: [packer] seems like you cannot install ubuntu 20 with packer

2020-06-12 Thread Rickard von Essen
I expect this to work https://www.github.com/chef/bento/tree/master/packer_templates%2Fubuntu%2Fubuntu-20.04-amd64.json On Fri, Jun 12, 2020, 12:23 Elhanan Maayan wrote: > ubuntu 20 decided to ditch the D-I installer, and go with subiquity > something that some folks think unstable, > > there's

Re: [packer] inline reboots with packer and linux redhat based

2020-05-20 Thread Rickard von Essen
Looks like the word reboot got uppercased? On Wed, May 20, 2020, 03:33 trey perrone wrote: > Attempting to add an inline reboot command based on this > https://discuss.hashicorp.com/t/best-practice-for-applying-updates-and-kernel-patches/3300/2 > but > playing around today to build new AWS

Re: [packer] Does Packer supports escape characters in JSON?

2020-05-12 Thread Rickard von Essen
It should, otherwise open an issue. On Tue, May 12, 2020, 16:09 drj wrote: > I am working on building an image using the vpshere-iso builder > unfortunately some of the naming conventions in our vsphere env are using > spaces in our esources names created, for e.g. the datastore name is >

Re: [packer] Re: Provisioner shell inline command does not run

2020-05-07 Thread Rickard von Essen
Yes provisioner depends on the communicator, in this case ssh. On Thu, May 7, 2020, 16:58 jz wrote: > Just clarify - the reason I am doing this is try to run a command line to > create a new user in inline. Also this user is meant to be a ssh user from > Packer host to VM. I am using Photon so

Re: [packer] failed while creating image in GCP

2020-04-29 Thread Rickard von Essen
It seems like it was preempted. "Instance failed to start due to preemption." On Wed, Apr 29, 2020, 10:14 Farrukh Fareed wrote: > I have use packer for creating GCP images , there i used preemptive > instances for cost saving most of the time it failed to create image giving > errors like

Re: [packer] temporary_key_pair_name Applicability

2020-04-02 Thread Rickard von Essen
It's not applicable. It's just for builders where ssh public keys are served by the API to instances to that will be added by cloud-init (or something similar) will automatically add them to a authorized_keys file. On Thu, Apr 2, 2020, 04:15 Lesley Kimmel wrote: > I noticed that this SSH

Re: [packer] how to use the ISo url as source_image in packer using the openstack builder

2020-03-30 Thread Rickard von Essen
You can't do that. You need reference an image. If you need to build from scratch, use the qemu builder and upload the image to OpenStack. On Mon, Mar 30, 2020, 13:48 Sunil Kathait wrote: > my file is here > > { > "builders": [ > { > "type": "openstack", > "provider":

Re: [packer] 'amazon-ebs' errored: Script exited with non-zero exit status: 1.Allowed exit codes are: [0]

2020-03-22 Thread Rickard von Essen
Add -on-error=ask flag to packer build and the you can access the instance when it fails and poke around. If this is a bash script add set -x to the top of the script and it will echo each command before executing it. On Sun, Mar 22, 2020, 05:05 Venkatesh R wrote: > Packer Build fails with

Re: [packer] Packer ssh connection timeout

2020-03-19 Thread Rickard von Essen
ool@googlegroups.com> wrote: > I have changed the ssh_username from root to ubuntu, still it is same > > On Thursday, March 19, 2020 at 2:22:15 PM UTC+5:30, Rickard von Essen > wrote: >> >> Ubuntu doesn't allow SSH'ing with root. And you need to use the user that

Re: [packer] Packer ssh connection timeout

2020-03-19 Thread Rickard von Essen
Ubuntu doesn't allow SSH'ing with root. And you need to use the user that cloud-init set the ssh key for. In this case ssh_username should be ubuntu. On Thu, Mar 19, 2020, 06:32 'Ganesh Katakam' via Packer < packer-tool@googlegroups.com> wrote: > I am very new to packer and this is my first

Re: [packer] Unable to install the Google Cloud Logging Agent when using Packer

2020-03-11 Thread Rickard von Essen
as going on. > > I also tried changing the execute command in a few different > configurations but was ultimately unable to get any additional details. > > Thanks, > Alex > > On Wednesday, March 11, 2020 at 6:59:39 PM UTC, Rickard von Essen wrote: >> >> Instead of

Re: [packer] Unable to install the Google Cloud Logging Agent when using Packer

2020-03-11 Thread Rickard von Essen
Instead of curling down the script, download it and use the file privisioner to get it into the image and run that. Also add set -x on the top of it and you will probably find the issue. On Wed, Mar 11, 2020, 17:07 'Alexander Christie' via Packer < packer-tool@googlegroups.com> wrote: > Hi all!

Re: [packer] Packer in OCI Government

2020-03-05 Thread Rickard von Essen
If you have a key account manager at Oracle try contacting him/her since Oracle contributed and maintains this plugin. That might increase the visibility of your issue for them. On Wed, Mar 4, 2020, 23:33 'twmcel...@me.com' via Packer < packer-tool@googlegroups.com> wrote: > Looking for help

Re: [packer] Packer not returning latest AMI ID

2020-02-25 Thread Rickard von Essen
Your describe-images command doesn't filter based on owners which makes it vulnerable to finding images from untrusted/malicious sources. On Tue, Feb 25, 2020, 18:23 Mohammed Majid wrote: > Dear Packer group, > > I am using latest packer 1.5.4 > > I want to get the latest AMI ID's for Ubuntu

Re: [packer] Re: unable to parse private key

2020-02-24 Thread Rickard von Essen
Is thia the key you use for https://packer.io/docs/builders/triton.html#triton_key_material? Does it have a passphrase? Have you loaded it into your ssh-agent? On Mon, Feb 24, 2020, 21:37 Mohammed Afroz wrote: > if am right this issue is similar to >

Re: [packer] unable to parse private key

2020-02-24 Thread Rickard von Essen
Can you Shar one ot the keys and what command you used to create it? On Mon, Feb 24, 2020, 20:19 Mohammed Afroz wrote: > while I validate my template json file, packer throws the exception as > below: > > Template validation failed. Errors are shown below. > > Errors validating build 'triton'.

Re: [packer] output ovf file

2020-02-13 Thread Rickard von Essen
t;vagrant", > "keep_input_artifact": false, > "output": "windows_10_{{.Provider}}.box", > "vagrantfile_template": "vagrantfile-windows_10.template" > } > ], > > > On Wednesday, February 12, 2020 at 11:1

Re: [packer] Using packer to copy files needed for build

2020-02-11 Thread Rickard von Essen
Scp works as normal from an instance. There is nothing special regarding that when running packer. Build with --on-error=ask, when it fails log into the instance end debug manually before destroying it. On Mon, Feb 10, 2020 at 9:57 PM Gautam Singh wrote: > Why not use file provisioner instead.

Re: [packer] Can I get the AMI ID from the source_ami_filter

2020-02-10 Thread Rickard von Essen
See https://packer.io/docs/builders/amazon-ebs.html#build-template-data On Mon, Feb 10, 2020, 15:17 Ibrahim Buamod wrote: > > Can I get the AMI ID from the source_ami_filter >

Re: [packer] Packer, GCP, and reservations.

2020-01-30 Thread Rickard von Essen
Run packer with env var PACKER_LOG=1 and you will get more debug info. On Thu, Jan 30, 2020, 21:17 Tony Worm wrote: > Google Cloud has the concept of VM reservations, which we use to ensure > K80s are available when needed. > > I'm trying to build an image with packer, but it fails to consume

Re: [packer] custome kms_key_id get error while using in launch_block_device_mappings in amzon-ebs builder

2020-01-30 Thread Rickard von Essen
You'r using a really old version of Packer. Try upgrading to a more recent version. On Wed, Jan 29, 2020 at 9:21 PM vrushabh wrote: > packer versoin 1.0.4 > Builder type : amazon-ebs > I am following this docs: > https://www.packer.io/docs/builders/amazon-ebs.html#block-devices-configuration >

Re: [packer] Packer Openstack Builders - Specify Subnet

2020-01-30 Thread Rickard von Essen
Maybe you are looking for this: https://packer.io/docs/builders/openstack.html#instance_floating_ip_net On Wed, Jan 29, 2020 at 12:06 AM Ben Somogyi wrote: > I have a network in openstack that has 4 different subnets. One subnet > does not have a gateway to my external network, and therefore

Re: [packer] Continue on error during post-processing

2020-01-22 Thread Rickard von Essen
The -on-error argument is for troubleshooting not something you should use by default. If you want to ignore error just ensures that your script returns 0. On a posix system that would just be ending your script with exit 0. (I have no idea how to do that in Powershell) But it think you should

Re: [packer] how to change the size of disk with Packer chroot builder?

2020-01-19 Thread Rickard von Essen
I have never used Azure but maybe this is the option you are looking for? https://packer.io/docs/builders/azure-chroot.html#os_disk_size_gb On Sun, Jan 19, 2020, 10:15 Rodrigue Chakode wrote: > Hello, > Is it possible to change the default size of the device setup by Packer to > build an image

Re: [packer] packer and GCloud integration

2020-01-10 Thread Rickard von Essen
Try using source_image instead of source_image_family and point out the exact image. Also verify that you can launch an instance from that image with the gcloud command on the same host running Packer with the same credentials. On Thu, Jan 9, 2020, 17:21 Dimitar Dimov wrote: > I've been using

Re: [packer] Packer docker builder stopping processes running on base image container

2019-12-29 Thread Rickard von Essen
When building with Packer no metadata is inherited like when you build with a Dockerfile. So you need to refine CMD, ENTRYPOINT etc. On Sun, Dec 29, 2019, 14:35 Satwik Mukherjee wrote: > I am using below packer.json file to put war file into tomcat container & > build it > > { > "builders":

Re: [packer] Creating temporary drives only during image build

2019-12-27 Thread Rickard von Essen
If I remember correctly you first add the device in launch_block_device_mappings and then in ami_block_device_mappings you add the same device again, but this time with the no_device set to true. See https://packer.io/docs/builders/amazon-ebs.html#no_device On Fri, Dec 27, 2019, 01:15 John Jones

Re: [packer] Re: guix vagrant script stuck after reboot

2019-12-19 Thread Rickard von Essen
It's a very big topic and largely depends on related knowledge of networking and Linux system administration etc. Maybe check this https://hostadvice.com/amp/how-to/how-to-troubleshoot-ssh-issues/ Or familiarize more with Linux administration: https://debian-handbook.info/browse/stable/ On Thu,

Re: [packer] Re: List of valid "guest_os_type" values for vSphere builder?

2019-12-18 Thread Rickard von Essen
I think the simplest way to find out is to manually create a VM with the settings you want and then open the VMX file and check the content. On Wed, Dec 18, 2019, 19:40 Emory Christenson wrote: > I managed to find a way to get the list from vCenter itself. That's not on > there, I'll try it if

Re: [packer] Re: guix vagrant script stuck after reboot

2019-12-18 Thread Rickard von Essen
Run with flag --on-error=ask. When if fails you troubleshoot ssh both from the host and inside the VM. And don't run headless when troubleshooting. On Wed, Dec 18, 2019, 12:38 Bashid wrote: > in below is also debug messages. > > > 2019/12/18 11:28:41 packer: 2019/12/18 11:28:41 [INFO] 35 bytes

Re: [packer] Re: Multi-stage builds

2019-12-18 Thread Rickard von Essen
No it doesn't have any built in support for multi stages. You have to have different template files and build them in series. For VM images there isn't usually any reason to build in multiple stages. It's usually better to include "down streams" on the source level instead. On Mon, Dec 16, 2019,

Re: [packer] Packer node reboot is failing

2019-12-06 Thread Rickard von Essen
As the error message says, if you expect the script to disconnect the ssh connection you need to add expect_disconnect": true. But a question, do you need to reboot? When an instance is launched from the image it will boot the latest (installed) kernel? On Fri, Dec 6, 2019 at 5:17 AM Rajendra

Re: [packer] Re: Passing sudo password to ansible (remote) provisioner

2019-11-23 Thread Rickard von Essen
See https://stackoverflow.com/a/29799758/226174 On Mon, Nov 18, 2019, 19:20 Valentin Leon wrote: > Apologies for the double posting, I kept seeing Google Groups errors.. > some days nothing works. > > An error (#847) occurred while communicating with the server. > RELOAD > > On Monday, November

Re: [packer] Packer not connecting to custom port in google cloud

2019-11-07 Thread Rickard von Essen
t's updated but still it not working... The log are not show which port >> is trying to connect... >> >> On Fri, Nov 8, 2019, 3:18 AM Rickard von Essen < >> rickard.von.es...@gmail.com> wrote: >> >>> Most likely you didn't update the GCP firewall rul

Re: [packer] Packer not connecting to custom port in google cloud

2019-11-07 Thread Rickard von Essen
Most likely you didn't update the GCP firewall rules. On Thu, Nov 7, 2019, 13:37 Azhagiri panneer wrote: > Hi Team > > what to know how to connect with custom port in google cloud packer > > -- > This mailing list is governed under the HashiCorp Community Guidelines - >

Re: [packer] Permission denied: '/etc/.ansible_tmp4jZR1Denvironment'

2019-11-06 Thread Rickard von Essen
Try running it as a normal user. https://packer.io/docs/provisioners/ansible.html#become-yes On Wed, Nov 6, 2019, 17:53 Hakim KHANCHOUCH < hakim-externe.khancho...@dalkia.fr> wrote: > yes > > Le mercredi 6 novembre 2019 14:36:41 UTC+1, Rickard von Essen a écrit : >> >

Re: [packer] Re: Looking for WinRM instructions

2019-11-06 Thread Rickard von Essen
You need to set them in autounattended.xml since a powershell provisioner requires the WinRM connection. On Wed, Nov 6, 2019, 09:59 Jimster wrote: > This works for me building W2016 Servers, YMMV... > > Here is my build file: > { > "builders": [{ > "type": "amazon-ebs",

Re: [packer] Permission denied: '/etc/.ansible_tmp4jZR1Denvironment'

2019-11-06 Thread Rickard von Essen
Are you running Packer as root? On Tue, Nov 5, 2019, 17:20 Hakim KHANCHOUCH < hakim-externe.khancho...@dalkia.fr> wrote: > Hello, > > I'm using packet to create an AMI and ansible to setup the instance. > but running the packer script, i got this message [Errno 13] Permission > denied:

Re: [packer] using ami_product_codes usage

2019-11-01 Thread Rickard von Essen
If I remember correctly this is how it works: You can't change product code. It is given when you upload a new AMI to the AWS Marketplace. That requires a Market place partnership with AWS. The product code follows the AMI (even if it's copied or create from a snapshot base on an instance

Re: [packer] resetting network interface before saving image

2019-10-16 Thread Rickard von Essen
See this code https://github.com/chef/bento/blob/master/packer_templates/centos/scripts/cleanup.sh#L15 On Thu, Oct 17, 2019, 02:31 Mauricio Tavares wrote: > So I have packer create a centos image, but when it saves (creates) it, it > saves the old mac address, associating it with the default

Re: [packer] How to fix 'Permission denied error'?

2019-10-16 Thread Rickard von Essen
It should be "sudo bash -c 'echo \'$PreserveFQDN on\' >> /etc/rsyslog.d/server.conf'" On Wed, Oct 16, 2019, 04:44 Anil Wadghule wrote: > When I have following config > > { > "type": "shell", > "inline":[ > "sudo echo '$PreserveFQDN on' >> >

Re: [packer] Passing Tags & Run_tags Blocks in var-file : Is This Possible?

2019-10-16 Thread Rickard von Essen
No, currently this is not supported. Only single values and arrays work. On Wed, Oct 16, 2019, 10:31 Jimster wrote: > Hi, > > Been tasked with cleaning up packer code to remove duplication of explicit > values in our working build .json files - and use a few general > *var-files* that will

Re: [packer] AWS Credential Passing Issue

2019-10-09 Thread Rickard von Essen
The packer program use your credentials to make API directly. Nor credentials is passed to the EC2 instance launched. The canonical way of giving it AWS API access is by using iam_instance_profile. See https://packer.io/docs/builders/amazon-ebs.html#iam_instance_profile On Wed, Oct 9, 2019,

Re: [packer] Help - CoreOS/Hyperv-iso not working # Timeout waiting for SSH.

2019-10-08 Thread Rickard von Essen
DId you follow the note on the bottom of https://packer.io/docs/builders/hyperv-iso.html? Note for *nix guests: Please note that packer requires the VM to be running > a hyper-v KVP daemon in order to detect the IP address of the guest VM. On > RHEL based machines this may require installing the

Re: [packer] How to specify variable for 'bool' item

2019-10-06 Thread Rickard von Essen
See https://github.com/hashicorp/packer/issues/2630 On Sun, Oct 6, 2019, 00:57 Yusuke Masuda wrote: > Hi. > > I want to specify a variable for 'bool' type item such as > "keep_input_artifact". > > Firstly, I tried this. > "keep_input_artifact": "{{user `keep_input_artifact`}}", >: >:

Re: [packer] Packer Ansible provisioner, how to specify the host of the container/machine?

2019-09-19 Thread Rickard von Essen
oles: > https://github.com/geerlingguy/ansible-role-kubernetes#two-or-more-nodes-single-master-cluster > > On Wednesday, September 18, 2019 at 12:17:30 AM UTC-7, Rickard von Essen > wrote: >> >> Try to remove the inventory_file option >> >> On Wed, Sep 18, 2019, 07:

Re: [packer] Packer Ansible provisioner, how to specify the host of the container/machine?

2019-09-18 Thread Rickard von Essen
Try to remove the inventory_file option On Wed, Sep 18, 2019, 07:20 Kevin Galkov wrote: > Hi #packer! > > I am trying to learn more about Packer and Ansible. I think those too > along with Terraform, Bazel and jsonnet will be great to use! > > With packer I am able to pass in a playbook.yml and

Re: [packer] Can't feed kickstart file from floppy

2019-09-13 Thread Rickard von Essen
See this issue for some details https://github.com/hashicorp/packer/issues/2920 On Fri, Sep 13, 2019, 19:21 Rickard von Essen wrote: > Pretty sure floppy support in kickstart was removed in recent versions of > EL. > > On Fri, Sep 13, 2019, 16:51 Mauricio Tavares wrote: > &g

Re: [packer] Can't feed kickstart file from floppy

2019-09-13 Thread Rickard von Essen
Pretty sure floppy support in kickstart was removed in recent versions of EL. On Fri, Sep 13, 2019, 16:51 Mauricio Tavares wrote: > So I am trying to deploy a centos guest on a vmware host using packer. I want > to feed the kickstart file using the a floppy drive >

Re: [packer] Reuse object

2019-09-06 Thread Rickard von Essen
There is no way to do that currently without preprocessing. Doing it with something like jq would be fairly easy. On Fri, Sep 6, 2019, 19:40 Markku Nikkanen wrote: > Hello, > > I use same keys in tags and run_tags options: > > "builders": [ > { > "tags": { > > }, >

Re: [packer] grub config being overwritten when starting an image created with packer (Openstack/Packer/CentOS)

2019-09-04 Thread Rickard von Essen
hese are VMs. > > > > On Thursday, 29 August 2019 22:57:28 UTC+1, Rickard von Essen wrote: >> >> Could you provide some more details? What's the underlying virtualization >> system? Is this PV or HVM VM's? Etc >> >> On Thu, Aug 29, 2019, 19:34 Matt Faraday wrote: >>

Re: [packer] Help - Timeout Waiting SSH virtualbox-ovf

2019-09-04 Thread Rickard von Essen
t strange thing is that, now I was able to use boot commands to > make the login but it still get stucks in "Waiting for ssh" > > On Monday, September 2, 2019 at 5:18:38 PM UTC-3, Rickard von Essen wrote: >> >> Does that image start ssh on boot? Is network working? Can

Re: [packer] Getting packer to be able to change an image from a local GCP bucket

2019-09-04 Thread Rickard von Essen
I was just wondering which app is putting the restriction on, since I can > do this fine using AWS. > > If it is packer, then hopefully I can get someone to change it. > > If it is GCP, I can see why from them. > > Thanks, > Wes Quinn > > On Wednesday, August 21

Re: [packer] DHCP Problem while generating an image on ESXi

2019-09-04 Thread Rickard von Essen
buntu-18.04/-ubuntu-18.04.vmx > > The problem exists regardless using a E1000 or a VMXNET3 NIC. > > > Am Montag, 2. September 2019 19:52:24 UTC+2 schrieb Rickard von Essen: >> >> What's the exact output when you say there is a successful dhcp message? >> >>

Re: [packer] Re: Packer build for fails with Bundler Bundler::SudoNotPermittedError

2019-08-31 Thread Rickard von Essen
Without analyzing what's going wrong I would take the path of least resistance. Enabla password less (NOPASSWORD) for the user (ssh_username) you are using and then run chef with sudo. That should work without any problems. And if you don't want passwordless sudo just remove it after chef have

Re: [packer] VMWare-iso provisioner - disk thin provisioning

2019-08-30 Thread Rickard von Essen
ing the disk_type_id as a string, but still am facing the issue. > > On Fri, Aug 30, 2019, 10:40 AM Rickard von Essen < > rickard.von.es...@gmail.com> wrote: > >> You are supposed to use the strings and not the numbers. See >> https://packer.io/docs/builders/vmware-iso.html#disk_type_

Re: [packer] VMWare-iso provisioner - disk thin provisioning

2019-08-29 Thread Rickard von Essen
hecksum_type": "sha256", >>> "ssh_username": "{{user `ssh_username`}}", >>> "ssh_password": "{{user `ssh_password`}}", >>> "ssh_wait_timeout": "30m", >>> "cpus": "4", >>> "memory&q

Re: [packer] VMWare-iso provisioner - disk thin provisioning

2019-08-29 Thread Rickard von Essen
0m", > "cpus": "4", > "memory": "32000", > "disk_size": "68", > "disk_type_id": "5", > "headless": false, > . . . > . . . > } ], > > > Any poin

Re: [packer] Re: Debugging packer with visual studio code

2019-08-29 Thread Rickard von Essen
e so I wouldn't > have to waste my time trying to figure out why debugging doesn't work > with packer. > > On Thu, Aug 29, 2019 at 3:42 AM Rickard von Essen > wrote: > > > > Each plugin is running in a separate process and the communicates with > RCP over a socket. So u

Re: [packer] grub config being overwritten when starting an image created with packer (Openstack/Packer/CentOS)

2019-08-29 Thread Rickard von Essen
Could you provide some more details? What's the underlying virtualization system? Is this PV or HVM VM's? Etc On Thu, Aug 29, 2019, 19:34 Matt Faraday wrote: > Hi All, > > I'm facing a strange issue, where I've modified /etc/default/grub in my > image to change GRUB_CMDLINE_LINUX to add some

Re: [packer] Alternatives to vagrant post processor for aws

2019-08-29 Thread Rickard von Essen
I would just use a script wrapping the aws cli or a micro TF setup if I wanted to launch adhoc instances. On Thu, Aug 29, 2019, 02:28 Tom Rutherford wrote: > Hi All, > > The vagrant-aws project seems to be abandoned > , and my attempts to >

Re: [packer] VMWare-iso provisioner - disk thin provisioning

2019-08-29 Thread Rickard von Essen
t; however the disk is thick provisioned eager zeroed > > On Thu, Aug 29, 2019, 4:14 PM Rickard von Essen < > rickard.von.es...@gmail.com> wrote: > >> Have you looked at >> https://packer.io/docs/builders/vmware-iso.html#disk_type_id ? >> >> On Thu, Aug 29, 2

Re: [packer] VMWare-iso provisioner - disk thin provisioning

2019-08-29 Thread Rickard von Essen
Have you looked at https://packer.io/docs/builders/vmware-iso.html#disk_type_id ? On Thu, Aug 29, 2019, 11:33 Pearl D'Silva wrote: > I am trying to enable thin provisioning for the disk by using the > following: "disk_type_id": "thin", However, on vCenter, when the VM is > being provisioned, I

Re: [packer] Re: Debugging packer with visual studio code

2019-08-29 Thread Rickard von Essen
Each plugin is running in a separate process and the communicates with RCP over a socket. So using a debugger will not work (be complicated at least). But most of the Packer code is really simple and easy to follow with PACKER_LOG turned on. If that doesn't work adding some extra debug print outs

Re: [packer] Windows AMI creation on EC2

2019-08-26 Thread Rickard von Essen
To get the IP for running ansible in shell-local do: A) Run a shell provisioner that saves the IP in a file. Use a file provisioner to download it and read it in the shell-local script. Or B) use some aws tag specific to this build and run the aws cli to find the IP of that instance. I would

Re: [packer] Jenkins and Packer

2019-08-21 Thread Rickard von Essen
It seems like you have an old version of Packer. Remove it and install a new version. Also add packer version to the top of your script. On Wed, Aug 21, 2019, 23:03 Pietto Vasco wrote: > I have a strange issue where i can run packer from the cmdline without > issue. > > But when i setup a

Re: [packer] ignore building images that already exists

2019-08-21 Thread Rickard von Essen
No you can't do that. As a workaround you can use the aws cli to check if the AMI exists, if so run packer build with -exclude=amazon-ebs On Wed, Aug 21, 2019, 23:39 Khai Do wrote: > We are using packer with the amazon-ebs builder. The packer build command > throws an error when attempting to

Re: [packer] Getting packer to be able to change an image from a local GCP bucket

2019-08-21 Thread Rickard von Essen
And to use a non default source image you should set https://packer.io/docs/builders/googlecompute.html#source_image_project_id On Wed, Aug 21, 2019, 22:39 Rickard von Essen wrote: > First you have to create an image from the disk in gcs with gcloud, see > https://cloud.google.com/sdk/

Re: [packer] Export VM as ovf using packer's vmware-iso builder

2019-08-20 Thread Rickard von Essen
tup/layoutcode=us", > " console-setup/modelcode=pc105", > " debconf/frontend=noninteractive", > " preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed.cfg", > " debian-installer=en_US", > " fb=false", &

Re: [packer] Using Packer to build a windows box and provision with Ansible

2019-08-20 Thread Rickard von Essen
Don't know much about the Windows stuff but you don't need the dynamic EC2 inventory, remove it and try again. On Tue, Aug 20, 2019, 09:01 'Richard Payne' via Packer < packer-tool@googlegroups.com> wrote: > This is what I have: > > Packer JSON: > > { > "variables": { >

Re: [packer] Export VM as ovf using packer's vmware-iso builder

2019-08-20 Thread Rickard von Essen
It should. Can you please give some more details, your template, what you saw, what you expected, etc. On Tue, Aug 20, 2019, 08:53 Pearl Dsilva wrote: > I am trying to build an image using vmware-iso and want the image to be > finally exported as an ovf image. Setting the "format" configuration

Re: [packer] parallels pvm ssh timeout

2019-08-19 Thread Rickard von Essen
You need to use the VM console to troubleshoot your network. Run with -on-error=ask and you will get infinite time to it. On Thu, Aug 15, 2019, 16:29 Nelson Ramirez wrote: > I keep running into a timeout error on a builder with two shell > provisioners on parallels pvm. > > The first

Re: [packer] ovf transfer failed while building image on a remote host

2019-08-19 Thread Rickard von Essen
So you are using vmware-iso? Can you please supply your template json file and and a full Packer log from running Packer with PACKER_LOG=1 packer build template.json. On Mon, Aug 19, 2019, 22:52 Jiatong Wang wrote: > *Hi, I am using vmware workstation* > > -- > This mailing list is governed

Re: [packer] ovf transfer failed while building image on a remote host

2019-08-19 Thread Rickard von Essen
Which builder are you using? On Mon, Aug 19, 2019, 20:33 Jiatong Wang wrote: > Hi, I am trying to use `packer` to build images in a remote *esxi* host. > The build process succeeded but error happened while transferring *ovf* > back to my local machine. > > > ==> centos-7: Exporting virtual

Re: [packer] Trouble with sshd_config with packer + virtualbox + vagrant

2019-08-14 Thread Rickard von Essen
One guess would be that cloud-init might do this. On Wed, Aug 14, 2019, 19:19 Stephen Schlie wrote: > Hi Folks, > > I've run into an issue recently with packer where my output vagrant box > has password based ssh disabled by default, even when I explicitly enable > it in the last provisioner

Re: [packer] The new AMI is Building But Not Visible Using describe-images. Any ideas?

2019-08-13 Thread Rickard von Essen
This is 99% sure a permission issue with the credentials you are using to run the aws cli. Double check that. On Tue, Aug 13, 2019, 03:51 David Medinets wrote: > I am using the following JSON file to build an AMI which should be a copy > of the Amazon Linux 2 AMI. The messages say the new AMI

Re: [packer] Windows2016 guest on RHEL linux host never ending winrm loop

2019-08-13 Thread Rickard von Essen
esolv.conf: nameserver 10.xXX.XXX.21 > 00:00:31.413797 NAT: resolv.conf: nameserver 10.XX.XXX.21 > 00:00:31.413840 NAT: DNS#0: 10.XXX.XXX.21 > 00:00:31.413847 NAT: DNS#1: 10.XXX.XXX.21 > 00:00:31.413853 NAT: DHCP offered IP address 10.0.2.15 > 00:00:31.415524 NAT: DHCP offer

Re: [packer] Windows2016 guest on RHEL linux host never ending winrm loop

2019-08-13 Thread Rickard von Essen
Run with headless false, add flag --on-error=ask when this fails use the console and debug the winrm setup from the inside or check the status of the installation. On Tue, Aug 13, 2019, 13:11 Automationbuilder360 Builder < automationbuilder...@gmail.com> wrote: > Hi All, > > Am new to Packer, am

Re: [packer] Unable to SSH to the VM launched.

2019-08-09 Thread Rickard von Essen
Please supply your template, Kickstart file, scripts, and a full debug log from running Packer with PACKER_LOG=1. On Fri, Aug 9, 2019, 11:30 Mohammed Majid wrote: > Hi All, > > I am building a centos image using packer (using builder vmware-iso), the > VM comes up with the IP (Using DHCP) and

Re: [packer] * 'temporary_security_group_source_cidrs': source data must be an array or slice, got map

2019-08-08 Thread Rickard von Essen
It's a list of strings (CIDRs) [ "10.0.0.0/16" ]. On Thu, Aug 8, 2019, 09:22 John Roh wrote: > Hi there? > I need to figure out how to define mutiple cidrs while the packer build > runs. > Per documentation, temporary_security_group_source_cidrs >

Re: [packer] Re: Creating vagrant virtualbox rhel8 box with packer fails to find iso

2019-08-06 Thread Rickard von Essen
Could you explain why you think this shouldn't be happening? On Tue, Aug 6, 2019, 16:39 Stephen Pliska-Matyshak < spliskamatys...@almebezbik.com> wrote: > [image: 09_37_20.jpg] > That's a total klooge and hassle. What is different between the rhel7 iso > and the rhel8 iso that packer would need

Re: [packer] 16031 Terminated sudo shutdown -r now

2019-08-06 Thread Rickard von Essen
at 11:05 PM sasha.meltser wrote: > I am disabling IPv6 and running dracut to update kernel and need to reboot > so VM don't boot with IPv6 enabled after kernel updated > > On Monday, August 5, 2019 at 3:02:23 PM UTC-6, Rickard von Essen wrote: >> >> Is there any good reaso

Re: [packer] 16031 Terminated sudo shutdown -r now

2019-08-05 Thread Rickard von Essen
ovisioners": [ > { > "type": "shell", > "scripts": [ > "./postscripts/common/disable-ipv6.sh" >] > }, > { > "type": "shell", > "inline": ["sudo reboot"], > "expect_disconnect": true

Re: [packer] 16031 Terminated sudo shutdown -r now

2019-08-05 Thread Rickard von Essen
How does it fail? Please provide some more context. On Mon, Aug 5, 2019, 20:06 sasha.meltser wrote: > I am trying to provision CIS CentOS 7 image and its failing when I do > basic reboot. Any advice please > > { > "type": "shell", > "inline": ["sudo shutdown -r now"], > "expect_disconnect":

Re: [packer] [Ubuntu 18.04.2] Receiving "error: no such device: root" in VirtualBox/ESXi with converted from qcow2 to vmdk on cloud .img, with Packer qemu builder

2019-08-02 Thread Rickard von Essen
Could you provide some more details. I guess this is because the disk is connected in a different way making it appear as a different device. Some things to check: Where is this error comming from, VirtualBox or the Linux kernel trying to mount the boot dev? Can you show grub.conf, etc Kernel

Re: [packer] Re: Ansible as a Packer provisioner hanging?

2019-08-01 Thread Rickard von Essen
First of all your ansible.sh is broken. It does word spliting of the arguments. Fix that, see 1) (or just remove it since it doesn't add anything). Does it help? 1) https://stackoverflow.com/a/4824637/226174 On Thu, Aug 1, 2019, 04:40 Bob Tanner wrote: > Adding that I can ssh to the public IP

Re: [packer] How to communicate build data back to calling environment?

2019-07-31 Thread Rickard von Essen
You can use -machine-readable 1), but maybe that is not what you need. More likely you want information about the AMI that was built. For that look into the manifest post-processor 2) and parse this manifest file with jq etc. 1)

Re: [packer] Can't add product code to AMI

2019-07-29 Thread Rickard von Essen
I think you can't set a product code on an image unless you are the owner of that product code (i.e. the seller of the product). What are you trying to achieve? On Sun, Jul 28, 2019, 14:25 Roni Dromi wrote: > I'm pretty new to packer so it's probabely my fault, but I'm getting this > error - >

Re: [packer] vmware-iso: Waiting for SSH to become available hangs

2019-07-29 Thread Rickard von Essen
Did you enable the GuestIPHack? See https://packer.io/docs/builders/vmware-iso.html#building-on-a-remote-vsphere-hypervisor On Mon, Jul 29, 2019, 11:23 Frédéric Cuza wrote: > Hi Lynn, > > Are you sure that the network is correctly set on your VM ? I guess it is > a Centos. > Here you can find a

Re: [packer] `execute': Failed to execute: 'mount -t xfs /dev/mapper/hda1 /mnt/img-mnt' (FatalError)

2019-07-29 Thread Rickard von Essen
:49 PM UTC+3, Rickard von Essen wrote: >> >> By the way, is there any particular reason you choose instance store EC2 >> over EBS EC2's? >> >> On Sat, Jul 27, 2019, 21:51 Rickard von Essen >> wrote: >> >>> I think that is just because you use the lates

Re: [packer] `execute': Failed to execute: 'mount -t xfs /dev/mapper/hda1 /mnt/img-mnt' (FatalError)

2019-07-29 Thread Rickard von Essen
thing I'm not sure about is that it says in the docs that NVME > disks are supported in Centos7 - > https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ssd-instance-store.html > so I guess I did something wrong to get these errors :\ > > > On Saturday, July 27, 2019 at 10:51:32

Re: [packer] `execute': Failed to execute: 'mount -t xfs /dev/mapper/hda1 /mnt/img-mnt' (FatalError)

2019-07-27 Thread Rickard von Essen
By the way, is there any particular reason you choose instance store EC2 over EBS EC2's? On Sat, Jul 27, 2019, 21:51 Rickard von Essen wrote: > I think that is just because you use the latest generation of instance > which has NVMe attached disks. Try to use a previous generation w

Re: [packer] `execute': Failed to execute: 'mount -t xfs /dev/mapper/hda1 /mnt/img-mnt' (FatalError)

2019-07-27 Thread Rickard von Essen
> https://aws.amazon.com/marketplace/pp/Centosorg-CentOS-7-x8664-with-Updates-HVM/B00O7WM7QW > Thanks again!! > > On Thursday, July 25, 2019 at 9:59:58 PM UTC+3, Rickard von Essen wrote: >> >> Hi, >> >> It was a couple of years since I last built an instance

Re: [packer] Packer qemu image on hypervisor.

2019-07-25 Thread Rickard von Essen
Yes but you have to enable nested virtualization on the VM instance. On Thu, Jul 25, 2019, 11:42 Toan Huynh Van wrote: > Hi, > > I have a VM on Openstack, I wan to build qemu image on this VM. So, Can I > build qemu image like that ? > > I tried but failed as below: > > [image: Capture.PNG] > >

Re: [packer] How to use gcloud util to wait for the end of gcloud compute instances create script action

2019-07-25 Thread Rickard von Essen
Packer writes the state of the startup script to this instance metadata key, see https://github.com/hashicorp/packer/blob/master/builder/googlecompute/startup.go#L8 On Thu, Jul 25, 2019, 03:06 zhiyu zeng wrote: > I want to wait for script action finished and I have tried searching but > could

Re: [packer] virtualbox-iso: sudo: no tty present and no askpass program specified

2019-07-24 Thread Rickard von Essen
Ok, and you need passwordless sudo. If you need to pass a password see examples in the docs for howto do that or check the bento repo. And I see you already got a hand with this in the other thread. On Wed, Jul 24, 2019, 18:19 Rickard von Essen wrote: > Set ssh_pty to true. > &

Re: [packer] virtualbox-iso: sudo: no tty present and no askpass program specified

2019-07-24 Thread Rickard von Essen
Set ssh_pty to true. https://packer.io/docs/templates/communicator.html#ssh_pty On Wed, Jul 24, 2019, 08:48 Tekchand Dagar wrote: > Hello Team, > > I am creating Virtualbox image for Ubuntu18.04. VM is registering but its > end with error at provisoners part. > > Below is the error: > > {==>

Re: [packer] Issues installing vmware tools - using packer and vsphere-iso builder

2019-07-23 Thread Rickard von Essen
iso_paths is for specifying multiple alternative urls for the same iso. Instead put the tools iso in the http_directory or somewhere else where you can reach it and download it to the VM. Then use the procedure used here *) to install it. *)

  1   2   3   4   5   6   7   8   9   >