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

Error getting WinRM host: No ip address #8341

Closed
JeffinBao opened this issue Nov 6, 2019 · 5 comments · Fixed by #8355
Closed

Error getting WinRM host: No ip address #8341

JeffinBao opened this issue Nov 6, 2019 · 5 comments · Fixed by #8355

Comments

@JeffinBao
Copy link

Overview of the Issue

When running my win10_template.json, the VM can be successfully created, but I was stuck at Waiting for WinRM to become available and the detailed error log was Error getting WinRM host: No ip address. It seems Packer can retrieve the MAC address, but there's no ip address with that MAC. However, when I ran arp -a, I can not see the MAC address as shown in Hyper-V Manager. This is wired. I am guessing whether the MAC address Packer got was wrong. I found similar issues such as #4352, #4404, #5642, #5049, but I didn't find a workaround. Any help will be appreciated.

Packer version

From 1.4.5

Simplified Packer Buildfile

packer template

Operating system and Environment details

HostOS: Windows10 Pro 1903
ISO used: Windows10 business edition 1903
Hypervisor: Hyper-V

Log Fragments and crash.log files

packerlog.txt

Let me know if more information needed.

@SwampDragons
Copy link
Contributor

Are you running integration services?

@JeffinBao
Copy link
Author

Are you running integration services?

I checked the VM and found following integration services enabled:

  1. Operating system shutdown
  2. Time synchronization
  3. Data exchange
  4. Heartbeat
  5. Backup(volume shadow copy)
  6. Guest services

Am I supposed to run integration services?

@SwampDragons
Copy link
Contributor

I'd just noticed in some of those issues that people said this issue occurred if they weren't running integration services, so I thought I would ask. I'm not terribly familiar with HyperV so I'll have to do some research to determine which, if any, we need in order to get the VM IP.

@SwampDragons SwampDragons added this to the 1.5.0 milestone Nov 7, 2019
@JeffinBao
Copy link
Author

Thank you for your reply. I think I found the issue. The root cause is not from Packer, but from my template. I didn't set boot_command properly, so the operating system installation stuck in the middle. Actually, no ip address error should be fine as long as you can confirm your operating system installation is in progress. After operating system installed and VM reboots, an ip will be assigned and Packer can retrieve the ip successfully.

However, since operating system installation takes time, especially sometimes we will run windows update, if no ip address error keeps popping up, people might think it is not able to get ip address forever.

I wonder if we can add a Note in the documentation describing: Waiting for SSH/WinRM to be available and Error getting SSH/WinRM host: No ip address are fine if the VM is installing operating system. Anyway, hope our discussion can help someone who faces similar issue in the future.

@ghost
Copy link

ghost commented Jan 23, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked and limited conversation to collaborators Jan 23, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants