-
Notifications
You must be signed in to change notification settings - Fork 15
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
HTTP server IP discovery issues #63
Comments
It will get the IP if running macOS (even when running with The reason we retrieve the VM's IP-address first is that it's the most reliable way to find out the bridge interface that the |
On a second thought, even if we skip the Packer plugin for Tart only officially supports shared (NAT) network, and that implies the DHCP usage by the guest. |
Yes, automated Linux Ubuntu installation is what I'm trying to do. Had totally forgotten about macOS, makes so much more sense now. :/ The HTTP server's address is needed to pass as a parameter to the GRUB bootloader. It isn't actually used until networking is up and an IP address is obtained from DHCP. It should be safe to assume that shared (NAT) network is being used, so I guess the question is how to reliably determine what interface is used for that. Could try and mirror what tart is doing with |
I've just tried running Ubuntu Server and preventing it from going past GRUB (by pressing Anyway, I think you can already accomplish this:
...by setting the packer-plugin-tart/builder/tart/step_run.go Lines 236 to 238 in eb96164
(yes, we currently bypass the guest IP/interface resolution logic if this option if not empty as opposed to not equal to |
Good catch, I either didn't notice that or had something holding bridge100 open.
That doesn't quite work for me, I had to move the |
Good catch! This should be fixed as a part of the new 1.3.0 release, the HTTP server is now started before the installation takes place. |
Thanks so much, confirmed it is working with the workaround. Longer term a better option might be to dynamically create an ISO or floppy similar to QEMU builder but this works for my manual invocations. Would require some sort of hack to get it working with CI though, I'd guess. |
It looks like there's an issue in the way the HTTP server's IP discovery is implemented (#58 )
As I understand,
typeBootCommandOverVNC
will invoketart ip
to discover the guest host's IP address, and derive the HTTP server from the gateway of the subnet the IP address is using. I don't see how this could work, as the host will not get to the point of obtaining and setting an IP address until it has fully booted.I'm guessing some logic/ordering more akin to what the QEMU builder in https://github.com/hashicorp/packer-plugin-qemu/blob/main/builder/qemu/step_http_ip_discover.go will be necessary.
But maybe I'm totally misunderstanding how this is intended to work, could you help @edigaryev
The text was updated successfully, but these errors were encountered: