Hyper V Gen 2 booting with undionly.kpxe



  • I originally had an issue with pxe booting gen 1 Hyper V due to WIndows 10 1709. I was able to get that going with this topic https://forums.fogproject.org/topic/11348/hyper-v-and-pxe-boot-to-fog-problems?page=1

    Now when I am trying to capture a Hyper V Gen 2 image, I see it attempt to PXE boot and I see it loads undionly.kpxe as well but as soon as I see that part completes, it then boots normally into the VM. Gen 2 VMs should get an uefi based network file correct? If so how can I fix this? I was able to capture a gen 2 image in October so this has worked in the past.

    I have already tried to put back the original undionly.kpxe file to see if this helps at all, but I see the same thing happen.

    0_1524070361298_23430a4a-7e6e-425b-a42e-7ab9c671ff30-image.png

    Here is my set up:

    Fog Server 1.5.2 on Ubuntu 16.04
    Windows 10 1709 with Hyper V



  • This is now working thanks to @george1421’s help. What happend was that I had two versions of dnsmasq installed causing this issue. I was able to remove the 2.75 version that came with the OS and recompile and reinstall 2.76. Now everything is working as expected.


  • Moderator

    @jkoos101 Looking at your packet capture I see dnsmasq sending the right information to the pxe booting client, but the client is ignoring the proxydhcp settings. Your primary dhcp server 10.250.0.1 is also sending out dhcp options 66 {next-server} and 67 {boot-file} information, which the pxe booting client seems to believe over the proxydhcp settings.

    Can you remove the bootfile {undionly.kpxe} settings from 10.250.0.1?


  • Moderator

    @jkoos101 Lets move this to FOG Forum chat. I have a few questions were we need quicker turn around than forum posts. Look at the chat bubble on the forum tool tray.




  • Moderator

    @jkoos101 Well that is a bit disappointing, it should work right out of the box (so to speak). That config file has been used on many dnsmasq installs. When you get another packet capture, if you would. Please upload that to a google drive or dropbox I would like to take a look at the pcap file.



  • @george1421 I just tried the ltsp.conf file you gave and restarted the dnsmasq service. It is still doing the same thing. I’ll try another packet capture when I have more time and use your suggestions regarding the port filtering.

    Thanks!


  • Moderator

    @jkoos101 If you are going to do a pcap (which is great) use this pcap filter port 67 or port 68 or port 69 or port 4011 The most interesting bits will be the dhcp discover from the target computer, the offer from the dhcp server, and the offer from the dnsmasq server.

    But I’m pretty sure if you use my ltsp.conf file you should be able to auto manage bios and uefi systems.


  • Moderator

    @jkoos101 You are missing some stuff (pxe-service) and you have the dhcp-boot entry out of order. In your current config it will always select undonly.kpxe.

    Lets try this config make sure you update the <fog_server_ip> with your fog server’s real ip, and then reboot dnsmasq.

    # Don't function as a DNS server:
    port=0
    
    # Log lots of extra information about DHCP transactions.
    log-dhcp
    
    # Set the root directory for files available via FTP.
    tftp-root=/tftpboot
    
    # The boot filename, Server name, Server Ip Address
    dhcp-boot=undionly.kpxe,,<fog_server_IP>
    
    # Disable re-use of the DHCP servername and filename fields as extra
    # option space. That's to avoid confusing some old or broken DHCP clients.
    dhcp-no-override
    
    # inspect the vendor class string and match the text to set the tag
    dhcp-vendorclass=BIOS,PXEClient:Arch:00000
    dhcp-vendorclass=UEFI32,PXEClient:Arch:00006
    dhcp-vendorclass=UEFI,PXEClient:Arch:00007
    dhcp-vendorclass=UEFI64,PXEClient:Arch:00009
    
    # Set the boot file name based on the matching tag from the vendor class (above)
    dhcp-boot=net:UEFI32,i386-efi/ipxe.efi,,<fog_server_IP>
    dhcp-boot=net:UEFI,ipxe.efi,,<fog_server_IP>
    dhcp-boot=net:UEFI64,ipxe.efi,,<fog_server_IP>
    
    # PXE menu.  The first part is the text displayed to the user.  The second is the timeout, in seconds.
    pxe-prompt="Booting FOG Client", 1
    
    # The known types are x86PC, PC98, IA64_EFI, Alpha, Arc_x86,
    # Intel_Lean_Client, IA32_EFI, BC_EFI, Xscale_EFI and X86-64_EFI
    # This option is first and will be the default if there is no input from the user.
    pxe-service=X86PC, "Boot to FOG", undionly.kpxe
    pxe-service=X86-64_EFI, "Boot to FOG UEFI", ipxe.efi
    pxe-service=BC_EFI, "Boot to FOG UEFI PXE-BC", ipxe.efi
    
    dhcp-range=<fog_server_ip>,proxy
    


  • I also did a packet capture on the FOG server and this is what I see regarding the boot file:

    0_1524082602695_2117055c-41ad-46eb-baa1-4f0ce4cc0f33-image.png



  • Sure,

    port=0
    log-dhcp
    tftp-root=/tftpboot
    dhcp-no-override

    dhcp-vendorclass=BIOS,PXEClient:Arch:00000
    dhcp-vendorclass=UEFI32,PXEClient:Arch:00006
    dhcp-vendorclass=UEFI,PXEClient:Arch:00007
    dhcp-vendorclass=UEFI64,PXEClient:Arch:00009

    dhcp-boot=net:UEFI32,i386-efi/ipxe.efi,10.250.0.2
    dhcp-boot=net:UEFI,ipxe.efi,10.250.0.2
    dhcp-boot=net:UEFI64,ipxe.efi,10.250.0.2

    dhcp-boot=undionly.kpxe,10.250.0.2

    pxe-prompt=“Press F8 for boot menu”, 3
    dhcp-range=10.250.0.2,proxy

    I remember initially adding the dhcp-vendorclass lines to get this to work initially last year. I’m not sure if those are still needed?

    Thanks


  • Moderator

    @jkoos101 will you post your ltsp.conf file so I can take a look at it?



  • Dnsmasq version 2.76


  • Moderator

    @jkoos101 Run this command dnsmasq -v to tell us what version of dnsmasq are you using.



  • DHCP server is our firewall at 10.250.0.1. The Fog server is 10.250.0.2. I know originally I did have to go through a lot of hurdles to get the proxy dhcp working and at the moment, I don’t recall exactly how I fixed it. I did install dnsmasq though.


  • Moderator

    The time the issue is with either your dhcp server sending out the wrong file name or your proxydhcp server not being setup correctly.

    What device is your dhcp server 10.250.0.2?


 

443
Online

5.4k
Users

12.6k
Topics

118.8k
Posts