Re: [packer] Re: Packer for Microsoft Surface Windows 10 Deployments?

2018-02-01 Thread Rickard von Essen
Yes Packer is probably not the tool you are looking for. It's more for creating immutable cloud and VM images. On Feb 1, 2018 22:32, "Larry Velez" wrote: > > I might have googled my way to one possible answer to what I am looking > for which might be more in line with our laptop needs than Packe

Re: [packer] Syntax question: User variables for non-string values

2018-01-31 Thread Rickard von Essen
Hmm check the plugin and it looks correct. Can you share your template and command line when you get this error? On Jan 31, 2018 20:00, "Rickard von Essen" wrote: > I think you are reading the error message backwards. Packer converts the > value to a number, but the plugin (whi

Re: [packer] Syntax question: User variables for non-string values

2018-01-31 Thread Rickard von Essen
I think you are reading the error message backwards. Packer converts the value to a number, but the plugin (which is unknown to me) expects a string. I think this is probably a bug in the plugin. On Jan 31, 2018 19:08, "Kevin Milner" wrote: > Hello, > In my variables portion I want to be able to

Re: [packer] how to get exit status of powershell script in packer

2018-01-30 Thread Rickard von Essen
That is how it works out of the box, see https://www.packer.io/docs/provisioners/powershell.html#valid_exit_codes On 30 January 2018 at 13:19, shailender chauhan < shailendersinghchau...@gmail.com> wrote: > Hi, I would like to cancel Packer AMI creation if one of my provisioner > powershell scrip

Re: [packer] How to pass vm_name to script-local provisioner?

2018-01-26 Thread Rickard von Essen
if [[ $# != 0 ]];then >> >> >> while getopts ":i:n:g:s:t:f:dvh" Option >> do >> case $Option in >> i ) _IP=$OPTARG;; >> n ) _NM=$OPTARG;; >> g ) _GW=$OPTARG;; >> * s ) _HN=$OPTARG;;* >> >> On S

Re: [packer] How to pass vm_name to script-local provisioner?

2018-01-26 Thread Rickard von Essen
See https://www.packer.io/docs/provisioners/shell.html#default-environmental-variables On Jan 26, 2018 17:57, "'Andreas Sommer' via Packer" < packer-tool@googlegroups.com> wrote: > { >> "type": "shell-local", >> "command": "env vm_name={{user `vm_name`}} ./packer/scripts/do-something- >> with-nam

Re: [packer] how can do "VBoxManage modifyvm" operation before export vm ?

2018-01-24 Thread Rickard von Essen
t; > > > On Thursday, January 25, 2018 at 1:33:39 PM UTC+8, Rickard von Essen wrote: >> >> You are missing on pair of [ ] in your vboxmanage_post command, it should >> be: >> >> "vboxmanage_post": [ >> ["modifyvm", "{{.Name}}",

Re: [packer] how can do "VBoxManage modifyvm" operation before export vm ?

2018-01-24 Thread Rickard von Essen
[--ioapic on|off] > 2018/01/25 10:26:44 packer: [--hpet on|off] > 2018/01/25 10:26:44 packer: > [--triplefaultreset on|off] > 2018/01/25 10:26:44 packer: [--apic on|off] > 2018/01/25 10:26:44 packer: [--x2apic on|off]

Re: [packer] how can do "VBoxManage modifyvm" operation before export vm ?

2018-01-24 Thread Rickard von Essen
"export_opts": > [ > "--manifest", > "--vsys", "0", > "--description", "create vm with nat and then change to bridged", > "--version", "2.0" > ], > "source_path"

Re: [packer] Packer preseed debian not work

2018-01-24 Thread Rickard von Essen
1) You really want >> to add to the /etc/sshd_config, your single > truncates the file. 2) Don't sudo if you run as root. Instead of reinventing the wheel start with a well-known template such as https://github.com/chef/bento and adapt in small iterations. My general advice is when you run into p

Re: [packer] how can do "VBoxManage modifyvm" operation before export vm ?

2018-01-24 Thread Rickard von Essen
See https://www.packer.io/docs/builders/virtualbox-iso.html#vboxmanage_post On Jan 24, 2018 14:11, "JerryWang" wrote: > this steps should be done after provioner ( and vm was poweroff ), where > to put this operation ? builder ? or post-processor ? > thanks. > > -- > This mailing list is gov

Re: [packer] does packer 1.1.3 support bridged mode ?

2018-01-21 Thread Rickard von Essen
Bridge mode works, but as Alvaro said packer can't know the IP of the guest. So either you run with a fixed IP or you add the bridge network but also keep the nat if. On Jan 22, 2018 08:26, "Alvaro Miranda Aguilera" wrote: > the nat mode will use the host networking to reach the network, why you

Re: [packer] How do YOU version and store your completed packer images?

2018-01-20 Thread Rickard von Essen
We just include the git short hash in the name of the image (AMI) and tag with source AMI. But we only build cloud images and only for internal use. On Jan 19, 2018 22:55, "Nate Dobbs" wrote: > This isn't an issue for packer per se but this may be the best place to > discuss the topic. Those of

Re: [packer] Error executing packer build on Ubuntu VM (Xenial)

2018-01-20 Thread Rickard von Essen
Can you share your packer template? On Jan 20, 2018 06:01, "HSB" wrote: > Hi, Created new VM Box using Vagrant. I can SSH and also connect to > internet from that host. > > But when I execute packer build (type: lxd) with shell commands for ubuntu > updates, I get following error. I can CURL all

Re: [packer] amazon-import post-processor fails with minimum field size of 1, CreateMultipartUploadInput.Key

2018-01-16 Thread Rickard von Essen
How does your template look? On Jan 15, 2018 21:35, "Louis Mayorga" wrote: > found error: Failed to upload packer-win2016gui-vmware/packer-vmware-iso.ova: > InvalidParameter: 1 validation error(s) found. minimum field size of 1, > CreateMultipartUploadInput.Key. > > I thought that i was probably

Re: [packer] Re: Having problems creating an image with Packer in Rackspace

2018-01-15 Thread Rickard von Essen
Thanks for sharing the solution! On Jan 15, 2018 19:52, "Patrick Slattery" wrote: > I was able to resolve my issues by the following steps: > > 1) I used a HTTP proxy (Fiddler on Windows) to determine exactly what > errors were being returned by the Rackspace API, this lead me to believe > that

Re: [packer] GCP - Build image from source_image is actually a bootable disk?

2018-01-09 Thread Rickard von Essen
> > Lucky > > > On Friday, January 5, 2018 at 3:06:01 PM UTC-8, Rickard von Essen wrote: >> >> To my knowledge it's not possible. Do you have an imported boot disk? >> >> On Jan 4, 2018 23:33, "Lucky" wrote: >> >>> Hi >

Re: [packer] VirtualBox Guest Additions: modprobe vboxsf failed

2018-01-06 Thread Rickard von Essen
Most likely this is because you are building against a newer kernel version that you just installed (with apt-get update etc) but is not yet running since you haven't rebooted. See how bento does it: https://github.com/chef/bento/blob/master/_common/virtualbox.sh https://github.com/chef/bento/blob

Re: [packer] why packer stop for any error?

2018-01-06 Thread Rickard von Essen
, ask(retry) > > sometimes I know the error is not critical and cannot avoid it for some > reason, seems no way to ignore the error to continue build box? > > BR/ > Robert > > > On Saturday, January 6, 2018 at 2:32:09 AM UTC-5, Rickard von Essen wrote: >> >> Pac

Re: [packer] why packer stop for any error?

2018-01-05 Thread Rickard von Essen
Packer always stops when script exits with a non zero exit code. Try adding "set -x" at the top of your script (after the shebang) and se why it fails. You can also run packer build with -on-error=ask to get time to ssh into the VM and research the state it is in when it fails. On 6 January 2018

Re: [packer] Re: Does anyone have a working example of Ubuntu Xenial host, builder=LXD, provisioner=ansible (remote)

2018-01-05 Thread Rickard von Essen
turday, January 6, 2018 at 4:22:18 AM UTC+1, Peter Goodall wrote: > > Thanks Rickard, > > "extra_arguments": ["-v"] > > --Peter G > > On Saturday, January 6, 2018 at 10:07:49 AM UTC+11, Rickard von Essen > wrote: >> >> I think

Re: [packer] Re: Does anyone have a working example of Ubuntu Xenial host, builder=LXD, provisioner=ansible (remote)

2018-01-05 Thread Rickard von Essen
I think I have that somewhere, let me get back with it tomorrow. What's your extra_arguments to ansible? On Jan 5, 2018 09:09, "Peter Goodall" wrote: > also... the lxd builder runs shell commands fine remotely on the guest. > > -- > This mailing list is governed under the HashiCorp Community G

Re: [packer] GCP - Build image from source_image is actually a bootable disk?

2018-01-05 Thread Rickard von Essen
To my knowledge it's not possible. Do you have an imported boot disk? On Jan 4, 2018 23:33, "Lucky" wrote: > Hi > > I was wondering, if there's equivalent in packer to create an image out of > GCE's instance bootable disk?. > > Something what gcloud cli suggests, such as > gcloud compute --proje

Re: [packer] centos7.4: ssh unable to authenticate, attempted methods [none], no supported methods remain

2018-01-05 Thread Rickard von Essen
Run packer build -on-error=ask template.json And debug your network setup from the console. On Jan 5, 2018 10:46 PM, wrote: > That's a typo and has been fixed. Somehow, only one build passed the > waiting for ssh stage and almost succeeded. But when I repeated the build, > it started to fail ag

Re: [packer] Packer/Terraform VSphere Template Incompatibility

2018-01-01 Thread Rickard von Essen
Seems that there is missing some alignment there. When you have done some research feel free to open a new issue either on Packer or Terraform to get them aligned. On Jan 1, 2018 23:38, "Dave Woodward" wrote: > In a nutshell, the Packer vsphere-template post processor is clearing the > UUID whil

Re: [packer] How to call a builder from within another plugin in Packer?

2017-12-28 Thread Rickard von Essen
I think as Alvaro said the simplest solution is to build a small wrapper script and pass the source_image in as a variable. Another better alternative is to implement something similar to amazon's source_ami_filter 1) and open a PR to include this in the openstack builder. 1) https://www.packer.io

Re: [packer] mac os x installation problems

2017-12-21 Thread Rickard von Essen
lp. Wish there was an easy way for me to buy you a cup of > coffee > > On Thu, Dec 21, 2017 at 9:17 AM, Rickard von Essen < > rickard.von.es...@gmail.com> wrote: > >> It looks like you copied this from a PDF or something similar because if >> I look really closely i

Re: [packer] mac os x installation problems

2017-12-21 Thread Rickard von Essen
e build: false > 2017/12/21 08:47:25 On error: > 2017/12/21 08:47:25 Waiting on builds to complete... > 2017/12/21 08:47:25 Builds completed. Waiting on interrupt barrier... > 2017/12/21 08:47:25 ui: > ==> Builds finished but no artifacts were created. > 2017/12/21 08:47:25 [INF

Re: [packer] mac os x installation problems

2017-12-21 Thread Rickard von Essen
There should only be one binary nowdays. If you run: PACKER_LOG=1 packer build template.json You will get a debug log. Paste it here and I'll think it will be easy to help. / Rickard PS. Awesome book ;-) On Dec 21, 2017 13:30, "Gray Jones" wrote: > I have tried to install on a mac os x laptop.

Re: [packer] 'stuck' at ==> amazon-ebs: Waiting for instance

2017-12-18 Thread Rickard von Essen
"Primary": true, >>> "PrivateIpAddress": "172.31.89.61", >>> "Association": { >>> "IpOwnerId": "amazon", >>>

Re: [packer] virtualbox-iso - can not ssh into installed VM (packer version 1.1.2) on Debian 8.0

2017-12-16 Thread Rickard von Essen
You probably just have to set the IP in ssh_host, see https://www.packer.io/docs/templates/communicator.html#ssh_host On Dec 16, 2017 14:29, wrote: Hi Alvaro, Thanks for quick response, I've attached the 'myproduct.json'. VM comes up with IP 172.15.0.40 (private IP) and I can ping other hosts i

Re: [packer] Re: packer centos7 no dhcp

2017-12-15 Thread Rickard von Essen
Doesn't services --disabled=NetworkManager make dhcp not run automatically. I think you should get everything running before changing the default network setup. On 15 December 2017 at 06:54, Shankar Bala wrote: > hi > > below is my kickstart file > > === > > > # KICKSTART > > ##key --s

Re: [packer] Re: packer centos7 no dhcp

2017-12-14 Thread Rickard von Essen
Please supply your Kickstart file. On Dec 15, 2017 05:28, "Ian W" wrote: > Do you have something like the following in your kickstart file: > > network --bootproto=dhcp --device= --activate > > > > On Thursday, December 14, 2017 at 11:23:02 PM UTC-5, Shankar Bala wrote: >> >> Hi All >> >> I hav

Re: [packer] 'stuck' at ==> amazon-ebs: Waiting for instance

2017-12-14 Thread Rickard von Essen
> Or perhaps I have some Amazon IAM issue? I used the suggested IAM template > out of the documentation. > > On Dec 14, 2017 3:29 AM, "Rickard von Essen" > wrote: > >> That exact template worked for me. >> >> On 14 December 2017 at 06:21, Ian W wrote: &g

Re: [packer] 'stuck' at ==> amazon-ebs: Waiting for instance

2017-12-14 Thread Rickard von Essen
That exact template worked for me. On 14 December 2017 at 06:21, Ian W wrote: > It always fails the 'waiting for instance' stage. > I have tried various sizes of instance_type > > ==> amazon-ebs: Adding tags to source instance > amazon-ebs: Adding tag: "Name": "Packer Builder" > 2017/12/13 2

Re: [packer] vmware-iso builder, "keep_input_artifact": true, "No supported hardware versions"

2017-12-13 Thread Rickard von Essen
Packer doesn't manage the content of the ovf. On Dec 13, 2017 23:44, wrote: > Not sure if this is a packer issue, Virtualbox issue, or a VMware issue. > Starting here with packer. > > Creating images with packer 1.1.3 and have "keep_input_artifact": true. > > I assumed the output-virtualbox-iso/

Re: [packer] Is there anyone who know the way that make single master redis to master-slave ?

2017-12-11 Thread Rickard von Essen
This is probably better directed to the terraform list instead of the packer user list. On Dec 11, 2017 16:32, "Hyeongseob Kim" wrote: > Hi everyone! > > I'm using terraform for my project. > and I met critical problem with terraform. > > > First, I created redis using following terraform module

Re: [packer] Is there an example on how to build docker image using salt provisioner for cassandra?

2017-12-11 Thread Rickard von Essen
], > > "post-processors": [ > > [ > > { > > "type": "docker-tag", > > "repository": "hello/cassandra-demo", > > "tag": "0.1" > > } > >

Re: [packer] Is there an example on how to build docker image using salt provisioner for cassandra?

2017-12-11 Thread Rickard von Essen
I can use > to spawn a container. > > when I run packer build packer.json I get the following > > *==> docker: Exporting the container* > > *==> docker: Killing the container: > b33b07f7f0ecf5026574d29ee28aed0f71659ae11955994ac27fca060c7e7c22* > > *Build &#

Re: [packer] Is there an example on how to build docker image using salt provisioner for cassandra?

2017-12-10 Thread Rickard von Essen
See my answer on SO https://stackoverflow.com/a/47747555/226174 On 10 December 2017 at 22:12, kant kodali wrote: > Can anyone here provide a simple working example using my packer.json file > in my previous email ? That would be super helpful since I can try running > things myself and understan

Re: [packer] Packer + vmware-iso + ESX | VM created with disconnected network interface

2017-12-09 Thread Rickard von Essen
Compare your network settings with the one in: https://github.com/hashicorp/packer/issues/5303 And this suggest that you need "ethernet0.networkName", see https://github.com/hashicorp/packer/issues/4540 And packer will not work if there is a vmotion event, see https://github.com/hashicorp/packer/

Re: [packer] Packer on OSX which virtual platform?

2017-12-09 Thread Rickard von Essen
> > So my questions > 1) which would mac users recommend specifically for working with packer > Vmware or Virtualbox > Parallels Pro is also a good option, even it's a bitt more expensive, but you get more features, especially if you want to run Windows on your mac. > 2) Does the basic version of

Re: [packer] Managing remote SSH authorized_key file

2017-12-08 Thread Rickard von Essen
not very convenient). On 6 December 2017 at 06:30, Justin Keller wrote: > Sorry, builder is amazon-ebs. > > On Tue, Dec 5, 2017 at 9:26 PM, Rickard von Essen < > rickard.von.es...@gmail.com> wrote: > >> Which builder are you using? >> >> On Dec 6, 2017 04:0

Re: [packer] Managing remote SSH authorized_key file

2017-12-05 Thread Rickard von Essen
Which builder are you using? On Dec 6, 2017 04:06, "Justin" wrote: > What is the recommend way to add SSH public keys to a remote user's > authorized_keys? Should I just use the file provisioner and transfer a > complete authorized_keys into ~/.ssh? Is there a specific module for this? > Thanks.

Re: [packer] packer, Windows 10, virtualbox, vnc vs rdp?

2017-12-02 Thread Rickard von Essen
Pretty sure that is VRDP which is a superset of RDP. Do you have anything that backs up that it's actually VNC? // Rickard On 3 December 2017 at 07:19, wrote: > Building a Windows 10 virtualbox image from https://github.com/ > StefanScherer/packer-windows.git > > $ packer build -only=virtualbox

Re: [packer] packer ansible centos [Errno 13] Permission denied

2017-12-02 Thread Rickard von Essen
Can you share your playbook or something that reproduces the problem? On Dec 3, 2017 02:32, "Rajinder Singh" wrote: > I am baking an image in Azure using packer. > Base image is Centos 7.4 > > If I run packer from MacOS image bakes successfully. > If I try to bake the exact same image from Ubunt

Re: [packer] Re: Packer VirtualBox hang

2017-11-28 Thread Rickard von Essen
Maybe you have a firewall on your host intercepting the traffic. Try adding -on-error=ask and do some troubleshooting of your network set up. On Nov 28, 2017 12:15 PM, wrote: > FYI: Goal is to provision to vSphere. > > -- > This mailing list is governed under the HashiCorp Community Guidelines -

Re: [packer] Cannot get preseed file - How to enable bridged mode in virtualbox-iso

2017-11-25 Thread Rickard von Essen
lect enp0s3 > > # To set a different link detection timeout (default is 3 seconds). > # Values are interpreted as seconds. > #d-i netcfg/link_detection_timeout string 10 > > # If you have a slow dhcp server and the installer times out waiting for > # it, this might be useful. &g

Re: [packer] Cannot get preseed file - How to enable bridged mode in virtualbox-iso

2017-11-25 Thread Rickard von Essen
may be because of that > the pressed.file is not accessible for the VM > > Correct me if i'm wrong and what could be the problem to retrieve the > preseed file. > > Regards > Valli > > On Sunday, 26 November 2017 01:03:09 UTC+5:30, Rickard von Essen wrote: >> &g

Re: [packer] Cannot get preseed file - How to enable bridged mode in virtualbox-iso

2017-11-25 Thread Rickard von Essen
Just to clearify, why do you need a bridged network? On Nov 25, 2017 20:04, "valli nayagam" wrote: Hello everyone, I'm newbie to packer, I'm trying to install debian os in virtualbox. But it looks network is not connected with host machine and failed to retrieve the preseed file. Json file: {

Re: [packer] Re: "Packer" Ansible connection for WinRM breaks on Ansible

2017-11-24 Thread Rickard von Essen
You can use a shell and file provisioner to pass the ip to the host. Similar to this example (but you need to change hostname to ip etc.) "provisioners": [ { "type": "shell", "inline": [ "hostname > /tmp/hostname" ] }, { "type": "file", "direction": "download", "source":

Re: [packer] Re: Packer + Ansible -> Windows

2017-11-23 Thread Rickard von Essen
Here you go https://github.com/Diabol/packer-demo/blob/master/windows-cloud-ansible.json On Nov 23, 2017 17:57, "SurferL" wrote: > Another point to add, is that it pretty much always fails on long > playbooks / roles (with multiple installations via win_chocolatey for > example), but works fine

Re: [packer] Shell-local on Windows

2017-11-23 Thread Rickard von Essen
ws-shell... > > On Thursday, 23 November 2017 14:23:28 UTC, Rickard von Essen wrote: >> >> Shell-local would run on your host, ie your macOS machine. >> >> On 23 November 2017 at 15:13, SurferL wrote: >> >>> Running Packer on MacOS -> to setup a Windo

Re: [packer] Shell-local on Windows

2017-11-23 Thread Rickard von Essen
Shell-local would run on your host, ie your macOS machine. On 23 November 2017 at 15:13, SurferL wrote: > Running Packer on MacOS -> to setup a Windows machine > > I have Cygwin installed on my Windows machine and would like to use that > for a "shell-local" command, rather than the default comm

Re: [packer] Packer EBS volume encryption

2017-11-23 Thread Rickard von Essen
7b1aaf7afb22046) to become > ready: unexpected state 'shutting-down', wanted target 'running' > > ==> Builds finished but no artifacts were created. > Finished: FAILURE > Build step 'Packer' marked build as failure > Warning: you have no plugins pro

Re: [packer] Packer EBS volume encryption

2017-11-23 Thread Rickard von Essen
ome ready: unexpected state 'shutting-down', > wanted target 'running' [0m > > ==> Some builds didn't complete successfully and had errors: > --> amazon-ebs: Error waiting for instance (i-xxx) to become > ready: unexpected state 'shutting-down&

Re: [packer] Packer EBS volume encryption

2017-11-22 Thread Rickard von Essen
Unfortunately that doesn't seem to be supported. See http://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_EbsBlockDevice.html and http://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_RunInstances.html As a workaround you can prepare a CMK encrypted (empty) snapshot and attach that in you

Re: [packer] Openstack provider, create an image from iso?

2017-11-16 Thread Rickard von Essen
To my knowledge that doesn't work on openstack. Use qemu and create a raw disk locally and then import it to OS. On Nov 16, 2017 14:18, "MartinKenneth Michalsky" wrote: > Hi, I was reviewing the posts and the documentation, I did not find a way > to create an openstack image starting from a loca

Re: [packer] Packer on xenial = Builds finished but no artifacts were created.

2017-11-15 Thread Rickard von Essen
Rubber ducking ;) -only=virtualbox-iso On Nov 16, 2017 06:52, wrote: > I don't think this is a bug, feels like a knowledge problem on my part, > post here vs opening an issue. > > I use packer on macOS all the time, I've been tasked with setting up > packer on a Xenial (linux) machine. > > Foll

Re: [packer] Unable to run serverspec test on GCP packer instance

2017-11-14 Thread Rickard von Essen
See my answer on SO https://stackoverflow.com/a/47301671/226174 On 15 November 2017 at 00:02, noisy noisyBits wrote: > Hi all, > > I am struggling to run serverspec test on GCP packer instance from local > machine. > I have created a packer json config file as follows to create an image on > GC

Re: [packer] how to fix the issue caused by the deprecated api of OpenStack.

2017-11-14 Thread Rickard von Essen
I think you are correct on all points. I think the best way to solve this is to open an issue on github and gather relevant facts (as you already started to do). Most important is to reference in which OS version this was dropped and figuring out if there is any non EOL version of OS that needs th

Re: [packer] Packer running in Container with Ansible does not elevate privileges on ubuntu.

2017-11-10 Thread Rickard von Essen
Could you provide your template and playbook? On 10 November 2017 at 15:23, Travis Stevens wrote: > This question mixes Ansible and Packer as I am having a lot of problems > locating the issue. > We have a build server that currently executes an Ansible playbook that > calls packer to create new

Re: [packer] Packer ansible ubuntu vm in azure sudo password required error

2017-11-06 Thread Rickard von Essen
Hard to say with just fragments of your template etc. But verify that you have NOPASSWD set in /etc/sudoers.conf for the user connecting to the VM and that it don't require tty (requiretty). If those doesn't help you supply a full template and scripts/playbook. On Nov 7, 2017 07:03, "Rajinder Si

Re: [packer] Reference AMI used in Creation from Shourc_filter_ami

2017-11-06 Thread Rickard von Essen
See https://www.packer.io/docs/builders/amazon-ebs.html#tags On Nov 6, 2017 18:33, wrote: > I am using source_filter_ami to select the latest AMI and it is working > great. Is there a way I can reference the AMI the source filter selected so > I can Tag the new AMI with what source AMI was used

Re: [packer] Failed to initialize build 'amazon-ebs': builder type not found:

2017-11-02 Thread Rickard von Essen
You can't interpolate type and it wouldn't help much since they generally will have different options. If you really want to template type you can preprocess your template (with sed etc.). On Nov 2, 2017 22:04, "Sabitha M" wrote: > Hi , > > Here is my packer template. I am trying to pass command

Re: [packer] TCP Connection to SSH ip/port failed

2017-11-02 Thread Rickard von Essen
VirtualBox network is a bit quirky. By default packer sets up nat for ssh. So by default it ssh to 127.0.0.1: where this is NAT'ed to the guest IP port 22. If you want to suppress this see https://www.packer.io/docs/builders/virtualbox-iso.html#ssh_skip_nat_mapping But if you are just learning Pac

Re: [packer] Disable preloading openstack extensions during VM stop

2017-10-31 Thread Rickard von Essen
It was some time since I worked with OS but I think they actually deprecated extentions in favor of micro versions. Maybe the hole dependency on extensions can be removed. It would be great to get some up-to-date facts on the current situation. On Oct 31, 2017 16:34, wrote: > Would it be possib

Re: [packer] Use Ansible-local with python3 from packer in aws

2017-10-31 Thread Rickard von Essen
There is not much magic here, packer just executes "ansible-playbook" (see https://www.packer.io/docs/provisioners/ansible-local.html#command). Di you place the ansible.cfg in the correct directory? On Oct 31, 2017 14:19, "Tim Coote" wrote: > Is there a way to get the packer ansible-local provi

Re: [packer] Re: OpenStack v3 service catalog empty

2017-10-26 Thread Rickard von Essen
can you get the service catalog with the cli with the same creds? On 26 October 2017 at 15:57, Holger Protzek wrote: > Debugging this with a test case: > > catalog, err := result.ExtractServiceCatalog() > if err != nil { > return err > } > > returns for catalog > > len:0, cap:0 > > without an er

Re: [packer] Parallel post-processing in Packer ???

2017-10-25 Thread Rickard von Essen
What's the structure of your post-processor section in your packer template? Is it a sequence? On Oct 25, 2017 18:20, "John C" wrote: > Currently I'm using Packer to build a VMWare template and then have > configured the post-processor section of the JSON with multiple vsphere > tasks, to copy t

Re: [packer] Re: Docker builder with CMD doesn't work

2017-10-20 Thread Rickard von Essen
It is executed but in it's own shell since you use the shell form not the exec form. See https://www.ctl.io/developers/blog/post/dockerfile-entrypoint-vs-cmd/ On Oct 20, 2017 23:09, "Raghava Karthik" wrote: > I can see the command " /bin/sh -c source /etc/environments" in docker >> inspect , bu

Re: [packer] Docker builder with CMD doesn't work

2017-10-20 Thread Rickard von Essen
Could you justify "doesn't work", for example what's the output of "docker inspect "? On 20 October 2017 at 16:10, Raghava Karthik wrote: > I was trying to run a command using CMD along with ENTRYPOINT (entrypoint > works perfectly). > All i want to do is load environment variables "source /etc/

Re: [packer] -on-error=ask not working, vsphere post-processor diagnostic not shown

2017-10-20 Thread Rickard von Essen
d on github? Thanks! > > On Friday, 20 October 2017 17:38:21 UTC+13, Rickard von Essen wrote: >> >> you see no value whatsoever in adding an ability to preserve the VM after >>> post-processor starts running and then fails in order to investigate the VM >>> state?

Re: [packer] -on-error=ask not working, vsphere post-processor diagnostic not shown

2017-10-19 Thread Rickard von Essen
t consistently work all the > way through? > > Cheers, > Andrew > > On Thursday, 19 October 2017 17:37:42 UTC+13, Rickard von Essen wrote: >> >> 1) the -on-error only influence the execution of builders (which >> provisioning is a part of). That should be made clear

Re: [packer] Assistance in Puppet/Packer/VirtualBox

2017-10-19 Thread Rickard von Essen
It should be pretty straight forward. Start with something that works, say a bento box 1). When you got a hang of that just add your customisations with puppet-server provisioner 2). If you have any problems on the way just send a question here. // Rickard 1) https://github.com/chef/bento/ 2) ht

Re: [packer] -on-error=ask not working, vsphere post-processor diagnostic not shown

2017-10-18 Thread Rickard von Essen
1) the -on-error only influence the execution of builders (which provisioning is a part of). That should be made clear in the docs. 2) unfortunately stdout/stderr gets swallowed, it looks like someone intended it to be passed to packer but did it wrong. (in the meantime the best way to troubleshoo

Re: [packer] Packer VMware Workstation deployment to vSphere

2017-10-17 Thread Rickard von Essen
2300218 is a canary value set when SSH is disconnected without the server closing the channel. Usually this happens when you restart/upgrade sshd or reboots in a script. See https://www.packer.io/docs/provisioners/shell.html#expect_disconnect expect_disconnect should only be set to true if you un

Re: [packer] Packer for initial Puppet / Jenkins servers

2017-10-16 Thread Rickard von Essen
A snapshot (AMI) is much more predictable than launching an EC2 with a gigantic user-script that installs a big system. The draw back is that you have to re-spin the image regularly to update. I immutable servers have the same pros and cons regardless if they are the core of your infrastructure man

Re: [packer] insufficient Packer debug-messages

2017-10-16 Thread Rickard von Essen
Can you open an issue for this. Quickly checking the code it seems that we just should add a .Error() whenever we get an error in OpenStack. // Rickard On 16 October 2017 at 10:08, Jean-Gert Nesselbosch wrote: > > hello everybody, > > I'm evaluating Packer (in an openstack-context) for my compa

Re: [packer] Packer build based on command output

2017-10-14 Thread Rickard von Essen
Haven't done that my self. One way of accomplice this is to use as a file provisioner to download a status file and wrap packer with a script that determines if the build was failed or aborted due to no updates. On 29 September 2017 at 22:09, 'Sean O'Reilly' via Packer < packer-tool@googlegroups

Re: [packer] Re: Packer Build stopping too soon before everything is downloaded and installed.

2017-10-13 Thread Rickard von Essen
You need to wait for cloud-init to finish, see https://www.digitalocean.com/community/questions/how-to-make-sure-that-cloud-init-finished-running Cloud-init is best suited for setting up access related things (which might be impossible with a provisioner). Cloud-init only reports errors to a log f

Re: [packer] Re: "consume" files generated by other Packer Build processes

2017-10-11 Thread Rickard von Essen
upposed to > be used as part of CI/CD please set me straight... but we'd really hate to > stop using it because Packer really is such a great tool that solves all of > our problems save this one minor disconnect. > > Thanks, > Jon A > > > > On Tuesday, October 10,

Re: [packer] Ansible provisioner isn't working with packer

2017-10-11 Thread Rickard von Essen
It's really hard for me to help much more without a full repro case. The general advice I can give is to use a existing ssh_keypair that you have access to and run with --on-error=ask and wait for ansible to fail, jump into the instance and troubleshoot (check syslog and auth logs). Just to give y

Re: [packer] Packer hangs when building a VM image from a CentOS VM

2017-10-11 Thread Rickard von Essen
Yes it works nicely. If you provide some details and explain how you troubleshooted this we might be able to help you out. On Oct 11, 2017 18:18, "Paul Chen" wrote: > I try to run Packer on a CentOS VM spawn from OpenStack but it hangs w/o > error messages. Is it ever possible to use Packer to b

Re: [packer] Ansible provisioner isn't working with packer

2017-10-10 Thread Rickard von Essen
Then add - as extra args to ansible and rerun packer with PACKER_LOG=1. If you don't find the problem try posting the log here. On Oct 11, 2017 07:54, "rick turner" wrote: > But still not working with packer > > On Wednesday, October 11, 2017 at 10:57:31 AM UTC+5:30, rick turner wrote: >> >>

Re: [packer] Ansible provisioner isn't working with packer

2017-10-10 Thread Rickard von Essen
Seems like your user is not allowed to do sudo without password. On 11 October 2017 at 06:00, rick turner wrote: > Description: > - > I am trying to execute a ansible playbook in my base.json but it's > throwing me permission related errors: > > Error: > --- > amazon-ebs: fat

Re: [packer] Re: "consume" files generated by other Packer Build processes

2017-10-10 Thread Rickard von Essen
The situation is the same. It's not possible and it steps away a bit from the purpose of Packer. Regarding the null builder it's main purpose is to speed up development of provisioners and their script, since you can quickly iterate over them without the need of launching and destroying instances.

Re: [packer] Ansible remote provision with LXC not working

2017-10-08 Thread Rickard von Essen
Hi, A LXC container doesn't run sshd. To run ansible against one you need to use a custom connection plugin like this 1). You can compare with the custom connection plugin used for WinRM which is in the docs. When you have a working example it would be awesome if you could post it here. 1) http

Re: [packer] Openstack builder - source image url

2017-10-06 Thread Rickard von Essen
I can confirm that that is how it works. On Oct 6, 2017 14:08, "Alvaro Miranda Aguilera" wrote: > Hello > > I am not 100% sure, but seems is the url of the image you already have in > the openstack. > > Checking this, looks like it use the id to find the url, or you can just > use the url. > > h

Re: [packer] virtualbox-iso: Step "StepOutputDir" failed, aborting.

2017-09-28 Thread Rickard von Essen
You have to define *all* user variables is the "variables" block. "output_directory": "{{user `output_directory`}}", but: "variables" : { "ssh_username": "root", "ssh_password": "solidfire", "headless": "true" }, On 27 September 2017 at 23:06, wrote:

Re: [packer] Packer + VCenter + KickStart

2017-09-26 Thread Rickard von Essen
Hi, That totally makes sense, or at least to create VM templates for those VMs. I don't have any ESXi templates at hand but a quick search on github found me these that looks right: https://github.com/sdorsett/packer-centos7-esxi If you start by getting them to run on your system, and if you have

Re: [packer] CentOS template in Cloudstack

2017-09-19 Thread Rickard von Essen
buntu builds but not for CentOS > > I got the previous log messages from /var/log/messages but that's all > there was relating to "cloud" > > On Tuesday, September 19, 2017 at 2:45:10 PM UTC+1, Rickard von Essen > wrote: >> >> So then the problem is that the

Re: [packer] CentOS template in Cloudstack

2017-09-19 Thread Rickard von Essen
e: > Yes, that was the link I used to get the public key into my > authorized_keys file > > On Tuesday, September 19, 2017 at 2:31:09 PM UTC+1, Rickard von Essen > wrote: >> >> Does curl http://192.168.1.1/latest/meta-data/public-keys give you the >> pub key for

Re: [packer] CentOS template in Cloudstack

2017-09-19 Thread Rickard von Essen
2.168.1.1 > Sep 19 13:15:10 localhost cloud: Changing password ... > Sep 19 13:15:10 localhost cloud: Sending acknowledgment to password > server at 192.168.1.1 > > Don't see anything in our external logging either that sheds any light > > > On Tuesday, September 19, 20

Re: [packer] CentOS template in Cloudstack

2017-09-19 Thread Rickard von Essen
I would start by creating a template where you have some fixed credentials that you can use for debugging (or use the console). Run packer build --on-error=ask, so when it fails you have time to troubleshoot. Jump into the node to debug if cloud-init is functioning as it should, see http://cloudin

Re: [packer] amazon-ebs/puppet-masterless scp permission denied uploading modules

2017-09-19 Thread Rickard von Essen
Maybe https://github.com/hashicorp/packer/issues/5347 On 19 September 2017 at 10:52, 'Chris Nappin' via Packer < packer-tool@googlegroups.com> wrote: > Hi, > > I have a packer template written about 9 months ago on a previous Packer > version (v0.7, that worked fine) that isn't working with Pac

Re: [packer] Re: Why can I not retrieve my password from AWS?

2017-09-14 Thread Rickard von Essen
I was trying to repo with your template and realises that you are missing user_data_file *) https://www.packer.io/docs/builders/amazon-ebs.html#user_data_file On 13 September 2017 at 22:46, TJ Biddle wrote: > Which looks like setting a password from the get-go fails as well: "The > password doe

Re: [packer] Correct way to use keypair for cloudstack

2017-09-13 Thread Rickard von Essen
quot;source_template": "{{user `source_template`}}", >> "template_os": "{{user `template_os`}}", >> "zone": "{{user `zone`}}", >> "instance_name": "{{ user `instance_name`}}-{{timestamp}}", >

Re: [packer] Correct way to use keypair for cloudstack

2017-09-13 Thread Rickard von Essen
Are you running the latest version (released today). I have been working on some cloudstack improvements that was released now some of them involved improved ssh support. / Rickard On Sep 13, 2017 16:38, "David Curran" wrote: I'm trying to automate the build process for templates and have run i

Re: [packer] WinRM connection err: http response error: 503 - invalid content type

2017-09-13 Thread Rickard von Essen
This works https://github.com/Diabol/packer-demo/blob/master/windows-cloud.json using Windows Server 2016 On 13 September 2017 at 15:11, Khalid Hosein wrote: > amazon-ebs > > On Tuesday, September 12, 2017 at 3:16:08 PM UTC-4, Rickard von Essen > wrote: >> >> Wh

<    2   3   4   5   6   7   8   9   10   11   >