HyperV Gen1 Hangs on iPXE Initializing Devices
-
There are many posts over the last few years that are unsolved pertaining to an issue when PXE booting a legacy (Generation1) HyperV VM with FOG. It appears UEFI (Generation 2) VM’s are not affected. When using a default FOG installation, a Generation 1 HyperV VM will not boot to the PXE menu, resulting in a hang on the screen below (iPXE Initialising devices…)
To solve this issue, iPXE needs to be recompiled with a few settings changed. Below are steps to recompile iPXE with settings required to make Generation 1 VM’s boot.
Step 1 - Download FOG via git into a new folder (in this case /opt/custom)
mkdir -p /opt/custom cd /opt/custom git clone https://github.com/fogproject/fogproject.git fogproject
Step 2 - Add the following 3 lines to /opt/custom/fogproject/src/ipxe/src/config/general.h (I added them on line 175)
#undef DOWNLOAD_PROTO_HTTPS #undef IMAGE_TRUST_CMD #undef CERT_CMD
Step 3 - Recompile iPXE by issuing the following commands (you may need to make buildipxe.sh executable)
cd /opt/custom/fogproject/utils/FOGiPXE ./buildipxe.sh
Step 4 - Move the new iPXE files into the tftp directory. This can be accomplished two ways.
- Rerun the fog installation script from the new directory (/opt/custom/fogproject/bin/./installfog.sh
OR
- Copy the files from /opt/custom/fogproject/packages/tftp to /tftpboot overwriting the previous files
You should now be able to boot a Generation 1 HyperV VM to FOG. The only change appears to lose the .png background for the menu (see below).
Credit to @george1421 for these steps. Through multiple different posts about similar issues, his replies led me to this conclusion.
This was tested on Windows Server 2019 and Windows 10 21H2 HyperV Virtual Machine Clients. This was tested on FOG 1.5.9 running Rocky Linux 8 and iPXE 1.21.1+.
-
@Gerrit-Anderson Thank you for this! I was battling this yesterday and this fixed the issue immediately.
-
I know this is an old post, but I too have issues booting Gen 1 Hyper-V with ipxe. Turns out the message I get (error 1c25e002) is related to a bug in ipxe when used with gen 1 hyper-v. I tried recompiling as you suggested but it didn’t make a difference. The error code appears right after default.ipxe is downloaded during the boot,php download, says “Invalid Argument”. Works fine on Vbox via legacy boot though.
-
@Gerrit-Anderson Thanks for this – fixed this issue for me! I used to get stuck on Init, but can get further now into the actual boot menu like you. I too have lost my custom background but really that’s a non-issue.
However, when I try to deploy an image, it asks me for a password (which is the FOG webUI username & password of course). I don’t recall this happening with my old TFTP boot files – I guess they must have had the password embedded in there somehow? Anyone know how I can fix this?