Packer on Windows host behind corporate proxy - Bad archive mirror
Tset-Noitamotua opened this issue · comments
Hey guys, I'm tryin to build the images with Packer on a Windows 7 64bit host which is behind a corporate proxy and the process always stucks at the same step where the package manager should be configured ( error message: Bad archive mirror):
I have set proxy environment variables in Windows for http_proxy, https_proxy and no_proxy, e.g.:
λ echo $http_proxy
http://user:password@proxyhost:8888
(proxy uses authentification)
But it seems that my proxy environment variables are not forwarded to the virtual machine(?)
The proxy settings are being passed to the VM https://github.com/boxcutter/debian/blob/master/debian.json#L137-L141
That error message is from an earlier stage though, in the preseed before the provisioner kicks in. You'll likely have to figure out some way to add a d-i mirror/http/proxy string
to the preseed file ideally without disturbing non-proxy installs. Another possibility is adding a d-i mirror/http/proxy string
setting in the boot_commands rather than adding it to the file itself, that works for some settings but not for others.
What is the concrete syntax for adding d-i mirror/http/proxy string
setting to the boot_command? (sorry, absolute noob heere :-/ )
Something like that?
"boot_command": [
"<esc><wait>",
"install <wait>",
"mirror/http/proxy=http://user:password@proxyhost:8888",
"preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/{{user `preseed_path`}} <wait>",
"debian-installer=en_US <wait>",
...
]
Other suggestions?
None at present.