这是我的第一个问题。我试图遵循所有的指导方针。
我试图使用Packer来创建Debian 8的Vagrant映像。如果我只使用“构建器”模板运行一个packer构建,它将成功执行并生成一个Virtualbox映像。当我试图添加“提供程序”和/或“后处理程序”模板时,我开始出错。错误发生在大约10秒内。它不能运行建造者。错误信息是:
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.我已经为此做了几天了。我有:
我的封隔器模板文件:
{
"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"]
}我没有足够的声誉添加额外的链接。TCP视图输出:
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系统信息:
我的完整代码在Github 存储库上。
我在这个要旨中的完全错误登录
谢谢你能提供的任何帮助。
发布于 2016-01-03 00:23:53
正如格雷戈里·尼斯贝特( Gregory Nisbet )所指出的,这是防火墙问题。我停止了所有的McAfee服务,并且能够继续工作。
发布于 2015-12-30 23:59:26
我和windows主机上的封隔器有类似的问题,但我可以正确地构建(同样,在流浪者中提供错误)。
但您可以使用或比较另一个项目封隔器,为我正确运行与您的项目。也许找到一种解决或理解其他概念的方法可以帮助您:packer ubuntu项目
https://stackoverflow.com/questions/34486582
复制相似问题