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

2018-05-18 Thread Megan Marsh
Alternatively, you can make the change in the script that you send in as your "user_data_file", before you run any provisioners. On Thu, May 17, 2018 at 1:17 PM, Rickard von Essen < rickard.von.es...@gmail.com> wrote: > That is not currently possible. > > I think the only solution is to deley the

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

2018-05-18 Thread Megan Marsh
You won't be able to change between provisioners. You can either change before the provisioners run, or at the very end--not in between. My comment was to point out that you can reset the Administrator password before the provisioners run and before Packer connects to the instance via WinRM -- Th

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

2018-05-21 Thread Megan Marsh
Alvaro's right -- breaking this into two separate Packer runs is probably your best option. -- This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from

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

2018-05-22 Thread Megan Marsh
You can install ansible via a shell provisioner before you run your ansible-local provisioner: "provisioners": [ > { > "type": "shell", > "inline": ["sudo apt-get -y update", > "sudo apt-get -y install software-properties-common", > "sudo apt-add-r

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

2018-05-24 Thread Megan Marsh
The best way to contact us (Packer developers, that is) regarding bugs is through Packer's github issues. Serge has shared some of his details in the above ticket; we just haven't had a chance to do the investigation yet. I've commented in said ticket asking for more details there; ultimately it's

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

2018-05-24 Thread Megan Marsh
No problem; any testing, logs, troubleshooting, repro cases etc that you can share make it much easier for us once we get started on an investigation, so if you've got anything please let us know. Otherwise, I'll update that ticket when I start looking at it. -- This mailing list is governed unde

Re: [packer] ssh_wait_timeout deprecated?

2018-05-25 Thread Megan Marsh
Hey Dan -- we've been talking about having Packer do that kind of validation automatically for every build. Right now, it's something you can do yourself by running "Packer fix yourconfig.json" -- This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/

Re: [packer] WINRM (Build 'amazon-ebs' errored: Timeout waiting for WinRM.)

2018-08-13 Thread Megan Marsh
It's possible you need to increase that timeout, if you have a long answer file that you're using. Otherwise, you may want to read through the docs here https://www.packer.io/intro/getting-started/build-image.html#a-windows-example and see if you're making any of the common mistakes mentioned. On

Re: [packer] No AMI was found matching filters message...

2018-08-14 Thread Megan Marsh
If you're looking for the AMI released by Cannonical, you need the appropriate "owner": This works for me: "source_ami_filter": { "filters": { "virtualization-type": "hvm", "name": "ubuntu/images/*ubuntu-xenial-16.04-amd64-server-*",

Re: [packer] No AMI was found matching filters message...

2018-08-14 Thread Megan Marsh
owner of all images? i seen the number > referenced in a few article samples... > >> On Tue, Aug 14, 2018 at 7:09 PM Megan Marsh wrote: >> If you're looking for the AMI released by Cannonical, you need the >> appropriate "owner": >> &g

Re: [packer] shell-local provisioner in packer version 1.2.5

2018-08-16 Thread Megan Marsh
I don't think we made any changes to the shell-local provisioner between 1.2.4 and 1.2.5, but we did make a lot of changes to the provisioner in v1.2.4. The docs for how to run it on windows vs. linux are here: https://www.packer.io/docs/provisioners/shell-local.html I don't think I can help more

Re: [packer] Re: shell-local provisioner in packer version 1.2.5

2018-08-17 Thread Megan Marsh
Yes, I understand. I'm sorry for this regression, but before this refactor, the vast majority of shell-local cases on windows didn't work, period. It's basically dumb luck that it worked for you at all. On windows 10, I assume you were using the Windows Linux Subsystem? That said, I have an idea

Re: [packer] Re: shell-local provisioner in packer version 1.2.5

2018-08-21 Thread Megan Marsh
around? > > Thanks > > > On Saturday, August 18, 2018 at 4:39:18 AM UTC+10, Megan Marsh wrote: >> >> Yes, I understand. I'm sorry for this regression, but before this >> refactor, the vast majority of shell-local cases on windows didn't work, >> perio

Re: [packer] Re: shell-local provisioner in packer version 1.2.5

2018-08-24 Thread Megan Marsh
github.com/hashicorp/packer/issues/6620 > > > On Wednesday, August 22, 2018 at 6:59:31 AM UTC+10, Megan Marsh wrote: >> >> Open a bug report with steps to reproduce. Any workaround is going to be >> very specific. >> >> On Mon, Aug 20, 2018 at 8:21 PM, Aaron Job

Re: [packer] Re: Cannot try example json

2018-08-27 Thread Megan Marsh
Which example json are you using? On Sat, Aug 25, 2018 at 10:30 PM wrote: > I suspect this has to do something with my Ubuntu laptop. I am not sure > what or maybe some qemu version on ubuntu? > > On Saturday, August 25, 2018 at 9:53:13 PM UTC-7, ksac...@gmail.com wrote: >> >> I have tried to us

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

2018-08-30 Thread Megan Marsh
> > I suspect the issue is that the "type" for a vmware build is either > "vmware-iso" or "vmware-vmx" not "vmware" -- This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may resu

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

2018-08-30 Thread Megan Marsh
> > I can try to look into this today but it'll be easier if I have debug logs > to look at. -- This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from

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

2018-08-30 Thread Megan Marsh
OH! Sorry I didn't notice this out sooner. You don't export those environment variables as part of the provisioner; you set them when Packer runs. For example: export AWS_MAX_ATTEMPTS=300; packer build example_template.json On Thu, Aug 30, 2018 at 12:07 PM John Roh wrote: > Hi Richard, > Okay

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

2018-08-30 Thread Megan Marsh
OUT_SECONDS are both set. Packer > will be using AWS_MAX_ATTEMPTS and discarding AWS_TIMEOUT_SECONDS. If you > have not set AWS_POLL_DELAY_SECONDS, Packer will default to a 2 second poll > delay. On Thu, Aug 30, 2018 at 2:32 PM Megan Marsh wrote: > This is really strange, and I can

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

2018-08-31 Thread Megan Marsh
t the other build machines are working fine with packer v1.2.3 > but why not on this new machine which created from the puppetizing it. > > John. > > > > On Thursday, August 30, 2018 at 2:41:59 PM UTC-7, Megan Marsh wrote: >> >> This is really strange, and I can't

Re: [packer] winrm fails after domain join in Azure but is fine in Hyper-V

2018-09-11 Thread Megan Marsh
Can you share your provisioner script and bootstrap scripts? -- This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list. GitHub Issu

Re: [packer] Re: Issue with Ansible's win_update command

2018-09-11 Thread Megan Marsh
I think that syntax is right. But the merged PR you found hasn't actually been released yet -- v1.3.0 should be coming out today (as soon as I finish catching up on emails I'm going to start the release process) so sit tight for a couple of hours and try again with the new version. On Tue, Sep 11,

Re: [packer] Re: Issue with Ansible's win_update command

2018-09-11 Thread Megan Marsh
Thanks for your patience! I'll be sending an email to the group once the release is up. On Tue, Sep 11, 2018 at 10:18 AM wrote: > Oh ok, wow. I will do that, thanks! > > On Tuesday, September 11, 2018 at 10:15:28 AM UTC-7, Megan Marsh wrote: >> >> I think that synta

Re: [packer] packer build help

2018-09-11 Thread Megan Marsh
You can download Packer for OSX here: https://www.packer.io/downloads.html Virtualbox docs are here: https://www.packer.io/docs/builders/virtualbox.html Many people find it easiest to start from a working template and increase complexity from there. The docs contain basic examples, or you can fi

Re: [packer] Re: Issue with Ansible's win_update command

2018-09-11 Thread Megan Marsh
Has the error changed or is it still "Unexpected failure during module execution"? On Tue, Sep 11, 2018 at 3:04 PM wrote: > Hmm, OK, I downloaded the new release and the password is successfully > being passed to the ansible provisioner! However the module is still > failing. I suppose at this p

Re: [packer] How do I get the image output of the packer?

2018-09-13 Thread Megan Marsh
When you run the build, the output will be in the directory you defined here: "output": "builds/centos71-x64-virtualbox-{{user `version`}}.box" relative to the directory from which you are running packer. Then you can use vagrant to launch that image. On Thu, Sep 13, 2018 at 10:06 AM Bruno Gomes

Re: [packer] How do I get the image output of the packer?

2018-09-13 Thread Megan Marsh
ed to play this image for some > cloud and from there use the reference source > > Em quinta-feira, 13 de setembro de 2018 14:17:35 UTC-3, Megan Marsh > escreveu: >> >> When you run the build, the output will be in the directory you defined >> here: "output":

Re: [packer] packer build help

2018-09-14 Thread Megan Marsh
t;" > > } > > ], > > "post-processors": [ > > { > > "output": "2012r2/virtualbox.box", > > "type": "vagrant", > > "vagrantfile_template": "2012r2/va

Re: [packer] packer build help

2018-09-14 Thread Megan Marsh
ite)" > at line 525 of file VBoxManageModifyVM.cpp > > > ==> Some builds didn't complete successfully and had errors: > > --> virtualbox-ovf: Error deleting port forwarding rule: VBoxManage > error: VBoxManage: error: The machine > 'packer-virtualbox-ovf-15

Re: [packer] Amazon-EBS builder is failing to read a file from an S3 bucket during the provision process.

2018-09-14 Thread Megan Marsh
>I don't have this issue using a different AWS account but with the same Bucket roles and rules. That makes it sound to me like this may be an AWS permissions issue based on your particular user. On Fri, Sep 14, 2018 at 3:25 PM Steven Stratis wrote: > I'm using packer to build out Windows AMIs.

Re: [packer] Amazon-EBS builder is failing to read a file from an S3 bucket during the provision process.

2018-09-14 Thread Megan Marsh
What about permissions on the actual file you're trying to download? Are they scoped for only the originating user to access? -- This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guideline

Re: [packer] Can windows-shell access the WinRMPassword variable?

2018-10-09 Thread Megan Marsh
It can't. Can you make a feature request on github? -- This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list. GitHub Issues: http

Re: [packer] Can windows-shell access the WinRMPassword variable?

2018-10-09 Thread Megan Marsh
No problem! :) On Tue, Oct 9, 2018 at 1:13 PM goffries wrote: > sure thing. thanks for the quick response. > > On Tuesday, October 9, 2018 at 1:12:37 PM UTC-7, Megan Marsh wrote: >> >> It can't. Can you make a feature request on github? >> > -- > T

