Hi, Created new VM Box using Vagrant. I can SSH and also connect to internet from that host.--But when I execute packer build (type: lxd) with shell commands for ubuntu updates, I get following error. I can CURL all of the following urls from command line successfully. I have name-servers setup properly.But, I am not sure why packer is complaining about it? Thoughts?xenial-container: Firewall stopped and disabled on system startupxenial-container: sudo: unable to resolve host packer-xenial-container: Connection refusedxenial-container: Err:1 http://security.ubuntu.com/ubuntu xenial-security InReleasexenial-container: Temporary failure resolving 'security.ubuntu.com'xenial-container: Err:2 http://archive.ubuntu.com/ubuntu xenial InReleasexenial-container: Temporary failure resolving 'archive.ubuntu.com'xenial-container: Err:3 http://archive.ubuntu.com/ubuntu xenial-updates InReleasexenial-container: Temporary failure resolving 'archive.ubuntu.com'xenial-container: Err:4 http://archive.ubuntu.com/ubuntu xenial-backports InReleasexenial-container: Temporary failure resolving 'archive.ubuntu.com'xenial-container: W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/xenial-updates/InRelease Temporary failure resolving 'archive.ubuntu.com'xenial-container: W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/xenial-backports/InRelease Temporary failure resolving 'archive.ubuntu.com'xenial-container: W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/xenial-security/InRelease Temporary failure resolving 'security.ubuntu.
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/packer-tool/4b63ceae-f93a-4fe8-a3d1-e3869e11f4d2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To unsubscribe from this group and stop receiving emails from it, send an email to packer-tool...@googlegroups.com.
Thanks. After some debugging and playing around, I found that the issue was with Linux Container configuration and packer failed executing commands on Linux Container.
[...]
Hello Rickard,
I am using ‘ubuntu-daily:16.04’ as my base_image.
have attached relevant files. Project very similar to the example you posted for me some time ago.
Here is the output from running packer:
packer build template.json
lxd-xenial output will be in this color.
==> lxd-xenial: Creating container...
==> lxd-xenial: Provisioning with shell script: /tmp/packer-shell321894822
lxd-xenial: Distributor ID: Ubuntu
lxd-xenial: No LSB modules are available.
lxd-xenial: Description: Ubuntu 16.04.4 LTS
lxd-xenial: Release: 16.04
lxd-xenial: Codename: xenial
lxd-xenial: # Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
lxd-xenial: # DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
lxd-xenial: ping: unknown host archive.ubuntu.com
==> lxd-xenial: Unregistering and deleting deleting container...
To unsubscribe from this group and stop receiving emails from it, send an email to packer-tool...@googlegroups.com.
Seems to be a timing issue. Runs OK with -debug flag on packer.
sleep 15s
makes it suceed too:
"provisioners": [
{
"type": "shell",
"inline": [
"lsb_release -a",
"sleep 15s",
"cat /etc/resolv.conf",
"ping -c 1 archive.ubuntu.com",
"apt-get update && apt-get install -y python-minimal" ]
},
packer build -debug template.json
Debug mode enabled. Builds will not be parallelized.
lxd-xenial output will be in this color.
==> lxd-xenial: Creating container...
==> lxd-xenial: Pausing after run of step 'stepLxdLaunch'. Press enter to continue.
==> lxd-xenial: Provisioning with shell script: /tmp/packer-shell373068117
lxd-xenial: Distributor ID: Ubuntu
lxd-xenial: No LSB modules are available.
lxd-xenial: Description: Ubuntu 16.04.4 LTS
lxd-xenial: Release: 16.04
lxd-xenial: Codename: xenial
lxd-xenial: # Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
lxd-xenial: # DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
lxd-xenial: nameserver 10.89.242.1
lxd-xenial: search lxd
lxd-xenial: PING archive.ubuntu.com (91.189.88.162) 56(84) bytes of data.
lxd-xenial: 64 bytes from yukinko.canonical.com (91.189.88.162): icmp_seq=1 ttl=48 time=278 ms
lxd-xenial:
lxd-xenial: --- archive.ubuntu.com ping statistics ---
lxd-xenial: 1 packets transmitted, 1 received, 0% packet loss, time 0ms
lxd-xenial: rtt min/avg/max/mdev = 278.910/278.910/278.910/0.000 ms
lxd-xenial: Hit:1 http://archive.ubuntu.com/ubuntu xenial InRelease
lxd-xenial: Get:2 http://security.ubuntu.com/ubuntu xenial-security InRelease [102 kB]
lxd-xenial: Get:3 http://archive.ubuntu.com/ubuntu xenial-updates InRelease [102 kB]
lxd-xenial: Get:4 http://security.ubuntu.com/ubuntu xenial-security/main amd64 Packages [463 kB]
lxd-xenial: Get:5 http://archive.ubuntu.com/ubuntu xenial-backports InRelease [102 kB]
lxd-xenial: Get:6 http://archive.ubuntu.com/ubuntu xenial/universe amd64 Packages [7532 kB]
To unsubscribe from this group and stop receiving emails from it, send an email to packer-tool+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/packer-tool/a0cad9c4-a70d-44c0-9633-efab07c32710%40googlegroups.com.