WinRM access with NO PROXY

11 views
Skip to first unread message

Yusuke Masuda

unread,
May 19, 2020, 7:41:25 AM5/19/20
to Packer
Hello,

I am searching how to enable proxy for internet, and disable it for WinRM.

I am creating a vagrant box for Hyper-V, with Packer on Windows.
And I'm in my office, and need to go through web proxy server to access the internet.
So I configured an environment variable "http_proxy" to aquire Windows ISO image on the internet.
It works fine to download the file.

But the packer is stopping at in the middle, with showing a message "Waiting for WinRM to become available".

I had figured its cause out with enabling debugging option of Packer.
https://www.packer.io/docs/other/debugging.html#debugging-packer-in-powershell-windows
It shows a log message "[ERROR] WinRM connection err: http response error: 503 - invalid content type"

As I googled the message, I figure out that the 503 error responsed by our proxy server.
I disabled proxy, and build box image with local ISO image file. It suceeded.

However, I want to download ISO on the internet, I have to enable proxy.
How can I balance both options?

The ticket below seem to be a hint.
https://github.com/hashicorp/packer/issues/7858

But I cannot understand how-to.
I am sorry but let me know concretely how to specify to options.

Best regards,

Yusuke
Reply all
Reply to author
Forward
0 new messages