Re: [packer] packer download

2018-11-08 Thread Megan Marsh
Hey all, Thanks for writing. This isn't the first time someone has requested this. Take a look at this comment in Terraform to explain why we don't provide such a link, and how to do what you're asking for if you don't like our reasoning: https://github.com/hashicorp/terraform/issues/9803#issuecom

Re: [packer] Possible for Packer to only push a Docker image based on successful execution of a custom script?

2018-11-19 Thread Megan Marsh
You may be able to get the behavior you want by setting `keep_input_artifact` in your shell-local post-processor. https://www.packer.io/docs/templates/post-processors.html#input-artifacts On Mon, Nov 19, 2018 at 7:49 AM wrote: > I'm trying to get Packer to build a Docker image, then run a contai

Re: [packer] Is Packer using "Shutdown with Sysprep" for windows VMs ?

2018-11-19 Thread Megan Marsh
No, but you can use disable_stop_instance and then run sysprep as part of your powershell provisioner in order to get the behavior you want. On Sun, Nov 18, 2018 at 7:46 PM Ibrahim Buamod wrote: > when baking a new Windo

Re: [packer] Possible for Packer to only push a Docker image based on successful execution of a custom script?

2018-11-20 Thread Megan Marsh
hase. I'd rather not >> even push an image that doesn't pass the test(s) but it's not a hard >> requirement. >> >> I certainly will continue to welcome ideas/suggestions. >> >> Regards, >> >> Nathan >> >> On Monday, N

