Hyper-V Generation 2 VM Boot Error
-
New to FOG so forgive my dumbness
Iāve setup a FOG 1.5.4 server following the wiki install instructions. It appears to be working so far. Iām only looking to support UEFI currently.
I have a generation 2 VM Iāve created specifically for capturing a base image of CentOS 7 to act as a template. Iāve disabled secure boot. The VM is throwing a āThere was a TFTP errorā message however. Iāve confirmed with a physical laptop in UEFI mode, secure boot off, that I can boot to FOG so I donāt believe there is a server issue? I am using an Ubiquti EdgeRouter 4 as DHCP and configured the boot entries for PXE correctly I believe.
I have a pretty flat network currently with just 10.0.10.x as my primary LAN network that my servers live on.
There is not an OS currently installed on the VM as I was simply trying to test that I could boot from FOG. I setup a second Gen1 VM with default settings and changed my router to support BIOS boot and that worked successfully.
Iāve attached images of my configuration and the errors and what I see during boot. Let me know if there is anything else I can provide to help figure this out.
-
@george1421 Just went through the UBNT thread, that appears to be working! One thing, in case others come across this, that tripped me up was in the command there are
"
written out. At first, I thought this was something to do with the character escaping on the forums but it is not, you literally need the command as follows:set subnet-parameters "filename "ipxe.efi";"
You can also do this via the Config Tree in the GUI, just copy everything between the first and last double quotes and paste into the subnet-parameters section of the subnet.
@george1421 I appreciate your assistance here! I guess I will be going to Ubiquiti to see if I can find/file a bug report to fix that up.
[Edit] Not sure why, but I canāt seem to mark your post as the right answerā¦ Iāve marked mine summerizing everything instead. Have an up-vote though
Follow up documentation from UBNT Help
Notes
In the example above the custom option string requires quotes to be injected directly into the dhcpd.conf. As literal quotes are not allowed in the cli command we replace our quotes with the special entity format for a quote " this will be translated back to a literal quote when building the dhcpd.conf -
Additional information: I was installing another VM and I noticed a few frames during boot that I saw additional information. Looks like there is some weird character being appended to the filename?
Checking the configuration from the CLI of my EdgeRouter, doesnāt seem the character is being added there?
ubnt@ubnt# show service dhcp-server shared-network-name LAN authoritative disable subnet 10.0.10.0/24 { bootfile-name ipxe.efi bootfile-server 10.0.10.23 default-router 10.0.10.1 dns-server 10.0.10.9 dns-server 10.0.10.10 domain-name holonet.us lease 900 start 10.0.10.50 { stop 10.0.10.99 } [REMOVED: Static Mappings for IP addresses] }
-
I was going to post that weāve seen issues with hyper-v gen2 VMs running Under Win10 1803. Its not a fog issue but something that MS did to hyper-v gen2.
But your second post makes me think something else. What I believe is happening is that your dhcp server is not sending out a standard boot file name with the string terminated with a hex code 0 (meaning end of string). Its kind of hard to explain but if you can grab a pcap of the dhcp process I can confirm my suspicions. Setup wireshark on a computer on the same vlan as the pxe booting vm. Use a capture filter of
port 67 or port 68
and capture the dhcp process. Post the pcap here and I will confirm my suspicions and show you what I mean.The concepts of capturing the pcap is outlined here: https://forums.fogproject.org/topic/9673/when-dhcp-pxe-booting-process-goes-bad-and-you-have-no-clue
If your dhcp server IS doing this, while its not technically wrong, it does break some pxe rom implementations. I might suggest that you look into using dnsmasq running on the fog server to supply the boot information and disable all of the pxe boot stuff on your edgerouter. Our dnsmasq configuration would also dynamically support both bios and uefi systems.
Side note: If I remember correctly the edgerouter OS is based on Debian or Ubuntu, so Iām a bit surprised that its mangling the name this way. Your config file above looks like a standard isc-dhcp configuration stanza. If you look at example 1 here: https://wiki.fogproject.org/wiki/index.php/BIOS_and_UEFI_Co-Existence#Example_1 You will see the standard isc-dhcp configuration.
-
@george1421 thanks for info! Iāll grab the PCAP tonight and get it uploaded as soon as possible. I should mention that I am not running Hyper-V on Windows 10. It is running on the free Hyper-V Server 2016 and I am using Windows 10 as a remote management client. I know the implementations of Hyper-V are similar but figured I would mention it anyways!
-
@rearmedhalo said in Hyper-V Generation 2 VM Boot Error:
It is running on the free Hyper-V Server 2016
Then you should be OK. We have not heard of any issues with Hyper-V on 2016.
-
@george1421 here you go! 0_1528672127118_Gen2.pcap
Ubiquitiās EdgeRouter is using a modified version of Vyatta (VyOS) which is based on Debian. Iām fine with installing DNSMASQ if need be. I was looking over the ProxyDHCP page and there seem to be about a handful of ways to configure it.
One thing that page confuses me on is it seems the āInstall dnsmasq on CentOS 7ā has details for UEFI support but then a snip at the bottom of that section states it doesnāt and I need to compile 2.76 for it? Maybe Iām confusing terms here.
-
@rearmedhalo well its just as I thought, but its not all fields.
Here is dhcp option 67
Note the value in the hex editor after the ipxe.efi text, its 0xff. Normally it should end with 0x00 as in with the boot file field from above.
Note after ipxe.efi here the next byte is 0x00 (end of string).So what can we do?? Let me search a bit.
-
I havenāt read this yet, but it sounds close: https://community.ubnt.com/t5/UniFi-Routing-Switching/Network-Boot-adding-characters-to-file-name/td-p/2215368
[edit] Yeah, that might be it. Look at the last post for recommended actions as well as the linked document.
-
@george1421 Just went through the UBNT thread, that appears to be working! One thing, in case others come across this, that tripped me up was in the command there are
"
written out. At first, I thought this was something to do with the character escaping on the forums but it is not, you literally need the command as follows:set subnet-parameters "filename "ipxe.efi";"
You can also do this via the Config Tree in the GUI, just copy everything between the first and last double quotes and paste into the subnet-parameters section of the subnet.
@george1421 I appreciate your assistance here! I guess I will be going to Ubiquiti to see if I can find/file a bug report to fix that up.
[Edit] Not sure why, but I canāt seem to mark your post as the right answerā¦ Iāve marked mine summerizing everything instead. Have an up-vote though
Follow up documentation from UBNT Help
Notes
In the example above the custom option string requires quotes to be injected directly into the dhcpd.conf. As literal quotes are not allowed in the cli command we replace our quotes with the special entity format for a quote " this will be translated back to a literal quote when building the dhcpd.conf