Created attachment 767 [details] Screenshot_first_boot Fresh installation of IPFire 2.25 (x86_64) on Hyper-V Server 2016 1607 (Gen1 VM) stuck 8 minutes during boot after the line "Setting up Pakfire Package Manager..." Probably due to a bug in the detection of MS Azure routine running_on_azure() in the init script /etc/rc.d/init.d/functions I already investigated the problem a little bit in the forum post: https://community.ipfire.org/t/fresh-installation-stuck-8-minutes-at-boot/2579/4 See also https://bugzilla.ipfire.org/show_bug.cgi?id=12272 Workaround: Ctrl+C to abort the running script during the boot.
Created attachment 768 [details] Syslog
UPDATE: It seems that dhclient called in /etc/init.d/cloud-init get stuck. dhclient is called with the -sf /etc/rc.d/helper/azure-setup param. When I remove the -sf param everything works fine. The interface gets an IP address and continues. However with the -sf param, dhclient get stuck after DHCPACK. So either there is a bug in the dhclient (couldn't find any information regarding version 4.4.1) or there is someting wrong with the azure script. The censored red box in the attached screenshot shows my correct public IP address on red0. That means that until this point everything works as expected and dhclient is receiving an IP address. I tried to debug the azure script but I'm not familiar with dhclient script option and what it does and also with the internal structure of ipfire and it's init scripts. I also signed up for an trial version of Azure but installing an VM with an custom ISO is way more complicated than i thougth. It'll take me at least a weekend to read up on Azure, documentation and so on... So i hand over to people who are smarter than me.
Created attachment 769 [details] dhclient stuck after DHCPACK
Hey Thomas, this is an interesting problem. Those script are executed because the system thinks that it is running on Azure, which probably isn't true in your case. I have no reliable way to distinguish between Hyper-V on-premise or Hyper-V in Microsoft's cloud. Removing the script obviously breaks the cloud setup process. We already added an exit if we do not get an Id: > https://git.ipfire.org/?p=ipfire-2.x.git;a=commitdiff;h=26eab1fe3e5ed74013420e077a112a012eeab4f6 I assume it is the wget call. Could you try adding some timeout of about a second and test that?
Good evening Michael, I played a bit around with the trial version of Azure and didn't find an reliable way either. I fixed the problem with the --timeout option at the wget line. You were right. Strangely enough wget is taking way to long if the IP 169.254 isn't reachable. I don't know if this is a normal behavior or something gets messed up because normally you get the IP 169.254 when there is no DHCP Server available. IMHO stupid idea from MS to take this IP for it's internal metadata service. Anyways I'll prepare my git repo and send out the diff with the fix soon. Greetings Thomas
(In reply to Thomas Void from comment #5) > Anyways I'll prepare my git repo and send out the diff with the fix soon. Perfect! Thank you.
I just stumbled upon this post https://community.ipfire.org/t/hyper-v-gen-2-vm-installation/1046/22 Here is the fix I posted at the dev mailing list. https://lists.ipfire.org/pipermail/development/2020-July/008007.html I'm truly sorry about the messed up subject. I mixed up some command line arguments, it was really late at night...sorry This should fix the problem. Also thank you Michael Tremer for the help. Please merge into next. Thank you Tom
My first Patch didn't find it's way to patchwork because of an wrong and way to long subject. So I resubmitted it. Michael Tremer had also the idea to change the values for timeout/tries from 10/1 to 3/3 https://patchwork.ipfire.org/patch/4089/ Tom
btw. here is the first patch with the comment from Michael https://patchwork.ipfire.org/patch/4007/
https://git.ipfire.org/?p=ipfire-2.x.git;a=commit;h=5b17fea8e746cb9c71d49af918e6baabbc9b7aa9
I assume this issue has been fixed by the release of the aforementioned patch, therefore closing this. Please reopen, if necessary.