-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
packer 0.12.1 VirtualBox builder uses wrong WinRM port. #4310
Comments
I agree with your description, but according to the change log we have no changes close to this area in 0.12.1. Can you verify that it works correctly with 0.12.0? |
I can verify that it works with 0.10.x but fails on 0.12.x trying to build a VirtualBox Vagrant basebox with Win7 and Win10. |
I'll try. My packer virtualbox build just has "entered" my other running VMware Fusion Vagrant VM which had port 5985 mapped to the host :-) |
It seems to work with 0.12.0. This log looks promising, guest is not ready for WinRM, but packer tries the correct port:
|
This bug appears to have been introduced by PR #2576. This changed the way the WinRM port was set in helper/communicator/step_connect.go which unfortunately broke things for the Virtualbox iso builder. The ovf builder should also be affected in the same way. I've tested a fix that should align the Virtualbox builders with the new way of doing things introduced by PR #2576 and issued a PR - #4321 |
Thanks for the help |
@DanHam Great! |
qemu builder and vbox builders now need to explicitly set WinRMPort for StepConnect
👏 |
Building a Windows Server 2016 guest with the VirtualBox builder does not work with Packer 0.12.1 using WinRM. It seems that packer tries the wrong port instead of its calculated port mapping.
Packer version from
packer version
0.12.1
Host platform
MacOS Sierra 10.12.2
VirtualBox version 5.1.12
Debug log output from
PACKER_LOG=1 packer build template.json
.Just the relevant part retrieving port 2683 for the port mapping and then trying to connect to 127.0.0.1:5985 WinRM port:
git clone https://github.com/StefanScherer/packer-windows cd packer-windows packer build --only virtualbox-iso windows_2016_docker.json
It's just a normal Windows guest template which worked with older versions of packer.
Here is also a screenshot of a previsous build where I tried the WinRM port manually with the go winrm cli:
I tried to peek into the source base and found at least builder/virtualbox/common/step_forward_ssh.go which saves the port in
sshHostPort
which probably should be read at some other point to set the WinRM port correctly.The text was updated successfully, but these errors were encountered: