Skip to content
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

net_bridge and WinRM communicator #131

Open
heck-gd opened this issue Mar 16, 2023 · 1 comment
Open

net_bridge and WinRM communicator #131

heck-gd opened this issue Mar 16, 2023 · 1 comment
Labels

Comments

@heck-gd
Copy link

heck-gd commented Mar 16, 2023

Overview of the Issue

When defining a net_bridge and using the WinRM communicator, some unexpected things happen.

  • The timeout that is used to wait for the VM to get an address from DHCP uses ssh_timeout. This causes the build to instantly fail for no obvious reason - one wouldn't expect it to look at that variable when using WinRM.
  • The code for the communicator port always selects 22 with no way to change it. This is not the default that WinRM listens on.

Manually changing the WinRM port to 22 in the Windows VM and setting ssh_timeout is a workaround for these issues and then everything works as expected.

Plugin and Packer version

1.8.6

Simplified Packer Buildfile

{
"type": "qemu",
"vm_name": "my-windows.qcow2",
"format": "qcow2",
"cpus": 2,
"memory": 4096,
"disk_size": 40960,
"communicator": "winrm",
"headless": true,
"cpu_model": "host",
"disk_interface": "ide",
"net_device": "e1000",
"net_bridge": "virbr0",
"winrm_username": "user",
"winrm_password": "password",
"winrm_timeout": "60m",
"shutdown_command": "shutdown /s /f /t 10",
"iso_url": "file:///path/to/de_windows_7_professional_with_sp1_vl_build_x64_dvd_u_677778.iso",
"iso_checksum": "sha1:2628eb7a1f8dc25cefe7d63a9b70a651e8349dcc",
}

Operating system and Environment details

Ubuntu 20.04 x86_64 installing any Windows VM.

@heck-gd heck-gd added the bug label Mar 16, 2023
@ghost
Copy link

ghost commented Mar 24, 2023

I've also observed this behavior with the version mentioned above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant