[packer] Error getting SSH address

2018-04-13 Thread Aaron Kulbe
The management won't let us run packer builds on vSphere yet. So we're 
stuck standing up a VM with nested virt enabled on it.

When I attempt to do a build, I get this in the log:

2018/04/14 01:01:03 packer: 2018/04/14 01:01:03 [DEBUG] Error getting SSH 
address: IP lookup failed: None of the found device(s) [vmnet8] has a DHCP 
lease for MAC 00:0c:29:81:91:5d
2018/04/14 01:01:08 packer: 2018/04/14 01:01:08 Located networkmapper 
configuration file using Workstation: /etc/vmware/netmap.conf
2018/04/14 01:01:08 packer: 2018/04/14 01:01:08 GuestIP discovered device 
matching nat: vmnet8
2018/04/14 01:01:08 packer: 2018/04/14 01:01:08 Lookup up IP information...
2018/04/14 01:01:08 packer: 2018/04/14 01:01:08 GuestAddress found MAC 
address in VMX: 00:0c:29:81:91:5d
2018/04/14 01:01:08 packer: 2018/04/14 01:01:08 Trying DHCP leases path: 
/etc/vmware/vmnet8/dhcpd/dhcpd.leases
2018/04/14 01:01:08 packer: 2018/04/14 01:01:08 IP lookup failed: None of 
the found device(s) [vmnet8] has a DHCP lease for MAC 00:0c:29:81:91:5d

(it repeats continuously)

Here is my template:

➜  build_here cat rhel72.json
{
  "builders": [
{
  "type": "vmware-iso",
  "boot_command": [
" text biosdevname=0 net.ifnames=0 
ks=hd:fd0/baseimage_130_72.cfg"
  ],
  "boot_wait": "15s",
  "disk_size": "20480",
  "guest_os_type": "rhel7-64",
  "headless": true,
  "iso_urls": [
"rhel-server-7.2-x86_64-dvd.iso"
  ],
  "floppy_files": [ "http/baseimage_130_72.cfg" ],
  "iso_checksum_type": "sha256",
  "iso_checksum": 
"03f3a0291634335f6995534d829bd21ffaa0d04dfeb1b2fb81052d64a4d5",
  "ssh_username": "vagrant",
  "ssh_password": "vagrant",
  "ssh_port": 22,
  "ssh_wait_timeout": "2s",
  "shutdown_command": "echo 'vagrant'|sudo -S /sbin/halt -h -p",
  "tools_upload_flavor": "linux",
  "vm_name": "packer-rhel-72-x86_64",
  "vnc_port_min": "5902",
  "vnc_port_max": "5902",
  "vnc_disable_password": true,
  "network": "nat",
  "vmx_data": {
"cpuid.coresPerSocket": "1",
"memsize": "1024",
"numvcpus": "1"
  }
}
  ],
  "post-processors": [
{
  "output": "builds/{{.Provider}}-rhel72.box",
  "type": "vagrant",
  "keep_input_artifact": true
},
{
  "type": "ovftool",
  "only": [
"vmware-iso"
  ],
  "format": "ova"
}
  ]
}

-- 
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: #packer-tool on Freenode
--- 
You received this message because you are subscribed to the Google Groups 
"Packer" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to packer-tool+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/packer-tool/75afbb96-e1cb-4879-962f-6d2b30c32f30%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[packer] "Error Waiting for AMI" when Copying ECS AMI to Other Regions

2018-04-13 Thread Justin
I have several images in a pipeline being built by Packer, all using the 
same template, more or less.

High-level:

   - AWS EBS Builder
   - Copies resulting AMI to several regions
   - Puppet Masterless Provisioner
   - Several Shell Provisioners

All of the other images run through without any issue, however for some 
reason the Amazon AWS ECS image keeps getting tripped up at copy time.  
Thought maybe it was the poll rate causing some sort of API throttling, but 
when increasing it to 5 seconds, the error still persists.  Here's the log 
with debug entries:


2018/04/14 00:29:50 ui: ==> amazon-ebs: Waiting for AMI to become ready...
==> amazon-ebs: Waiting for AMI to become ready...
2018/04/14 00:29:50 packer: 2018/04/14 00:29:50 Waiting for state to 
become: available
2018/04/14 00:29:50 packer: 2018/04/14 00:29:50 Using 5s as polling delay 
(change with AWS_POLL_DELAY_SECONDS)
2018/04/14 00:29:50 packer: 2018/04/14 00:29:50 Allowing 300s to complete 
(change with AWS_TIMEOUT_SECONDS)
2018/04/14 00:32:01 ui: ==> amazon-ebs: Copying AMI (ami-e1610399) to other 
regions...
==> amazon-ebs: Copying AMI (ami-e1610399) to other regions...
2018/04/14 00:32:01 ui: amazon-ebs: Copying to: us-east-1
amazon-ebs: Copying to: us-east-1
2018/04/14 00:32:01 ui: amazon-ebs: Copying to: us-east-2
amazon-ebs: Copying to: us-east-2
2018/04/14 00:32:01 ui: amazon-ebs: Copying to: us-west-1
amazon-ebs: Copying to: us-west-1
2018/04/14 00:32:01 ui: amazon-ebs: Copying to: eu-west-1
amazon-ebs: Copying to: eu-west-1
2018/04/14 00:32:01 ui: amazon-ebs: Copying to: ap-southeast-1
amazon-ebs: Copying to: ap-southeast-1
2018/04/14 00:32:01 ui: amazon-ebs: Copying to: eu-central-1
amazon-ebs: Copying to: eu-central-1
2018/04/14 00:32:01 ui: amazon-ebs: Waiting for all copies to 
complete...
amazon-ebs: Waiting for all copies to complete...
2018/04/14 00:32:01 packer: 2018/04/14 00:32:01 Waiting for state to 
become: available
2018/04/14 00:32:01 packer: 2018/04/14 00:32:01 Using 5s as polling delay 
(change with AWS_POLL_DELAY_SECONDS)
2018/04/14 00:32:01 packer: 2018/04/14 00:32:01 Allowing 300s to complete 
(change with AWS_TIMEOUT_SECONDS)
2018/04/14 00:32:02 packer: 2018/04/14 00:32:02 Waiting for state to 
become: available
2018/04/14 00:32:02 packer: 2018/04/14 00:32:02 Using 5s as polling delay 
(change with AWS_POLL_DELAY_SECONDS)
2018/04/14 00:32:02 packer: 2018/04/14 00:32:02 Allowing 300s to complete 
(change with AWS_TIMEOUT_SECONDS)
2018/04/14 00:32:02 packer: 2018/04/14 00:32:02 Waiting for state to 
become: available
2018/04/14 00:32:02 packer: 2018/04/14 00:32:02 Using 5s as polling delay 
(change with AWS_POLL_DELAY_SECONDS)
2018/04/14 00:32:02 packer: 2018/04/14 00:32:02 Allowing 300s to complete 
(change with AWS_TIMEOUT_SECONDS)
2018/04/14 00:32:02 packer: 2018/04/14 00:32:02 Waiting for state to 
become: available
2018/04/14 00:32:02 packer: 2018/04/14 00:32:02 Using 5s as polling delay 
(change with AWS_POLL_DELAY_SECONDS)
2018/04/14 00:32:02 packer: 2018/04/14 00:32:02 Allowing 300s to complete 
(change with AWS_TIMEOUT_SECONDS)
2018/04/14 00:32:03 packer: 2018/04/14 00:32:03 Waiting for state to 
become: available
2018/04/14 00:32:03 packer: 2018/04/14 00:32:03 Using 5s as polling delay 
(change with AWS_POLL_DELAY_SECONDS)
2018/04/14 00:32:03 packer: 2018/04/14 00:32:03 Allowing 300s to complete 
(change with AWS_TIMEOUT_SECONDS)
2018/04/14 00:32:03 packer: 2018/04/14 00:32:03 Waiting for state to 
become: available
2018/04/14 00:32:03 packer: 2018/04/14 00:32:03 Using 5s as polling delay 
(change with AWS_POLL_DELAY_SECONDS)
2018/04/14 00:32:03 packer: 2018/04/14 00:32:03 Allowing 300s to complete 
(change with AWS_TIMEOUT_SECONDS)
2018/04/14 00:40:22 ui error: ==> amazon-ebs: 6 error(s) occurred:
==> amazon-ebs: 
==> amazon-ebs: * Error waiting for AMI (ami-4c8c9f2c) in region 
(us-west-1): couldn't find resource
==> amazon-ebs: * Error waiting for AMI (ami-0071d47f) in region 
(us-east-1): couldn't find resource
==> amazon-ebs: * Error waiting for AMI (ami-6f5b680a) in region 
(us-east-2): couldn't find resource
==> amazon-ebs: * Error waiting for AMI (ami-1ef5d167) in region 
(eu-west-1): couldn't find resource
==> amazon-ebs: * Error waiting for AMI (ami-85a485f9) in region 
(ap-southeast-1): couldn't find resource
==> amazon-ebs: * Error waiting for AMI (ami-8697cc6d) in region 
(eu-central-1): couldn't find resource
==> amazon-ebs: 6 error(s) occurred:
==> amazon-ebs: 
==> amazon-ebs: * Error waiting for AMI (ami-4c8c9f2c) in region 
(us-west-1): couldn't find resource
2018/04/14 00:40:22 ui: ==> amazon-ebs: Deregistering the AMI because 
cancellation or error...
==> amazon-ebs: * Error waiting for AMI (ami-0071d47f) in region 
(us-east-1): couldn't find resource
==> amazon-ebs: * Error waiting for AMI (ami-6f5b680a) in region 
(us-east-2): couldn't find resource
==> amazon-ebs: * Error waiting for AMI (ami-1ef5d167) in region 

