• Recent
    • Unsolved
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    How to PXE boot a virtualbox or QEMU/KVM box ?

    Scheduled Pinned Locked Moved Solved
    Hardware Compatibility
    4
    12
    16.2k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • D
      De Thegeek
      last edited by

      Hi all

      I want to upgrade my good old FOG 0.32 to the latest release.

      I noticed FOG its PXE remote boot feature from syslinux to iPXE. Great, it appears to run with “real hardware”. However, a virtual machine powered by QEMU/KVM or Virtualbox uses iPXE instead of a conventional PXE implementation.

      I’m not used to iPXE and I’m lacking knowledge to chain iPXE from the BIOS of these virtual machines to iPXE provided by FOG. This appears to be necessary because iPXE in these BIOS is not enouth featureful.

      I did not find a backed way to solve this problem, and I really need this to build my master images. Is there someone having success with these virtual machines ?

      For Tom Eliott : sorry to make you so much trouble with the 63rd sector a while ago 😉 .

      1 Reply Last reply Reply Quote 0
      • Tom ElliottT
        Tom Elliott
        last edited by

        I don’t recall there being a problem so long ago. At least you creating a problem with it. You described a problem and I had to fix it. That’s how reports work. Some may be more problematic to fix than others, but that’s just how it goes.

        I believe you can replace the ipxe rom files your QEMU/KVM systems are using. If you know what files need to be replaced, directly, I can probably build them with the relevant information you need for you.

        Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG! Get in contact with me (chat bubble in the top right corner) if you want to join in.

        Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

        Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

        1 Reply Last reply Reply Quote 1
        • JunkhackerJ
          Junkhacker Developer
          last edited by

          for what it’s worth, i’ve been able to network boot virtualbox VMs without modification. I believe i had to use the “Intel PRO/1000 MT Desktop” network adapter type in the VM setup

          signature:
          Junkhacker
          We are here to help you. If you are unresponsive to our questions, don't expect us to be responsive to yours.

          1 Reply Last reply Reply Quote 0
          • D
            De Thegeek
            last edited by De Thegeek

            I’m actually using the Intel Pro/1000 MT Desktop NIC, I must also tell I’m using a already existing dhcp server (debian 8).

            I managed to chainload iPXE with the following dhcpd configuration :

              if exists user-class and option user-class = "iPXE" {
                if exists ipxe.multiboot {
                 # multiboot is a feature not available in VirtualBox, and available in the iPXE provided by FOG.
                  filename "http://192.168.0.21/fog/service/ipxe/boot.php";
                } else {
                  option bootfile-name "tftp://192.168.0.21/undionly.kpxe";
                }
              } else {
                  filename "undionly.kpxe";
              }
            

            I did not test the last case, for computers without iPXE, because I’m focusing on my VM.

            After a boot of my VM, iPXE loads, chains with iPXE from py FOG server. I see a second execution of iPXE with more built in features. Then it fails with the following obscure message :

            “Could not start download : Operation not supported (http://ipxe.org/3c092003)”

            1 Reply Last reply Reply Quote 0
            • S
              Sebastian Roth Moderator
              last edited by

              @De-Thegeek said:

              “Could not start download : Operation not supported (http://ipxe.org/3c092003)”

              I am not exactly sure if this is what you are looking for but take a look yourself. Follow that link and read the very last bulit point on that website. Maybe that helps.

              Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

              Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

              1 Reply Last reply Reply Quote 0
              • D
                De Thegeek
                last edited by De Thegeek

                I did that at first, but it does not give a clue about what’s going wrong in my case. Even the links to the source code.

                EDIT : I’vread your answer too quickly. I’ll try to tweak my VM, but I’ll need some time. As I’m already able to chainload iPXE, maybe my issue is not longer in PXE itself but in my setup in dhcpd.conf.

                Is it still necessary to use “next-server” to specify the source of boot.php ?

                1 Reply Last reply Reply Quote 0
                • S
                  Sebastian Roth Moderator
                  last edited by

                  AFAIK the undionly.kpxe is hardcoded to load default.ipxe script from the TFTP server. Check out /tftpboot/default.ipxe on your FOG server and you’ll see where boot.php comes into play.

                  Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

                  Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

                  1 Reply Last reply Reply Quote 1
                  • D
                    De Thegeek
                    last edited by

                    I think I should lookup more closely how Junkhacker did to use a VirtualBox VM.

                    I’m using the same NIC from the beginning, so I guess there is something else to tweak. I guess changing the ROM is overkill if someone manages to avoid that.

                    1 Reply Last reply Reply Quote 0
                    • JunkhackerJ
                      Junkhacker Developer
                      last edited by

                      Intel PRO/1000 MT Desktop Adapter Type
                      Bridged Adapter
                      that’s all i needed to do

                      signature:
                      Junkhacker
                      We are here to help you. If you are unresponsive to our questions, don't expect us to be responsive to yours.

                      1 Reply Last reply Reply Quote 0
                      • D
                        De Thegeek
                        last edited by

                        Thank you

                        I’m already using these settings. so I should search elsewhere. As my fog has been rebuilt from scratch and I dit that a while ago, I probably did something nasty.

                        I have to mention I managed to run FOG 0.32 in a container, with a userspace NFS server. I did that again, maybe there is something wrong with the container.

                        I’ll rebuild a new FOG server in a fully virtualized environment and see what happens.

                        1 Reply Last reply Reply Quote 0
                        • S
                          Sebastian Roth Moderator
                          last edited by

                          Just for the records: I do PXE boot qemu on my laptop to test FOG stuff all the time. No trouble!

                          $ sudo tunctl -t tap0 -u <username>
                          $ sudo ifconfig tap0 x.x.x.x netmask 255.255.255.0 up
                          $ qemu-img create -f qcow2 hdd.qcow2 10G
                          $ qemu -m 512 -boot n -net nic,vlan=1 -net tap,vlan=1,ifname=tap0,script=/bin/true -hda hdd.qcow2
                          

                          This is not a briged setup but all running on a virtual LAN only on that computer. So you’d have to configure tftp and dhcpd to properly serve on NIC tap0 and IP x.x.x.x

                          Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

                          Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

                          1 Reply Last reply Reply Quote 2
                          • S
                            Sebastian Roth Moderator
                            last edited by

                            Marking this solved as I have done extended testing on virtualbox 5.0.0 and cannot find an issue, see here: https://forums.fogproject.org/topic/5884/client-boot-error-msg-error-0x040ee119

                            Please let us know if you cannot get it to work this way.

                            Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

                            Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

                            1 Reply Last reply Reply Quote 0
                            • 1 / 1
                            • First post
                              Last post

                            157

                            Online

                            12.0k

                            Users

                            17.3k

                            Topics

                            155.2k

                            Posts
                            Copyright © 2012-2024 FOG Project