Re: [packer] Possible for Packer to only push a Docker image based on successful execution of a custom script?

2018-11-26 Thread Megan Marsh
Yeah, that makes sense. This is a reasonable request. Right now we're working on adding HCL2 to Packer, which will probably not come out until Packer 2.0, but that will probably solve this problem. Meanwhile, you may be better off using a local shell script to push the container rather than the do

Re: [packer] Re: WinRM connection failure using Powershell Core

2018-11-28 Thread Megan Marsh
You're absolutely right -- the Powershell provisioner assumes you're on windows. On Tue, Nov 27, 2018 at 2:14 PM Dan W wrote: > I also tried running PACKER_LOG=1 and the system just freezes at this step > > 2018/11/27 22:08:21 ***: 2018/11/27 22:08:21 TempComputeName= > 2018/11/27 22:08:21 ***:

Re: [packer] Re: WinRM connection failure using Powershell Core

2018-11-28 Thread Megan Marsh
And so does the WinRM communicator. If you want to provision a linux vm you're going to need to use the SSH communicatior. On Wed, Nov 28, 2018 at 9:35 AM Megan Marsh wrote: > You're absolutely right -- the Powershell provisioner assumes you're on > windows. > > On T

Re: [packer] VM wont boot after template creation

2018-12-10 Thread Megan Marsh
This sounds to me like https://github.com/hashicorp/packer/pull/6204 Can you take a look there and at the workaround described? We had to revert the code change because it was causing other breakages, and are tracking the problem here: https://github.com/hashicorp/packer/issues/7067 On Mon, Dec 1

Re: [packer] VM wont boot after template creation

2018-12-10 Thread Megan Marsh
Er, the workaround is described in https://github.com/hashicorp/packer/issues/6197 On Mon, Dec 10, 2018 at 9:37 AM Megan Marsh wrote: > This sounds to me like https://github.com/hashicorp/packer/pull/6204 > > Can you take a look there and at the workaround described? We had to > rev

Re: [packer] VM wont boot after template creation

2018-12-10 Thread Megan Marsh
2018 at 9:38:40 AM UTC-8, Megan Marsh wrote: >> >> Er, the workaround is described in >> https://github.com/hashicorp/packer/issues/6197 >> >> On Mon, Dec 10, 2018 at 9:37 AM Megan Marsh wrote: >> >>> This sounds to me like https://github.com/hashicorp/

Re: [packer] VM wont boot after template creation

2018-12-10 Thread Megan Marsh
g.version = "8" > cpuid.corespersocket = "2" > displayname = "VM-packer-build-centos7v2" > > > > On Monday, December 10, 2018 at 9:55:30 AM UTC-8, Megan Marsh wrote: >> >> The _fix_ was reverted in 1.3.3 because it was causing other issue

Re: [packer] VM wont boot after template creation

2018-12-10 Thread Megan Marsh
described in the meta-issue I linked above, if you want to follow them. On Mon, Dec 10, 2018 at 10:13 AM Megan Marsh wrote: > hm. Then maybe this is a different issue after all. Are you sure it's > correctly uploading? We have another problem where OFVTool isn't properly > uploading vm

Re: [packer] VM wont boot after template creation

2018-12-10 Thread Megan Marsh
t; > On Monday, December 10, 2018 at 10:14:47 AM UTC-8, Megan Marsh wrote: >> >> Note, that one should have been reverted in 1.3.3. So if you used 1.3.3 >> to use the vsphere postprocessor to upload the vm to esxi then it should be >> okay. >> >> Another opti

Re: [packer] Packer using Authenticated Proxy with SSL Decryption

2018-12-10 Thread Megan Marsh
I don't think this has been fixed in a more recent version. On Mon, Dec 10, 2018 at 11:07 AM Larry Presswood wrote: > I am attempting to use Packer behind a proxy server which uses ssl > decryption. This proxy has created issues with other tools but i have > generally been able to work around t

Re: [packer] Packer building with running machine

2018-12-17 Thread Megan Marsh
If you're hoping to run against machines that are already running, some kind of provisioning tool like ansible or chef is your best bet. -- This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of thos

Re: [packer] Amazon Import exceeded wait attempts

2019-01-08 Thread Megan Marsh
No, like `export "AWS_MAX_ATTEMPTS=100"; packer build whatever.json` On Tue, Jan 8, 2019 at 10:04 AM Morgan Andrew Davis < morganadavi...@gmail.com> wrote: > You mean something like packer build -var "AWS_MAX_ATTEMPTS=100" > whatever.json? Try specifying it in the command rather than the json fil

Re: [packer] Amazon Import exceeded wait attempts

2019-01-08 Thread Megan Marsh
, January 8, 2019 at 1:17:06 PM UTC-5, Megan Marsh wrote: >> >> No, like `export "AWS_MAX_ATTEMPTS=100"; packer build whatever.json` >> >> On Tue, Jan 8, 2019 at 10:04 AM Morgan Andrew Davis >> wrote: >> >>> You mean something like packer bu

Re: [packer] Run python script in shell-local

2019-01-09 Thread Megan Marsh
You can also use python in your execute_command; the example below works on my mac; python is in my path and the script "hello.py" is in my working directory { "builders": [ { "type": "null", "communicator": "none" } ], "provisioners": [ {

Re: [packer] Run python script in shell-local

2019-01-09 Thread Megan Marsh
I think this is a pretty useful question so I've made a PR adding docs for how to do this (including env vars!) here: https://github.com/hashicorp/packer/pull/7181/files On Wed, Jan 9, 2019 at 9:21 AM Megan Marsh wrote: > You can also use python in your execute_command; the example bel

Re: [packer] Run python script in shell-local

2019-01-09 Thread Megan Marsh
:D -- This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list. GitHub Issues: https://github.com/mitchellh/packer/issues IRC: #packe

Re: [packer] I want to Shutdown windows with sysprep in the provisioning phase without failing

2019-01-15 Thread Megan Marsh
Check out the option "disable_stop_instance" which was designed for exactly your use case :) https://www.packer.io/docs/builders/amazon-ebs.html#disable_stop_instance On Tue, Jan 15, 2019 at 9:43 AM Ibrahim Buamod wrote: > I want to Shutdown windows with sysprep in the provisioning phase without

Re: [packer] How to create a environment variable from one provision to be used in the next provision

2019-01-15 Thread Megan Marsh
There isn't a way to handle this from within packer. Depending on what provisioners you are using you may be able to write the variable to a file that can be read by the next provisioner. -- This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/commun

Re: [packer] SSH connection required?

2019-01-22 Thread Megan Marsh
Depending on the guest OS, you could also use WinRM or another communicator, but the vast majority of Packer provisioners require that you use a true communicator rather than "none" -- This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-gu

Re: [packer] Set working directory for Shell and Powershell

2019-01-24 Thread Megan Marsh
You can probably use the `execute_command` option to have Packer change directories to the one you want to execute from. On Thu, Jan 24, 2019 at 2:32 PM goffries wrote: > Is there a way to set the working directory that packer executes a script > from? Ideally I'd like to to run the script out o

Re: [packer] Set working directory for Shell and Powershell

2019-01-24 Thread Megan Marsh
me` }}", > "elevated_password": "{{.WinRMPassword}}", > "inline": [ > "& {{user > `scriptTargetPath`}}\\artifacts\\windows-netfx3\\windows-netfx3.ps1" > ] > } > > > > On

Re: [packer] Set working directory for Shell and Powershell

2019-01-24 Thread Megan Marsh
execute_command is where we wet the environment vars -- in the example above, we dot-source them from a file using the ". {{.Vars}}" portion of the command -- {{ .Vars }} is the golang templating method for adding items into a string, and in this case .Vars gets replaced with a formatted version of

Re: [packer] Packer Hyper-v wrong boot order

2019-02-13 Thread Megan Marsh
Is this a regression in v. 1.3.4? If so, https://github.com/hashicorp/packer/pull/7147 could be to blame -- otherwise, I'm not sure what's going on. On Wed, Feb 13, 2019 at 6:39 AM Morgan Andrew Davis < morganadavi...@gmail.com> wrote: > Hello There. I am currently attempting to automate the run

Re: [packer] Packer Hyper-v wrong boot order

2019-02-13 Thread Megan Marsh
There isn't but maybe there should be. If you downgrade to 1.3.3 do you still have this issue? in v1.3.4 we made a change to boot order in hyperv which we thought wouldn't affect people but we were clearly wrong. I will revert this change if it turns out that it caused the problem you're seeing.

Re: [packer] Builder variables; are they published anywhere?

2019-02-13 Thread Megan Marsh
Generally these template variables are documented in provisioners and builders within the options that are allowed to use them. For example, https://www.packer.io/docs/provisioners/powershell.html#environment_vars talks about how you can use WinRMPassword. The variables are scattered all over the

Re: [packer] What's the best way to contribute to improving documentation?

2019-02-14 Thread Megan Marsh
We use github for docs contributions all the time -- open a PR with your improvement :D -- This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this

Re: [packer] Packer build error running under WSL

2019-02-21 Thread Megan Marsh
I hate to say it, but our windows support for Docker is pretty terrible and I can almost guarantee that the WSL isn't gonna make it any better. -- This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation o

Re: [packer] Packer hyper-v inside a Vm ware machine

2019-02-25 Thread Megan Marsh
Can your HyperV vm reach the internet? When I've had frustrating boot failures with KS files it's because the vm can't find the files that Packer is serving. Check out this resource on configuring the network: https://www.groovypost.com/howto/share-an-ethernet-or-wireless-network-connection-with-hy

Re: [packer] Packer hyper-v inside a Vm ware machine

2019-02-26 Thread Megan Marsh
Hi, looks like google flagged your emails as spam for some reason; I've unflagged them, so they're available now. The "Default Switch" failing because it is two words is a bug that'll be fixed in the next release. You can find a patched build here: https://github.com/hashicorp/packer/issues/7259

Re: [packer] Removing c:\windows\temp before sysprep?

2019-02-26 Thread Megan Marsh
I'm pretty sure we expect $TEMP to be there, yes. We upload our powershell files to it. If you delete that folder, you can _probably_ work around this by updating the value of $TEMP so that Packer has somewhere to upload files to. -- This mailing list is governed under the HashiCorp Community Gui

Re: [packer] Examples of powershell over SSH?

2019-02-26 Thread Megan Marsh
I think you may find the examples in this repo helpful: https://github.com/joefitzgerald/packer-windows On Tue, Feb 26, 2019 at 9:40 AM goffries wrote: > Anyone have any practical examples of running the powershell provisioner > over SSH using the azure builder? > > -- > This mailing list is gov

Re: [packer] Removing c:\windows\temp before sysprep?

2019-02-26 Thread Megan Marsh
> > On Tuesday, February 26, 2019 at 9:40:59 AM UTC-8, Megan Marsh wrote: >> >> I'm pretty sure we expect $TEMP to be there, yes. We upload our >> powershell files to it. If you delete that folder, you can _probably_ work >> around this by updating the value of $TEMP

Re: [packer] Examples of powershell over SSH?

2019-02-26 Thread Megan Marsh
Unfortunately, no. -- This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list. GitHub Issues: https://github.com/mitchellh/packer/is

Re: [packer] Removing c:\windows\temp before sysprep?

2019-02-26 Thread Megan Marsh
sioning will be gone before the vm is saved into a golden image. On Tue, Feb 26, 2019 at 1:31 PM goffries wrote: > As in after the sysprep step, Or right before? > > On Tuesday, February 26, 2019 at 11:50:56 AM UTC-8, Megan Marsh wrote: >> >> You could have a provisioner delete

Re: [packer] Re: Cannot export to vcenter, without much of an explanation about why in packerlog

2019-03-12 Thread Megan Marsh
We url-encode the password, so that shouldn't be the issue. We also verify the username and password at the beginning of the run, so I don't think the issue is that you've typo'd your credentials. For now, you can try using the shell-local postprocessor to call ovftool directly as a workaround. On

Re: [packer] How to solve problem with many variables in mind?

2019-03-14 Thread Megan Marsh
There's no way to do this directly, but you can use the "file" provisioner to upload a VarFile, and then dot-source the file from within your shell script. -- This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in

Re: [packer] How to declare paths in execute_command

2019-03-14 Thread Megan Marsh
The env_var_file described in the docs won't do what you want. It is created by Packer from the env vars that you supply to environment_vars. It's just writing the environment vars to a file and dot-sourcing that file, rather than declaring the variables inline. It's intended to help people work a

Re: [packer] Inspec provisioner exit codes

2019-03-15 Thread Megan Marsh
@alvaro we recently added an inspec provisioner. I don't think there's currently a way to set extra valid exit codes, but open a feature request on github and maybe someone from the community can try to implement that. -- This mailing list is governed under the HashiCorp Community Guidelines -

Re: [packer] Build packer w/ Windows .exe target

2019-03-15 Thread Megan Marsh
Try: XC_OS=windows ./scripts/build.sh -- This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list. GitHub Issues: https://github.com

Re: [packer] [Packer Breakpoint] how to find the SSH key to SSH into the Packer Builder instance

2019-03-20 Thread Megan Marsh
Currently Packer doesn't write the generated SSH key to file for the breakpoint provisioner. If you open a feature request we could look at implementing this, but right now if you want to use the breakpoint provisioner instead of SSH you'll have to generate your own keys and provide them to Packer.

Re: [packer] Packer errors out trying to parse SSH port

2019-03-20 Thread Megan Marsh
Hi, Nate. This looks like a line ending problem-- we're having trouble grabbing the port because we're not stripping whitespace properly. Can you open a github issue on https://github.com/hashicorp/packer/issues for me? This should be a pretty quick fix. -- This mailing list is governed under th

Re: [packer] Specifying available memory when using vagrant builder

2019-03-25 Thread Megan Marsh
I think you should be able to set this by using the `template` ( https://www.packer.io/docs/builders/vagrant.html#template) option to provide a vagrantfile template that sets v.memory. . The default we use is very bare-bones. -- This mailing list is governed under the HashiCorp Community Guidelin

Re: [packer] Post-Processing not needed

2019-04-04 Thread Megan Marsh
Try setting "skip_export" https://www.packer.io/docs/builders/hyperv-iso.html#skip_export On Thu, Apr 4, 2019 at 4:37 AM Ehsan Tajek wrote: > Hi Rickard, > > i did that, but still it deletes my vm and create an output file, which I > need to manually create the VM again. > See picture. How i can

Re: [packer] Packer Cloud neutral Solution

2019-04-15 Thread Megan Marsh
Not without some pre-processing on your end. What we do for regression tests is store the json blobs for each provisioner/builder independently and then use a python script to combine them into one json file for each build. This feature may end up coming when we integrate HCL2 later this year, but

Re: [packer] unknown configuration key errors on first run

2019-04-26 Thread Megan Marsh
You can safely ignore those lines about the plugins :) . The problem is that your version of Packer isn't recognizing those keys. Can you share your packer template (especially the builder configuration) and what version of Packer you're using? -- This mailing list is governed under the HashiCorp

Re: [packer] unknown configuration key errors on first run

2019-04-29 Thread Megan Marsh
n key names. On Sat, Apr 27, 2019 at 9:11 AM Barna Gyomorei wrote: > Thanks for the tip Megan! I had 1.0.4, don't remember exactly how, but > probably installed with apt or yum. Now i downloaded from the website, so > it's 1.4.0. > > On Friday, April 26, 2019 at 7:33:39 PM U

Re: [packer] Packer fails to connect after domain join, windows-restart stuck in 401 invalid content

2019-05-13 Thread Megan Marsh
I'm a novice at windows-specific sysadmining -- when you do a domain join, does the original username/password you connected with still work or does the domain join render it no longer valid? On Mon, May 13, 2019 at 12:49 PM Dina Muscanell wrote: > Hi All, > > *configuration:* > *Packer v 1.4.0*

Re: [packer] Packer fails to connect after domain join, windows-restart stuck in 401 invalid content

2019-05-13 Thread Megan Marsh
I'd like to validate this for absolute sure. You can use the shell-local provisioner to find out the packer password and make sure that you can still connect via WinRM using those passwords. "provisioners": [ { "type": "shell-local", "inline": ["echo \"Packer WinRMPassword is {{

Re: [packer] Packer fails to connect after domain join, windows-restart stuck in 401 invalid content

2019-05-15 Thread Megan Marsh
I just took a look at the golang winrm library that we're using -- the README says it doesn't support domain users, which would explain why this stops working for you once you do a join. I saw that you found and commented on an issue open on the Packer repo that had to do with domain joins -- I'll

Re: [packer] Running windows-shell provisioner via ssh communicator cannot open gui application

2019-05-21 Thread Megan Marsh
You may be able to try to change the execute_command option to call PsExec.exe; if PsExec needs to be called on your host machine rather than your guest VM you cab use the shell-local provisioner to call it instead of the windows-shell provisioner. -- This mailing list is governed under the Hashi

Re: [packer] Running windows-shell provisioner via ssh communicator cannot open gui application

2019-05-22 Thread Megan Marsh
Then there may not be a way to do this. Packer was not designed with the need for GUI interaction in mind. -- This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in you

Re: [packer] Re: Feature Request: packer EBS builder - share encrypted AMIs

2019-05-23 Thread Megan Marsh
This sounds like it's worth implementing; It's easier for the maintainers to track if you open a feature request on Packer's github -- mind doing that? On Thu, May 23, 2019 at 9:07 AM Shashank wrote: > +1 > > On Thursday, May 23, 2019 at 8:27:18 PM UTC+5:30, Andrew Citera wrote: >> >> AWS recent

Re: [packer] Re: Feature Request: packer EBS builder - share encrypted AMIs

2019-05-23 Thread Megan Marsh
The issue text says bugs _or_ feature requests belong on GH, and other general questions belong here, but I can see how a quick read would have sent you here for features too. Without looking at the details, I'd say it probably shouldn't be too bad for me or someone else who is already spun up on

Re: [packer] Create HyperV disk using VirtualBox Builder

2019-06-20 Thread Megan Marsh
The vagrant/hyperv post-processor assumes you have performed a hyeprv build. You can't use it to convert a virtualbox image into a hyperv image. -- This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation

Re: [packer] Re: amazon-ebs: Error waiting for AMI

2019-06-21 Thread Megan Marsh
Can you share your Packer template? On Fri, Jun 21, 2019 at 4:05 AM Kishore Ponniah wrote: > Hi All, > > I have set the env variable as follows and will re-run the build. In the > meantime can anyone suggest if I am missing something? > $env:PACKER_LOG=1 > $env:PACKER_LOG_PATH="C:\Packer\packerl

Re: [packer] Run VBoxManage commands after running the machine

2019-06-24 Thread Megan Marsh
you can use the shell-local provisioner to call vboxmanage directly. On Mon, Jun 24, 2019 at 2:36 AM Shubham Bansal wrote: > I am creating a windows Vm using VBoxManage-ovf. I want to run VBoxManage > command "guestcontrol". But it can run only when the virtual machine is > running (turned on).

[packer] Packer v1.4.2 is here

2019-06-26 Thread Megan Marsh
Hey Packer Community, We've just cut the release for Packer v1.4.2. As part of this release, we've introduced a new "packer console" command which will allow you to test variable interpolation via the various Packer template engines in real time. For those of you who have used and found val

Re: [packer] Re: Problems with path passed to VBoxManage from Packer using WSL.

2019-06-27 Thread Megan Marsh
This sounds like a bug; can you open an issue in https://github.com/hashicorp/packer/issues? I can't promise I'll get to it myself terribly soon, but maybe another community member can take a stab at the pathing. The way we've solved WSL pathing issues in the past is by having users tell the shell

Re: [packer] Does anyone have an example of a packer builder to create a Windows 10 AMI in AWS?

2019-06-28 Thread Megan Marsh
Try: "source_ami_filter": { "filters": { "virtualization-type": "hvm", "name": "*Windows_Server-2016*English-Core-Base*", "root-device-type": "ebs" }, "most_recent": true, "owners": "amazon" }, Here are all of the available english nam

Re: [packer] Data Sharing between Provisioners

2019-07-02 Thread Megan Marsh
Currently, there is no way to share data between provisioners in this way. -- This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list

Re: [packer] HTTP Address passed to Powershell Provisioner

2019-07-16 Thread Megan Marsh
Packer automatically sets the env var PACKER_HTTP_ADDR as an environment variable when calling the Powershell provisioner, so you don't need to do what you're doing with the `environment_vars` in the powershell provisioner. Just access it like this: ``` { "type": "powershell", "elevat

Re: [packer] Filter secret logging

2019-08-12 Thread Megan Marsh
That should work. Without more details about your plugin though, I can't help more. On Fri, Aug 2, 2019 at 1:04 PM Udbhav wrote: > Can anyone please tell me how to prevent logging of secrets in custom > plugins? I looked at packer codebase and tried > `packer.LogSecretFilter.Set(Secret_String)`

Re: [packer] Can't disable debug messages when using Packer as a library

2019-08-12 Thread Megan Marsh
Ah. SetDebug is meant to tell the Packer build to run in debug-mode, which means pausing between steps. It doesn't control the debug logging. The debug logging is handled by setting or not setting PACKER_LOG=1, and the behavior is controlled and can be read in `logOutput()` in log.go. On Thu, Aug

  1   2   3   >