[packer] Re: Variable file option in packer

2018-04-13 Thread Bad Santa
I also have this issue. Were you able to resolve it?

On Monday, November 30, 2015 at 4:31:35 AM UTC-8, Sandeep Sharma wrote:
>
> Hi
>
>
> I have three aws accounts so trying to use variable file for AMI 
> permission. 
>
> variables.json
>
> {
> "ami_users" : ["1", "", ""],
> "ami_regions": ["us-east-1", "eu-west-1"]
> }
>
> ]# packer build -var-file=variables.json /tmp/test.json
> invalid value "variables.json" for flag -var-file: Error reading variables 
> in 'variables.json': json: cannot unmarshal array into Go value of type 
> string
>
>
> Is this correct?
>
> Regards
> Sandeep Sharma
>

-- 
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: #packer-tool on Freenode
--- 
You received this message because you are subscribed to the Google Groups 
"Packer" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to packer-tool+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/packer-tool/69f3e0be-fb7d-4875-9903-5b65f75a01b6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [packer] Re: Packer v1.2.1 - WinRM communicator timeout

2018-04-13 Thread Dave Nelson
Thanks, Jon.

Just out of curiosity, what version of Windows was your template?

I have tried the code from the website and am still having no luck.  
However, I will double-check that WinRM is firing up on the VM before 
raising an issue.

Cheers all,

Dave.

On Friday, April 13, 2018 at 4:54:38 PM UTC+1, j.r.haw...@googlemail.com 
wrote:
>
> Thanks for this, I hit the same thing with a template which had previously 
> worked.
> I got rid of quickconfig and used the code from the windows example and 
> template works again.
>
> If you get stuck at this point if you can connect to the temp vm and poke 
> around you may well find like I did that winrm wasn't running and firewall 
> wouldn't allow winrm.
>
> Jon
>
> On Thursday, April 12, 2018 at 5:25:39 PM UTC+1, Megan Marsh wrote:
>>
>> One thing jumps immediately to mind. You're using quickconfig, which some 
>> users have found causes a race condition with Packer. Normally I find this 
>> issue to be only sporadic, but it's something to try. We have an example in 
>> our docs of a winrm config script that doesn't use quickconfig.  
>>
>>
>> https://www.packer.io/intro/getting-started/build-image.html#a-windows-example
>>
>> If that doesn't do it, I'd like you to open an issue on the Packer github 
>> for me, if you don't mind.
>>
>> Thanks!
>>
>

-- 
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: #packer-tool on Freenode
--- 
You received this message because you are subscribed to the Google Groups 
"Packer" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to packer-tool+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/packer-tool/b2fdb5d4-2d04-4a30-bed9-5ad648edcce4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [packer] Re: Packer v1.2.1 - WinRM communicator timeout

2018-04-13 Thread j.r.hawkesworth via Packer
Thanks for this, I hit the same thing with a template which had previously 
worked.
I got rid of quickconfig and used the code from the windows example and 
template works again.

If you get stuck at this point if you can connect to the temp vm and poke 
around you may well find like I did that winrm wasn't running and firewall 
wouldn't allow winrm.

Jon

On Thursday, April 12, 2018 at 5:25:39 PM UTC+1, Megan Marsh wrote:
>
> One thing jumps immediately to mind. You're using quickconfig, which some 
> users have found causes a race condition with Packer. Normally I find this 
> issue to be only sporadic, but it's something to try. We have an example in 
> our docs of a winrm config script that doesn't use quickconfig.  
>
>
> https://www.packer.io/intro/getting-started/build-image.html#a-windows-example
>
> If that doesn't do it, I'd like you to open an issue on the Packer github 
> for me, if you don't mind.
>
> Thanks!
>

-- 
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: #packer-tool on Freenode
--- 
You received this message because you are subscribed to the Google Groups 
"Packer" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to packer-tool+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/packer-tool/2a69ae97-073a-4cab-b970-29ef287f613c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.