This is my 1st question. I attempted to follow all of the guidelines.
I am attempting to use Packer to create a Vagrant image of Debian 8. If I run a packer build with only the "builders" template it will execute successfully and a Virtualbox image will be produced. When I attempted to add the "provisioners" and/or "post-processers" templates, I started to error. The error occurs within about 10 seconds. It won't run the builder. The error message is:
ui error: Failed to initialize build 'virtualbox-iso': error initializing provisioner 'shell': dial tcp 127.0.0.1:10000: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
I have been working on this for a few days now. I have:
- search Google for the error text
- read through some of the Packer source (thought I am not familiar with Go)
- reinstalled Packer with a fresh download from Packer.io
- ensured the files are unblocked
- executed as my default user and administrator
- used Git Bash instead of cmd.exe
- executed from Powershell
- Used the atlas-packer-vagrant-tutorial as provided by Atlas. It will build on Atlas, but not locally.
My Packer template file:
{
"provisioners": [{
"type": "shell",
"scripts": [
"scripts/vagrant.sh"
],
"override": {
"virtualbox-iso": {
"execute_command": "echo 'vagrant' | sudo -S bash '{{.Path}}'"
}
}
}],
"builders": [{
"type": "virtualbox-iso",
"guest_os_type": "Debian_64",
"iso_url": "http://cdimage.debian.org/debian-cd/8.2.0/amd64/iso-cd/debian-8.2.0-amd64-CD-1.iso",
"iso_checksum": "234bd43d85974299d501f370ac3e7592b98832d98f82be3aff190ff3af831f8cd7574a75f4c9b36c347f138e82ccb40ff3746a4c94e7d59e4ee711e0c96dbf1d",
"iso_checksum_type": "sha512",
"ssh_username": "vagrant",
"ssh_password": "vagrant",
"ssh_wait_timeout": "120m",
"shutdown_command": "echo 'vagrant' | sudo -S shutdown -h now",
"disk_size": "20480",
"http_directory": "http",
"boot_command": [
"<esc><wait>",
"auto url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed.cfg ",
"<enter>"
],
"vboxmanage": [
["modifyvm", "{{.Name}}", "--memory", "4096"],
["modifyvm", "{{.Name}}", "--cpus", "2"]
]
}],
"post-processors": ["vagrant"]
}
I don't have enough reputation to add additional links. The TCP View output:
packer-provisioner-shell.exe 3940 TCP 127.0.0.1 10000 0.0.0.0 0 LISTENING
packer-builder-virtualbox-iso.exe 11284 TCP 127.0.0.1 10000 127.0.0.1 49568 ESTABLISHED
packer.exe 12180 TCP 127.0.0.1 49568 127.0.0.1 10000 ESTABLISHED
packer.exe 12180 TCP 127.0.0.1 49571 127.0.0.1 10000 SYN_SENT
System Info:
- Windows 7 Pro SP1 (64-bit)
- Packer 0.8.6
My full code is on Github repo
My full error log in in this Gist
Thanks for any help you can provide.