[packer] Unprivileged and non-interactive

2017-08-09 Thread andrewsav
I'm trying to run packer from a Teamcity agent, which means that the packer is spawned under unprivileged service account. If I log in to that service account interactively and run packer build it works. This is the build I'm running: https://github.com/boxcutter/ubuntu It also works from the

Re: [packer] Unprivileged and non-interactive

2017-08-09 Thread andrewsav
Thank you for your reply! Yes, it's windows. runas works without error - as long as it's run interactively, that is not from a windows service it works. I set the variable and I examined the more verbose log. No additional clues found. :( Andrew On Wednesday, 9 August 2017 21:15:49 UTC+12, Al

Re: [packer] Unprivileged and non-interactive

2017-08-09 Thread andrewsav
Here is the verbose log https://gist.github.com/AndrewSav/670622133d5b24e00b6d85308254fd34 I used this https://nssm.cc/ to create a windows service that points to a command file that starts packer (with the same command line that works interactively, and also as runas). The logs produced are

Re: [packer] Unprivileged and non-interactive

2017-08-09 Thread andrewsav
https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail> > > <#CAHqq0ew8cNCS5qiDqZpgaLZD0nxom8mLdm4p4n80E1GnpUPrUw@mail.gmail.com_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2> > > On Wed, Aug 9, 2017 at 12:29 PM, > wrote: > >> Here is the verbose log &

Re: [packer] Unprivileged and non-interactive

2017-08-09 Thread andrewsav
/www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail> > > <#CAHqq0ew8cNCS5qiDqZpgaLZD0nxom8mLdm4p4n80E1GnpUPrUw@mail.gmail.com_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2> > > On Wed, Aug 9, 2017 at 12:29 PM, > wrote: &g

Re: [packer] Unprivileged and non-interactive

2017-08-09 Thread andrewsav
m >> TC agent run packer? >> >> >> Alvaro. >> >> >> >> <https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail> >> Virusvrij. >> www.avast.com >> <https://www.avast.com/sig-email?utm_medium=email&utm_source=link

Re: [packer] Unprivileged and non-interactive

2017-08-11 Thread andrewsav
>> So is there any Antivirus? can you disable it? >>>> >>>> It seems realted to the processes in this case virtualbox and vmware >>>> not being able to create COM objects. >>>> >>>> I have TeamCity at home, and I use the agent to run

[packer] Additional disks with vmware-vmx

2017-08-13 Thread andrewsav
Hello all, I'd like to add hard disks to the machine I'm building with vmware-vmx. What is the best way to achieve that? Thanks, Andrew -- This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of

Re: [packer] Additional disks with vmware-vmx

2017-08-14 Thread andrewsav
Thank you for that. This is what I ended up with: "Copying template $source..." | Write-Host Copy-Item -Path "$source" -Destination "." -recurse # $base has vmx template folder name Move-Item $base $stage "Creating addition virtual disk..." | Write-Host . "C:\Program Files (x86)\VMware\VMware Wo

[packer] Strange filename vmware-vmx is producing

2017-08-14 Thread andrewsav
Hello, This is how the vmx file name packer produced looks like: The packer json file does NOT contain substring "timestamp". Is this a packer bug? Note this i

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

2017-10-18 Thread andrewsav
Hello all, I'm running packer as follows: packer build -on-error=ask -var-file="rancheros-config.json" -var-file= "vsphere.json" -var-file="vsphere_password.json" rancheros.json The config files and packer log are available here

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

2017-10-19 Thread andrewsav
> wrote: > >> Hello all, >> >> I'm running packer as follows: >> >> packer build -on-error=ask -var-file="rancheros-config.json" -var-file= >> "vsphere.json" -var-file="vsphere_password.json" rancheros.json >> >> The co

[packer] "Provisioning with shell script" occasionally not working

2017-10-19 Thread andrewsav
I know that this one is hard to track down, so I'm mainly writing so that the others new that there is a potential problem and on the off-chance that someone came across this one already. In a Windows Server build I'm running quite a few shell (powershell) provisioner steps. Sometimes some of t

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

2017-10-19 Thread andrewsav
>>> >>> Can you file two issues on github one for each of these. Thanks! >>> >>> / Rickard >>> >>> >>> >>> On Oct 19, 2017 04:09, wrote: >>> >>>> Hello all, >>>> >>>> I'm runn

Re: [packer] "Provisioning with shell script" occasionally not working

2017-10-23 Thread andrewsav
Here: https://github.com/hashicorp/packer/issues/5496 On Saturday, 21 October 2017 09:08:20 UTC+13, Megan Marsh wrote: > > Hey Andrew, > > Can you open an issue on github? I've put a lot of work into trying to > make windows powershell more reliable lately and would like to take a look. > > On T

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

2017-10-23 Thread andrewsav
t did it wrong. (in the meantime the >>>>> best way to troubleshoot is to run the command manually) >>>>> >>>>> Can you file two issues on github one for each of these. Thanks! >>>>> >>>>> / Rickard >>>>> >&g

[packer] winrm_username/password vs elevated_user/password

2017-11-13 Thread andrewsav
Hello, can some explain to me why, for winrm we specify winrm_username/password in the builder, but we specify elevated_user/password to run the very same script in the provisioner? I understand that you usually do not need both, but why credentials to run the same thing are specified in two d

[packer] Re: winrm_username/password vs elevated_user/password

2017-11-15 Thread andrewsav
I don't think I understand this. >>An elevated command is run through a scheduled task and for that task to work correctly, both the username and password must be set on the task definition Okay, but same goes for regular WinRm connection except the scheduled task part. For a regular WinRm con