-
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
Error getting SSH address: No ip address from HyperV builder #4352
Comments
Please supply the information requested in the issue template:
|
updated, sorry for inconvenience |
I see the same problem with Windows7 Guest on Hyper-V. (Windows 8 and above work fine). FYI: After manually doing windows update for Windows7, the guest OS reported it's IP in Windows Manager. |
yes, i guess the windows update installs the guest tools which enable hyperv manager to determine the vms ip, do memory ballooning and all the other good stuff. It would be nice if packer does not depend on these "Integration Services" or at least notices the user of the necessity of them. |
Hi guys, What would help to make it more obvious that guest tools are required to be installed on the guest os? This problem is probably builder wide. The real headaches happen when you are stuck with exotic oses that do not have guest tools. Then you are stuck. They are more common then you think. I have considered doing crazy stuff like arp pings to guess the ip address associated with the mac. But it would probably not be that reliable, depending on your network configuration. The other option is to add the ability to specify a static ip. This would be polled until a connection is established. This is the approach Vagrant takes. Being a base box image I would advocate using dhcp with mac reservations, so we would also have to add ability to specify mac address as well. |
@taliesins An optional functionality for static ip and mac for provisioners would be great! I might dig deeper into vagrant soon, but i didnt see any option in hyperv yet that enables this. Maybe some switch magic with build in dhcp and routing or a little proxy vm with guest tools and a private network to the actual vm could solve that, but i dont know if that is out of scoop :) |
@w9n I use a PfSense VM for my dhcp, dns, gateway, firewall etc Great UI. I even run my home router in modem mode and use a PfSense VM as my router. |
@taliesins PfSense is good, but i think if its only purpose would be to dhcp a static ip to the guest vm and ssh proxy for packer, something like alpine or even smaller would be enough. Compatibility with all guest tools is probably the biggest concern. |
If anyone is looking for a workaround for windows 7, I was able to get a fully automated hyper-v build working by SlipStreaming a Windows 7 ISO with the guest integration update. |
@w9n can we close this issue and perhaps add a feature request? Maybe one along the lines of specifying mac address and ip address. We would want to do this in multiple builders. |
@rmustard That's an excellent workaround. Sadly, 6 days later, every one of those links to the Integration Tools that MS supplies is currently broken for me. |
@JoelBCarter I had similar problems when working on this before. Just now, using chrome, I clicked on the link for "All supported x64-based versions of Windows 7" and in the same browser tab it gave me a broken link page. If I right click and open in a new tab, it sent me to the download page. |
Hello,
im running the following config on a windows host(MINGW32_NT-6.2 1.0.17(0.48/3/2) 2011-04-24 23:39 i686 Msys) with Packer (version: 0.12.2.dev) and receive
"[DEBUG] Error getting SSH address: No ip address."
in my debug log while the builder dies after 20m waiting for ssh. The VM is manually available via ssh from the host.Log -> https://gist.github.com/w9n/52d922049682760927f63ecc758fd93a
The Driver gets a valid mac but fails to receive the ip from the vm. Its probably a bug in hyperv.go but i wasn't able to figure it out yet.
after figuring out the ps script, i guess its arch specific, because the vm does not expose its ip to hyper-v manager.
final thought: Script is fine, but its necessary to have Linux Integration Services (rpm only) running in vm to receive ip-address from Get-Vm. Ill stop my arch experiments on hyperv here :/
enable-ssh.sh
The text was updated successfully, but these errors were encountered: