Re: [packer] Building debian8+ on vmware-iso

2018-05-09 Thread Rickard von Essen
You preprocess the ISO and put the Kickstart file in it. (Something like: loop back mount the ISO, use an overlay fs to add the Kickstart file, and finaly create a new iso with mkisofs) On Wed, May 9, 2018, 12:48 Алексей Широких wrote: > Yep. thx. i know. > but i have to build vmx somehow, and

Re: [packer] Re: Using Packer with Windows 2012 CIS Benchmark (Hardened) AMIs

2018-05-09 Thread Rickard von Essen
Just to clearify Packer does speak WinRM over HTTPS. See https://www.packer.io/docs/templates/communicator.html#winrm_use_ssl On Thu, May 10, 2018, 05:22 Jordan Borean wrote: > I believe the other issue is that Packer (or whatever libraries Packer > uses for WinRM) does not encrypt the WinRM dat

Re: [packer] ssh_wait_timeout deprecated?

2018-05-10 Thread Rickard von Essen
https://www.packer.io/docs/templates/communicator.html#ssh_timeout On 10 May 2018 at 21:29, wrote: > I started experimenting with packerlicious > to generate my templates at build > time. > In my use case, it gives me this error output: > > AttributeError:

Re: [packer] Virtualbox / Ansible Non-zero exit status 2300218

2018-05-11 Thread Rickard von Essen
This happens because the ssh session is closed. (see https://github.com/hashicorp/packer/blob/68287566b873c317144235a202c5e9da9f88f4f7/packer/communicator.go#L15). Most likely because sshd gets updated/restarted. On Fri, May 11, 2018, 15:34 Chris Stevens wrote: > I have an existing packer build

Re: [packer] How to debug Packer with debugger?

2018-05-16 Thread Rickard von Essen
For debugging plugin code I run with PACKER_LOG=1 and try to understand the problem. Usuually that is enough to pinpoint the problem if not I at least get to know which step is failing and then I can just add some debug print outs and recompile the code. This works very well with packer since the c

Re: [packer] Any way to not have Packer shutdown after build?

2018-05-16 Thread Rickard von Essen
Why don't you just skip shutting down? (Or worst case just reboot) Which builder are you using? On 9 May 2018 at 21:09, Dan Franciscus wrote: > I have a provisioner that shuts down the VM when its complete, but Packer > still attempts to do so which throws an error. I would like Packer to not >

Re: [packer] Virtualbox / Ansible Non-zero exit status 2300218

2018-05-16 Thread Rickard von Essen
It solely depends on which packages are available for update. So it depends on an external state. On 11 May 2018 at 18:13, Chris Stevens wrote: > Actually now that I think about it, I haven't seen this issue even 1 time > when the system upgrade task was being executed. > > That makes me think i

Re: [packer] Network file system in packer Shell provisioner QEMU-KVM

2018-05-16 Thread Rickard von Essen
I'm pretty sure this is an error in your scripts. Packer doesn't care/know if you are using NFS or something else. Try to step back a bit and start with something simpler and then you add steps until you find the one that is wrong. Be sure to verify each one. On 12 May 2018 at 02:02, wrote: > He

Re: [packer] Configuring an SSH User for Packer

2018-05-16 Thread Rickard von Essen
The public ssh key is added by the cloud-init tool when the instance boots the first time to the "default user" the default user is "ubuntu" for Ubuntu dists. The second build should work if you use ssh_user ubuntu. If you want to switch this behaviour you can change the default user in the first b

Re: [packer] WinRM connection refused with VirtualBox OVA.

2018-05-16 Thread Rickard von Essen
I have no idea, but I think you should update to the latest release before troubleshooting further. On Wed, May 16, 2018, 18:17 SurferL wrote: > Was unsure where to post this, so posting here instead of GitHub issue > list. > > - Packer version: `1.1.3` > - Host platform: `macOS Sierra 10.12.6`

Re: [packer] Re: How to debug Packer with debugger?

2018-05-17 Thread Rickard von Essen
> > For some reason packer reports no errors even if file is not actually > copied into the image with file provisioner. I believe there are just no > checks for that, same with the shell provisioner. > This should definitely fail, either you misinterpreted the problem or this is a new bug. I woul

Re: [packer] user variable

2018-05-17 Thread Rickard von Essen
Yes it works, but your example is a bit wrong. It should be like this: { "variables": { "ami_name": "Default name", "ami_description": "Default description" }, "builders": [{ ... "ami_name": "{{ user `ami_name` }}, "ami_description": "{{ user `ami_description` }},

Re: [packer] How to override "winrm_username" in one of the provisioners

2018-05-17 Thread Rickard von Essen
That is not currently possible. I think the only solution is to deley the change to the end. On Thu, May 17, 2018, 22:03 Sayantan Choudhury wrote: > Hi, > > I have a requirement where I need to build a Windows AMI in AWS and as per > CIS recommendations, I need to rename the default windows Adm

Re: [packer] Network file system in packer Shell provisioner QEMU-KVM

2018-05-18 Thread Rickard von Essen
ts denying access. > > Let me know your thoughts on this info. > > Regards > > Tanner Posada > > On Wednesday, May 16, 2018 at 12:12:16 AM UTC-7, Rickard von Essen wrote: >> >> I'm pretty sure this is an error in your scripts. Packer doesn't >> care/kno

Re: [packer] Re: Packer doesn't run provisioner or postprocesser, after running a custom Builder plugin.

2018-05-19 Thread Rickard von Essen
For the provisioners to run you need to implement a connect step and a provision step. Example: https://github.com/hashicorp/packer/blob/master/builder/virtualbox/iso/builder.go#L253 https://github.com/hashicorp/packer/blob/master/builder/virtualbox/iso/builder.go#L268 Post-processors I think will

Re: [packer] What's the point of user_data?

2018-05-22 Thread Rickard von Essen
User data 1) is used by cloud-init 2). Cloud init is a service that executes early in the boot process and reads user-data (among other things) and can modify the VM's setup. It can add users and ssh-keys to allow connection via ssh. But it's not guaranteed to finish before sshd starts, so there is

Re: [packer] Create a snapshot after executing a successful amazon-ebsvolume build

2018-05-22 Thread Rickard von Essen
You can't. But you can use the manifest post-processor, read it in a script that you run after packer and snapshot each ebs volume with the cli. On Tue, May 22, 2018, 16:30 wrote: > I couldn't find information on how to create a snapshot after a newly > created ebs volume. > > -- > This mailing

Re: [packer] Create a snapshot after executing a successful amazon-ebsvolume build

2018-05-22 Thread Rickard von Essen
m/cli/latest/reference/ec2/create-snapshot.html https://stedolan.github.io/jq/ https://www.packer.io/docs/post-processors/manifest.html On Tue, May 22, 2018, 18:35 wrote: > Can you provide an example on how to accomplish this task? > > On Tuesday, May 22, 2018 at 12:25:44 PM UTC-4, Ric

Re: [packer] kms encryption on ebs volume fails after adding additional region, eu-west-3

2018-05-22 Thread Rickard von Essen
You need to upgrade to at least 1.2.0 or you can try to set skip_region_validation to true. https://www.packer.io/docs/builders/amazon-ebs.html#skip_region_validation On Wed, May 23, 2018, 02:17 wrote: > Hi all, > > I have added a new region, eu-west-3, for existing KMS aws ebs volume to > get

Re: [packer] Re: kms encryption on ebs volume fails after adding additional region, eu-west-3

2018-05-27 Thread Rickard von Essen
To my knowledge the is no paid version of Packer, there might be enterprise support from HashiCorp. KMS is supposed to work, it's a rather new feature to allow multi region and CMS keys. But it was a well requested feature so if it was broken in the last releases I would have expected bug reports.

Re: [packer] encrypted secondary volume question

2018-05-27 Thread Rickard von Essen
You don't need booth ami_block_device_mappings and launch_block_device_mappings. This works for me and adds two EBS volumes in addition to the boot volume, one of these is encrypted with the default KMS EBS key. { "provisioners" : [ { "type" : "shell", "inline" : [

Re: [packer] Re: kms encryption on ebs volume fails after adding additional region, eu-west-3

2018-05-28 Thread Rickard von Essen
09:10:40 2018 { "Snapshots": [ { "Description": "Copied for DestinationAmi ami-085c183f66a55b1d0 from SourceAmi ami-0a8a95d85ce1b59f0 for SourceSnapshot snap-0b1ac50116191233b. Task created on 1,527,490,022,791.", "Encrypted": true

Re: [packer] ESXi post processor abort trap

2018-05-28 Thread Rickard von Essen
Rerun with PACKER_LOG=1 packer build ... and supply the output. On 28 May 2018 at 17:06, Mike M wrote: > Hello, > > Im looking to do what I consider a fairly vanilla task in packer but i'm > getting a error message that is not very helpful. > > Basically what i'm trying to do is build a VM and u

Re: [packer] Submitting a new custom Builder

2018-08-02 Thread Rickard von Essen
Under builders/ What's the builder for? On Thu, Aug 2, 2018, 07:10 chuacw wrote: > Hi Rickard, > > Can you clarify where in the fork for the PR, the new Builder will be > located? > > Thanks. > > On Monday, July 30, 2018 at 6:01:14 PM UTC+8, Rickard von Essen wrot

Re: [packer] Submitting a new custom Builder

2018-08-02 Thread Rickard von Essen
M/discussion > > > > On Thursday, August 2, 2018 at 3:47:38 PM UTC+8, Rickard von Essen wrote: >> >> Under builders/ >> >> What's the builder for? >> >> On Thu, Aug 2, 2018, 07:10 chuacw wrote: >> >>> Hi Rickard, >>&

Re: [packer] Submitting a new custom Builder

2018-08-02 Thread Rickard von Essen
mples On Thu, Aug 2, 2018, 10:23 CHUA Chee Wee wrote: > Where would examples and refs go then? > > > On Thursday, August 2, 2018 at 3:56:53 PM UTC+8, Rickard von Essen wrote: >> >> Ok, interesting. If you place the builder code under builders/tencent/ >> would be goo

Re: [packer] Re: ovftool giving curl error

2018-08-02 Thread Rickard von Essen
What does the log say if you run with PACKER_LOG=1? Have you tried running the command manually? What's the output of that? On Thu, Aug 2, 2018, 11:51 Shyam J wrote: > Correction for the error posted I used format, but without "format" alos > getting same error. > > vmware-iso: Executing: o

Re: [packer] cant' make openstack image using packer

2018-08-02 Thread Rickard von Essen
gt; 2018년 8월 1일 수요일 오전 1시 53분 47초 UTC+9, Rickard von Essen 님의 말: >> >> Can you manually create an image from an instance? All indications points >> at there is some problem with the OpenStack system. >> >> On Tue, 31 Jul 2018 at 12:25, Jihyun Choi wrote: >> >&

Re: [packer] Re: vmware-iso

2018-08-04 Thread Rickard von Essen
Start by verifying that you can build it locally, when that works. Show us the template you are using and the error message you get. On Sat, 4 Aug 2018 at 09:14, chic_cat wrote: > I added datacenter to json. > > Now it showing this error: > > ==> Some builds didn't complete successfully and had

Re: [packer] Building Azure Image from AWS Instance

2018-08-06 Thread Rickard von Essen
You can use qemu and the *-import post-processors to import it into all three cloud providers. But you have to care for all the difference between them in the same build. Note that there is a googlecompute-import since v 1.2.5 but the link in the docs index got lost on the site, but you can find i

Re: [packer] EFI/Boot Manager prompt with ESXi packer

2018-08-06 Thread Rickard von Essen
You have to use boot_command to type the keystrokes, unless there are some vmx_data options you can use. / Rickard On Mon, Aug 6, 2018, 13:05 Daniel Siegenthaler < daniel.siegenthale...@gmail.com> wrote: > Hi > > I have a question about packer. I'm using is to build WIndows Server > images in ou

Re: [packer] EFI/Boot Manager prompt with ESXi packer

2018-08-07 Thread Rickard von Essen
or the vsphere provider with efi? > > > Am Montag, 6. August 2018 13:09:22 UTC+2 schrieb Rickard von Essen: >> >> You have to use boot_command to type the keystrokes, unless there are >> some vmx_data options you can use. >> >> / Rickard >> >> On

Re: [packer] Packer template failing to download chef-client

2018-08-13 Thread Rickard von Essen
Rerun with: PACKER_LOG=1 packer build template.json And attach the output. On Mon, Aug 13, 2018, 21:23 Fish Exterminator wrote: > Hi, > > I've been making a virtualbox packer build that downloads chef-client. > whenever i try and run it, it gives me this message... > > Build 'virtualbox-iso' er

Re: [packer] Past versions of documentation

2018-08-15 Thread Rickard von Essen
You can read the docs directly from github, just switch to the tag you want the docs for, for example v1.0.4 https://github.com/hashicorp/packer/tree/v1.0.4/website/source/docs Unfortunately the links doesn't work so you have to manually navigate to the right file. On Wed, 15 Aug 2018 at 00:53, J

Re: [packer] Packer template failing to download chef-client

2018-08-15 Thread Rickard von Essen
o exit status. See output above for > more info. > > > Command: sudo knife node delete > packer-5b71e4e0-2b88-05c9-c671-cb430347017b -y -c > /tmp/packer-chef-client/knife.rb > Command: sudo knife node delete > packer-5b71e4e0-2b88-05c9-c671-cb430347017b -y -c > /tmp/pack

Re: [packer] Packer template failing to download chef-client

2018-08-15 Thread Rickard von Essen
018 at 11:04:15 AM UTC-4, Rickard von Essen wrote: >> >> So then if you run with -on-error=ask and when it fails you jump into the >> VM and try to find out why running: sudo knife node delete >> packer-5b71e4e0-2b88-05c9-c671-cb430347017b -y -c >> /tmp/packer-chef-cli

Re: [packer] Ansible-local is not install software

2018-08-22 Thread Rickard von Essen
Most likely there is a flaw in your workflow. Show us the template you are building and exactly which commands you run and what you do to inspect the result. On Wed, 22 Aug 2018 at 17:26, Adam Dallis wrote: > Hi all, > > i am fairly new to the world of packer and ansible, I have created a > temp

Re: [packer] Ansible-local is not install software

2018-08-22 Thread Rickard von Essen
; > then i ssh into the box > > and see vimnotfound.png > > > I appreciate your help > Adam > > > On Wednesday, 22 August 2018 16:29:48 UTC+1, Rickard von Essen wrote: >> >> Most likely there is a flaw in your workflow. Show us the template you >> are

Re: [packer] Virtualbox template not working

2018-08-23 Thread Rickard von Essen
Hard to say with so little info. Can you supply the template, the command line you run and the output when it fails (or even better the complete PACKER_LOG). On Thu, Aug 23, 2018, 19:43 Fish Exterminator wrote: > Hi. So, I have a virtualbox template i've been working on, the most recent > additi

Re: [packer] Virtualbox template not working

2018-08-23 Thread Rickard von Essen
The actual template. On Thu, Aug 23, 2018, 21:02 Fish Exterminator wrote: > the types, or the actual full template I'm using? > > On Thursday, August 23, 2018 at 2:56:21 PM UTC-4, Rickard von Essen wrote: >> >> Hard to say with so little info. Can you supply the tem

Re: [packer] Newbie - not converting to a template and suck on waiting for ip

2018-08-24 Thread Rickard von Essen
Show us your template, kickstart file, and the log output and we might be able to help. Without that I can only give the general advice to run packer with env var PACKER_LOG=1 and look for what packer is trying to connect to and use that to troubleshoot the network the usual way, both from the host

Re: [packer] Packer rookie, trying to install packages inside an already existing qcow2/raw image

2018-08-24 Thread Rickard von Essen
Depending on which virtualisation software you run, qemu/VirtualBox/VMware, etc there are builders for starting from an existing image/disk, qemu, virtualbox-ovf, or vmware-vmx for example. You might need to convert the disk you download into the appropriate format before running packer on it depen

Re: [packer] Packer rookie, trying to install packages inside an already existing qcow2/raw image

2018-08-24 Thread Rickard von Essen
hat I have seen all seem to say start from ISO. Also, when I > start from ISO, my packer errors out saying waiting for SSH connection > > On Friday, August 24, 2018 at 12:22:56 AM UTC-7, Rickard von Essen wrote: >> >> Depending on which virtualisation software you run, >>

Re: [packer] Newbie - not converting to a template and suck on waiting for ip

2018-08-24 Thread Rickard von Essen
; "inline": ["ls /"] > > } > > ] > > } > > > > > > Kickstart file > > # Set repo to mirror.centos.org > > repo --name="CentOS" --baseurl= > http://mirror.centos.org/centos/$releasever/os/$basea

Re: [packer] Newbie - not converting to a template and suck on waiting for ip

2018-08-24 Thread Rickard von Essen
r-tool@googlegroups.com [mailto:packer-tool@googlegroups.com] > *On Behalf Of *Rickard von Essen > *Sent:* Friday, August 24, 2018 6:07 AM > *To:* packer-tool@googlegroups.com > *Subject:* Re: [packer] Newbie - not converting to a template and suck on > waiting for ip > >

Re: [packer] Newbie - not converting to a template and suck on waiting for ip

2018-08-25 Thread Rickard von Essen
-baseurl= > http://mirror.centos.org/centos/$releasever/updates/$basearch/ --cost=100 > > > > > > > > *From:* packer-tool@googlegroups.com [mailto:packer-tool@googlegroups.com] > *On Behalf Of *Rickard von Essen > *Sent:* Friday, August 24, 2018 6:37 AM > *To:* packe

Re: [packer] Packer rookie, trying to install packages inside an already existing qcow2/raw image

2018-08-25 Thread Rickard von Essen
tmp/packerout1", >> "shutdown_command": "echo 'packer' | sudo -S shutdown -P now", >> "disk_size": 9000, >> "format": "raw", >> "headless": false, >> "ssh_host_port_min":

Re: [packer] Error waiting for AMI Copy: ResourceNotReady: exceeded wait attempts on packer v1.3 and v1.2.3

2018-08-30 Thread Rickard von Essen
It would be very helpful if you could try with an older version of Packer, say 1.2.0. And report if it works there. On Wed, Aug 29, 2018, 22:35 John Roh wrote: > This is so weird that it doesn't make any sense. Recently, I have added a > new jenkins-slave machine to build AMIs on a different acc

Re: [packer] Re: Generating OVA from img via Packer

2018-08-30 Thread Rickard von Essen
And regarding qemu builder output ova, it can't do that directly. It only supports raw and qcow2 disks, see the format option. But you can use the shell-local post-processor to run a command on the artifact. On Thu, Aug 30, 2018, 18:44 Megan Marsh wrote: > I suspect the issue is that the "type"

Re: [packer] How to set default volume size ?

2018-09-01 Thread Rickard von Essen
Use appropriate launch_block_device_mappings or (ami_block_device_mappings) "launch_block_device_mappings": [ { "device_name": "/dev/xvda", "volume_size": 80, "delete_on_termination": true } ] See https://www.packer.io/docs/builders/amazon-ebs.html#ami_block_d

Re: [packer] Re: SSH timeout when

2018-09-01 Thread Rickard von Essen
It looks like you are using the wrong device_name: $ AWS_PROFILE=admin aws --region us-west-2 ec2 describe-images --image-ids ami-37efa14f { "Images": [ { "Architecture": "x86_64", "CreationDate": "201

Re: [packer] Packer with QEMU running on a VM and build the image in remote a bare metal KVM host

2018-09-01 Thread Rickard von Essen
I'm not sure how you would do that, it's likely easy to tunnel kvm with some extra qemu parameters but Packer also uses qemu-img which I think only works with local files. On positive side is that packer is just a statically linked binary so you can easily create a script that you execute over ssh

Re: [packer] CentOS7 with packer

2018-09-02 Thread Rickard von Essen
Hi, I had some time to look into this. And I found several things. 1) It seems Virtio is not support by default by the CentOS install so changing net_device to e1000 (or any other supported device) and disk_interface to ide makes the build successful. Virtio can probably be used if you install t

Re: [packer] CentOS7 with packer

2018-09-02 Thread Rickard von Essen
And disk_image should be false when booting from ISO. On Sun, 2 Sep 2018 at 19:49, Rickard von Essen wrote: > Hi, > > I had some time to look into this. And I found several things. > > 1) It seems Virtio is not support by default by the CentOS install so > changing net_devic

Re: [packer] Packer Vault Integration

2018-09-03 Thread Rickard von Essen
Support for vault was merged in https://github.com/hashicorp/packer/pull/6533 last week and will be in the next release. On Mon, Sep 3, 2018, 14:47 Nav Marwaha wrote: > Hi, > > When can we expect the packer & vault integration? > > Regards, > Nav > > -- > This mailing list is governed under the

Re: [packer] amazon-ebs ami shrink to fit

2018-09-03 Thread Rickard von Essen
Hi, I don't know much about Windows but the way I would do it with a unix system is: 1) Use launch_device_mappings to attach an additional device 2) Mount it temporarly at say /mnt/tmp 3) Ensure that all clutter ends up on it 4) Unmount it 5) Use ami_device_mappings with no_device: true to not in

Re: [packer] Re: SSH timeout when

2018-09-04 Thread Rickard von Essen
script after provisioning the image to encrypt the AMI > through AWS cli. > > Best Regards, > Arun Janarthanan > > > > On Sat, Sep 1, 2018 at 9:01 AM, Rickard von Essen < > rickard.von.es...@gmail.com> wrote: > >> It looks like you are using the wrong device_name

Re: [packer] Re: SSH timeout when

2018-09-04 Thread Rickard von Essen
hanan < arunkumar.webad...@gmail.com> wrote: > Thanks, do I not need to mention the KMS id ? > > Best Regards, > Arun Janarthanan > > > > On Tue, Sep 4, 2018 at 1:32 PM, Rickard von Essen < > rickard.von.es...@gmail.com> wrote: > >> Just set encrypt_boot to true. >

Re: [packer] amazon-ebs ami shrink to fit

2018-09-04 Thread Rickard von Essen
ilder but the idea is the > same. Specifically he's got a provisioner script he runs that removes a > bunch of features, cleans out logs and caches, and zeroes out the rest of > the empty disk > https://github.com/mwrock/packer-templates/blob/master/scripts/provision.ps1 >

Re: [packer] vmware-iso

2018-09-05 Thread Rickard von Essen
There is actually a 3pp vsphere-iso builder plugin. https://github.com/jetbrains-infra/packer-builder-vsphere On Thu, Sep 6, 2018, 00:56 Gabo Kete wrote: > To start with there is no *vsphere-iso* builder but a *vmware-iso* > > Looking at your JSON file seems you have a few parameters that are n

Re: [packer] Using environ variables in packer json file

2018-09-05 Thread Rickard von Essen
See https://www.packer.io/docs/templates/user-variables.html#using-home-variable On Thu, Sep 6, 2018, 06:04 wrote: > I have a provisioners section that has a following snippet > { > "type":"file", > "source":"my-init.sh", > "destination":"/root/myuser/run/my-init.sh" > }, >

Re: [packer] apt and dpkg overwrite config

2018-09-06 Thread Rickard von Essen
See this SO answer: https://serverfault.com/questions/227190/how-do-i-ask-apt-get-to-skip-any-interactive-post-install-configuration-steps On Thu, Sep 6, 2018, 19:37 TF wrote: > Hi group, > > I'm currently struggling with apt due to dpkg asking what to do with > configuration files. Trying to pa

Re: [packer] VMWare workstation 14 "waiting for VM to start"

2018-09-07 Thread Rickard von Essen
Not sure why that don't work, but for reference this should: https://github.com/boxcutter/bsd/blob/master/freebsd.json On Fri, Sep 7, 2018, 20:17 David Maximoff wrote: > I'm trying to build a FreeBSD 11 machine with VMWare workstation 14. > > When I try to build the VM, packer builds the VM hard

Re: [packer] Using two disks to configure the OS with packer

2018-09-09 Thread Rickard von Essen
It should be possible to pre-create the disk and attach it with some qemuargs. On Fri, 7 Sep 2018 at 19:04, Alvaro Miranda Aguilera wrote: > Hello > > Packer for qemu will create just one disk: > > https://www.packer.io/docs/builders/qemu.html#disk_size > > Alvaro > > On Fri, Sep 7, 2018 at 3:23

Re: [packer] Packer takes long time during file copy more than 1G

2018-09-13 Thread Rickard von Essen
Are you using winrm? On Thu, Sep 13, 2018, 21:41 Yuvaraj G wrote: > I m using packer file provision command to copy around 1G tar ball file to > copy over to image. > > copy works for lesser size file with no issues, but when i use the tar > ball file from source its around 1G and its not copyin

Re: [packer] Packer takes long time during file copy more than 1G

2018-09-13 Thread Rickard von Essen
Then you are using ssh. On Thu, Sep 13, 2018, 22:30 Yuvaraj G wrote: > I’m kit specifying anything specific. May be it’s using its default > > Sent from my iPhone > > On Sep 13, 2018, at 4:17 PM, Rickard von Essen < > rickard.von.es...@gmail.com> wrote: > > Are yo

Re: [packer] Packer takes long time during file copy more than 1G

2018-09-13 Thread Rickard von Essen
t; use 1g of file to transfer? > > Sent from my iPhone > > On Sep 13, 2018, at 4:33 PM, Rickard von Essen < > rickard.von.es...@gmail.com> wrote: > > Then you are using ssh. > > On Thu, Sep 13, 2018, 22:30 Yuvaraj G wrote: > >> I’m kit specifying anything sp

Re: [packer] Using http_directory with multiple builders

2018-09-15 Thread Rickard von Essen
That should work. Can you open a bug report and supply all the requested info. On Fri, Sep 14, 2018, 20:52 StatsfX wrote: > Hey there, > > I am having issues using http_directory with multiple builders in a single > packer build file. Is this supported or do I need to have one builder per > file

Re: [packer] Importing OVA into AWS fails with Unsupported kernel version 4.15.0-1021-aws

2018-09-15 Thread Rickard von Essen
Could you share your template? On Fri, 14 Sep 2018 at 21:55, wrote: > I am building an image from athe Ubuntu 18.04 LTS ISO, creating an OVA > image, which I then attempt to import to AWS. > The first time I attempted this I got the dreaded "Unsupported kernel > version..." error. > > Therefore,

Re: [packer] Importing OVA into AWS fails with Unsupported kernel version 4.15.0-1021-aws

2018-09-17 Thread Rickard von Essen
t;: "vagrant", > "ssh_password": "vagrant", > "ssh_port": 22, > "ssh_wait_timeout": "1s", > "shutdown_command": "echo 'vagrant'|sudo -S shutdown -P now", > &quo

Re: [packer] Ubuntu 18.04 server build stuck @looking for username and password

2018-09-19 Thread Rickard von Essen
You are missing {{ .HTTPPort }} in your boot_command: https://www.packer.io/docs/builders/vmware-iso.html#templates-inside-boot-command On Wed, 19 Sep 2018 at 10:43, praveen bhat wrote: > when i check the build progress in vmware console , > installation window stuck at looking form user detail

Re: [packer] Ubuntu 18.04 server build stuck @looking for username and password

2018-09-19 Thread Rickard von Essen
eptember 19, 2018 at 2:32:13 PM UTC+5:30, Rickard von Essen > wrote: >> >> You are missing {{ .HTTPPort }} in your boot_command: >> >> >> https://www.packer.io/docs/builders/vmware-iso.html#templates-inside-boot-command >> >> On Wed, 19 Sep 2018 at 10:43,

Re: [packer] Qemu builder with zip url

2018-09-19 Thread Rickard von Essen
No, you need to wrap packer into a script that downloads the files and unzip it before hand. On Wed, 19 Sep 2018 at 16:04, oko loj wrote: > I'm downloading raspbian and building it with qemu-system-arm: > > "builders": [ > { > "type": "qemu", > "iso_url": "https://downloads.ras

Re: [packer] Importing OVA into AWS fails with Unsupported kernel version 4.15.0-1021-aws

2018-09-19 Thread Rickard von Essen
.iso > " > > ], > > "iso_checksum_type": "sha256", > > "iso_checksum": > "a5b0ea5918f850124f3d72ef4b85bda82f0fcd02ec721be19c1a6952791c8ee8", > > "ssh_username": "vagrant", > >

Re: [packer] Importing OVA into AWS fails with Unsupported kernel version 4.15.0-1021-aws

2018-09-20 Thread Rickard von Essen
I have opened an issue for this: https://github.com/hashicorp/packer/issues/6743 On Wed, 19 Sep 2018 at 22:25, Rickard von Essen wrote: > I can confirm that I get the same problem with your config. One strange > thing is that the format when doing a Describe-import-task is vmdk, so I >

Re: [packer] exporting EC2 instances to OVF after packer provisions

2018-09-21 Thread Rickard von Essen
> > I would THINK the post-processor would execute before the instance is > terminated. > No, the post+processor run on the artifact of the builder, which in this case is the AMI. Instead I suggest that you as your last provisioner runs a shell provisioner which runs the AWS cli on the instance. I

Re: [packer] VBoxManage error: nonexistent host networking interface

2018-09-24 Thread Rickard von Essen
> > I need the HTTPIP to be that of the host machine. By default Vbox > configures the NIC as a NAT, so I get a 10.0... IP address. Thus I need to > change to a Bridged NIC so I can utilise my http folder to get the autoyast > file. I'm not sure I understood correctly, but if by "http folder" you

Re: [packer] VBoxManage error: nonexistent host networking interface

2018-09-25 Thread Rickard von Essen
in SLES installation >>>> stating: >>>> '*Cannot find URL 'http://10.0.2.2:8353/autoinst.xml >>>> <http://10.0.2.2:8353/autoinst.xml>' via protocol HTTP(S)*' >>>> >>>> I assumed this was because of the IP addre

Re: [packer] Builder virtualbox-iso - custom local script just before export (VM stopped) ?

2018-09-25 Thread Rickard von Essen
No there is no such option to run a command before export but after the vm stopped. But isn't Vagrant the solution to this problem. You can solve all these things in a Vagrantfile. On Tue, Sep 25, 2018, 14:39 Alix Lourme wrote: > Hello, > > I'm using Packer to create a Linux (Ubuntu) VirtualBox

Re: [packer] How to publish some parameters from a provisioned shell into the manifest

2018-09-26 Thread Rickard von Essen
You can't. The only way I can think about it so wrap packer in a script, use the file provisioner to download some information you want in the manifest, and use jq to write the data into the manifest json after packer finishes. On Thu, Sep 27, 2018, 00:26 Ibrahim Buamod wrote: > Let's say I inst

Re: [packer] hyper-v ISO builder - how to assign IP address the VM????

2018-09-27 Thread Rickard von Essen
Hyper-V have it's own dhcp server and the vm will get an IP automatically assigned. But you need to install the hyper v tools in the vm in Kickstart/presees. On Thu, Sep 27, 2018, 14:43 Muthu R D wrote: > Hi, > > > I am trying to build a hyper-v VM through the JSON > hyperv-windows-2012R2-server

Re: [packer] hyper-v ISO builder - how to assign IP address the VM????

2018-09-27 Thread Rickard von Essen
Or in this casei in the autounattended.xml. On Thu, Sep 27, 2018, 16:22 Rickard von Essen wrote: > Hyper-V have it's own dhcp server and the vm will get an IP automatically > assigned. But you need to install the hyper v tools in the vm in > Kickstart/presees. > > On Thu,

Re: [packer] Using file and shell provisioner together in packer fails with " No such file or directory"

2018-10-01 Thread Rickard von Essen
Can you correct the example and provide the exact error message you get? On Mon, Oct 1, 2018 at 2:37 AM Bubunia Patra wrote: > Sorry I did a typo in this example to provide the correct scriptdir with > /home/centos/test properties but I got the same error(no such file or > directory). Some how t

Re: [packer] Templates based on template

2018-10-03 Thread Rickard von Essen
No, you have to preprocess your template. Useful tools for this is jq or a scripting language (Python, Ruby, etc). On Wed, Oct 3, 2018 at 11:48 AM wrote: > Hello, > > is it possible to include templates in another template so that you don't > have to recreate an .json file? > > -- > This mailing

Re: [packer] Ansible (remote) running tasks on local machine (packer build machine) instead of target image.

2018-10-05 Thread Rickard von Essen
What do you base this claim on? but instead, my local workspace is being affected. > I think you just get confused because Ansible connect to a local proxy that forwards the connection. From the docs: The ansible Packer provisioner runs Ansible playbooks. It dynamically > creates an Ansible inve

Re: [packer] Pass arguments to Script powershell provisioner

2018-10-05 Thread Rickard von Essen
You can modify 1) execute_command to pass arguments, but a better way is to pass information via environemnt_vars 2) because then you can run all you scripts in the same powershell provisioner. 1) https://packer.io/docs/provisioners/powershell.html#execute_command 2) https://packer.io/docs/provisi

Re: [packer] Pass arguments to Script powershell provisioner

2018-10-05 Thread Rickard von Essen
escribe, > would you? > > On Friday, October 5, 2018 at 12:59:06 AM UTC-7, Rickard von Essen wrote: >> >> You can modify 1) execute_command to pass arguments, but a better way is >> to pass information via environemnt_vars 2) because then you can run all >> you sc

Re: [packer] Pass arguments to Script powershell provisioner

2018-10-05 Thread Rickard von Essen
pts that use the environment vars in the way you describe, > would you? > > On Friday, October 5, 2018 at 12:59:06 AM UTC-7, Rickard von Essen wrote: >> >> You can modify 1) execute_command to pass arguments, but a better way is >> to pass information via environemnt_vars 2)

Re: [packer] how to change user for a windows build

2018-10-09 Thread Rickard von Essen
Could you rephrase your question and try to give some more details. I'm not sure what you are asking for. On Wed, Oct 10, 2018, 01:35 federico montaldo wrote: > Hi, > > I want to know if there is a change to change the default vagrant user > to be a different one in the build process. > > Regard

Re: [packer] Template Cloudstack Windows Server

2018-10-09 Thread Rickard von Essen
Just to clearify, the cloudstack builder doesn't support floppy. Maybe there is some other way of proving the autounattended.xml, I know nothing about Windows. Even if you can't build the initial image on cloudstack you can do it in VirtualBox or Qemu and upload the result to CloudStack. After tha

Re: [packer] How do I use "sensitive-variables"

2018-10-11 Thread Rickard von Essen
What's your Packer version? On Thu, Oct 11, 2018, 08:54 brian ayala wrote: > I am getting an error message of > > Unknown root level key in template: 'sensitive-variables > > > { > "variables": { > "vpc_id": "", > "subnet_id": "", > "admin_password": "{{ env `ADMINPASS` }}", >

Re: [packer] AMI copy to diff regions takes a lot of time, is this expected? is there a efficient/faster way?

2018-10-12 Thread Rickard von Essen
Packer copies AMI in parallel 1). This is actually just issuing one API call per region and then waiting for AWS to report that the AMI is available in all regions requested. There is nothing Packer can do to influence the speed. I expect that this AMI is based on fairly large snapshots? Some thin

Re: [packer] Automatic windows server provisioning with Ansible + Virtual box

2018-10-15 Thread Rickard von Essen
The problem here is VirtualBox networking. The host can't directly reach the guest so packer sets up a NAT port forwarding on a random port restricted by ssh_host_port_min and max 1) (despite the naming this is also used for WinRM). You need to set this port in your inventory file instead of 55985.

Re: [packer] Add Host only network in the Virtual Box builder

2018-10-15 Thread Rickard von Essen
Each argument need to be it's own string: [ "modifyvm", "{{.Name}}", "--nic2", "hostonly --hostonlyadapter1 vboxnet1" ] must be: [ "modifyvm", "{{.Name}}", "--nic2", "hostonly", "--hostonlyadapter1", "vboxnet1" ] // Rickard On Mon, Oct 15, 2018 at 10:26 AM steve BP wrote: > Hi > > I am using p

Re: [packer] Add Host only network in the Virtual Box builder

2018-10-15 Thread Rickard von Essen
Yes your syntax is incorrect check section 6.7 at https://www.virtualbox.org/manual/ch06.html On Mon, Oct 15, 2018 at 12:15 PM steve BP wrote: > Hi Rickard > > Thanks for the prompt reply. I have modified my template as per your > instructions (I was led a bit astray by the WinRM port forwarding

Re: [packer] Add Host only network in the Virtual Box builder

2018-10-15 Thread Rickard von Essen
rience do you think that the error is caused by a packer > configuration issue, or a virtual box configuration issue? > > Steve > > On Monday, 15 October 2018 11:28:33 UTC+1, Rickard von Essen wrote: >> >> Yes your syntax is incorrect check section 6.7 at >> https://w

Re: [packer] virtualbox-ovf: Timeout waiting for SSH

2018-10-15 Thread Rickard von Essen
Could you publish your ubuntu-server-18.ova somewhere so we can try reproduce it? What steps did you do to troubleshoot the network/connectivity? Try running with --on-error=ask and the VM will keep running after the time out so you have time to troubleshoot. On Mon, Oct 15, 2018 at 9:32 PM hansm

Re: [packer] Re: virtualbox-ovf: Timeout waiting for SSH

2018-10-16 Thread Rickard von Essen
If you start that build, wait for the console, login with packer/packer and run "ifconfig" you will see there is only a loopback interface. On Mon, Oct 15, 2018 at 10:59 PM hansman wrote: > i reproduced the same issue on a mac host machine. therefore i don't think > it as a circleci issue. here

Re: [packer] Re: virtualbox-ovf: Timeout waiting for SSH

2018-10-18 Thread Rickard von Essen
uot; ] || continue > networkname=$(basename $networkfile) > echo auto $networkname >> /etc/network/interfaces > echo iface $networkname inet dhcp >> /etc/network/interfaces > echo >> /etc/network/interfaces > done > > cat /etc/network/interfac

Re: [packer] How can you modularize the json template for a Packer project?

2018-10-19 Thread Rickard von Essen
Since there might be considerable difference when using different distributions another alternative is to put each builder+dist in its own file and provisioners in another and then use some tool (python, jq, sed, etc) to create the final template from these files. // Rickard On Fri, Oct 19, 2018

  1   2   3   4   5   6   7   8   9   10   >