Hello Rickard,
I am having a very similar problem. It seems that the working container,
which has been started from packer, has no dns resolution set up. My packer
files are very similar to those you posted for me earlier - which some
variables for input and output image names, and a few container shell
debugging commands.
template.json:
-----------------
{
"variables": {
"base_im": "{{env `base_image`}}",
"output_im": "{{env `output_image`}}"
},
"builders": [
{
"type": "lxd",
"name": "lxd-xenial",
"image": "{{user `base_im`}}",
"output_image": "{{user `output_im`}}",
"publish_properties": {
"description": "Trivial repackage with Packer"
}
}
],
"provisioners": [
{
"type": "shell",
"inline": [
"lsb_release -a",
"cat /etc/resolv.conf",
"ping -c 1 archive.ubuntu.com",
"apt-get update && apt-get install -y python-minimal" ]
},
{
"type": "ansible",
"playbook_file": "./playbook.yml",
"extra_arguments": [ "-c", "lxd", "-i", "packer-lxd-xenial,", "-l",
"packer-lxd-xenial" ]
}
]
}
playbook.yml:
------------------
---
- hosts: all
tasks:
- name: Shelling
shell: echo "Hello world"
Cheers,
--Peter Goodall
On Saturday, January 20, 2018 at 7:22:41 PM UTC+11, Rickard von Essen wrote:
>
> Can you share your packer template?
>
> On Jan 20, 2018 06:01, "HSB" <[email protected] <javascript:>> wrote:
>
>> 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?
>> [...]
>>
>
--
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/packer-tool/669756c5-2621-4b9e-a69c-dc69f6aa01a5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.