Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 26 Sep 2013 15:44:34 -0700
From:      Craig Rodrigues <rodrigc@FreeBSD.org>
To:        Karl Pielorz <kpielorz_lst@tdx.co.uk>
Cc:        "freebsd-virtualization@freebsd.org" <freebsd-virtualization@freebsd.org>
Subject:   Re: PXE booting into a Hyper-V 2012 R2 instance - slows to a crawl?
Message-ID:  <CAG=rPVentMaRA0XSUwDGhL2g=5LFvxs1HARR3pHV8kp=QqaGuw@mail.gmail.com>
In-Reply-To: <9779D76A3AD1B8097FFC552A@Mail-PC.tdx.co.uk>
References:  <9779D76A3AD1B8097FFC552A@Mail-PC.tdx.co.uk>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Sep 24, 2013 at 6:53 AM, Karl Pielorz <kpielorz_lst@tdx.co.uk>wrote:

>
>
> We are creating new Hyper-V instances using our PXE boot environment
> (which boots you into a FreeBSD 9.1 amd64 O/S) - we'd build a Hyper-V aware
> kernel etc. from that (after SVN'ing the latest Hyper-V project source).
>

PXE involves DHCP and TFTP.  I would recommend that you do the following:

(1)  On the machine hosting your TFTP server, look at the TFTP logs and
look for any clues.
      If your TFTP server is a FreeBSD box, look at /var/log/xferlog.
      I don't know what logs are available for a Windows TFTP server.

(2)  In between your booting machine, and your TFTP server, use Wireshark
or tcpdump to
      capture the network traffic and analyze what is going on.

(3)  By default, the FreeBSD PXE loader uses a TFTP blocksize of 512 bytes
per block (which is
      the original TFTP standard).  You can increase the size of that to
something bigger,
      depending on the MTU of your network.  Usually 1400 bytes will work.
      In /boot/defaults/loader.conf, you can see this:

#tftp.blksize="1428"            # Set the RFC 2348 TFTP block size.
                                # If the TFTP server does not support RFC
2348,
                                # the block size is set to 512.  If the
value
                                # is out of range ( < 8 || > 9008 ) an
error is
                                # returned.

If you put in yout /boot/loader.conf file:

tftp.blksize="1428"

you can see if that speeds up the TFTP transfer during PXE booting.




>
> Hyper-V would take seconds to boot this - but since changing over to R2 it
> takes a 'very, very long time'.
>
> The initial PXE bit happens quickly (i.e. seeing the server, and getting
> the BTX output out) but then it gets stuck with the \ spinner - it'll spin
> for a short time, stop, spin again for a short time, stop again.
>

The spinner is the part where it is loading the kernel.  For PXE, this is
happening over TFTP.
This looks like a slow network problem, so you need to analyze it a bit.

I wrote some notes on PXE booting in FreeBSD which you might want to get
some ideas from:

http://www.freebsd.org/doc/handbook/network-pxe-nfs.html

--
Craig



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAG=rPVentMaRA0XSUwDGhL2g=5LFvxs1HARR3pHV8kp=QqaGuw>