clearlinux / distribution

Placeholder repository to allow filing of general bugs/issues/etc against the Clear Linux OS for Intel Architecture linux distribution
521 stars 29 forks source link

OVMF will not PXE boot and does not decrease boot times while (not?) doing so. #1540

Open hainesbg opened 4 years ago

hainesbg commented 4 years ago

I'm following along with https://docs.01.org/clearlinux/latest/get-started/ipxe-install.html and attempting to get things to work on my local libvirt before trying it in the lab. I haven't been able to get my VMs to PXE and I finally traced it down to this these lines from one of the ed2k patches: https://github.com/clearlinux-pkgs/edk2/blob/master/0001-disabling-features-to-reduce-OVMF.fd-boot-time.patch#L55-L58. Removing the comment characters from the lines indicated in the patch file and rebuilding the package produces .fd files that PXE boot as expected.

The patch filename indicates that this is for purposes of reducing boot time; however, the presence of the network code does not seem to make any appreciable difference in that regard. Running for i in`seq 2`; do virsh start --console --domain pxetest ; done ; time for i in`seq 10`; do virsh start --console --domain pxetest ; done against a minimal Clear VM that does nothing but shut itself down gives the following times for the stock OVMF and that produced by the above-referenced uncommenting, respectively: 0m47.160s and 0m46.992s.

Please make the Network/PXE stack part of the OVMF ROMs. It's a nice thing to have for many purposes, including the development and testing of Clear Linux-based solutions and does nothing to hinder boot performance, designations to the contrary notwithstanding.

hainesbg commented 4 years ago

Oh, that's also a pretty old version of the OVMF; you might do well to update to the latest.

bryteise commented 4 years ago

@miguelinux Thoughts on this one? I'm inclined to update the patch (and edk2).

miguelinux commented 4 years ago

yes, CL removes pxe boot from OVMF, but if adding pxe boot do not increase boot time, let's add it.

ahkok commented 4 years ago

Typically, it does add time

hainesbg commented 4 years ago

All I can say is that as per the above experiment, it certainly didn't add any time for me. To the contrary, in fact. Boot order was Hard Drive -> PXE Boot (as one would ordinarily do for PXE-based installs to local volumes and standing in opposition PXE-based 'thin client' type operation).

If you're interested in recreating the same, I just created a CL VM with a custom systemd target that, IIRC, is After and Wants multi-user.target and a .service unit with Exec=poweroff and is WantedBy the custom target. I then just systemctl set-default that target.

fenrus75 commented 4 years ago

also we should really do better than pxe booting vm's....

On Fri, Dec 6, 2019 at 6:02 AM hainesbg notifications@github.com wrote:

All I can say is that as per the above experiment, it certainly didn't add it for me. Boot order was Hard Drive -> PXE Boot (as one would ordinarily do for PXE-based installs to local volumes and standing in opposition PXE-based 'thin client' type operation).

If you're interested in recreating the same, I just created a CL VM with a custom systemd target that, IIRC, is After and Wants multi-user.target and a .service unit with Exec=poweroff and is WantedBy the custom target. I then just systemctl set-default that target.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/clearlinux/distribution/issues/1540?email_source=notifications&email_token=AAJ54FM7CW5YASNQDWY6FL3QXHMIDA5CNFSM4JU6WNXKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEGDA2JA#issuecomment-562433316, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJ54FK6NS5NZONNWRRW2CTQXHMIDANCNFSM4JU6WNXA .

hainesbg commented 4 years ago

also we should really do better than pxe booting vm's....

Is there a better way of simulating PXE-boot baremetal cluster provisioning on a laptop?

ahkok commented 4 years ago

Can we just offer the PXE enabled OVMF as an alternative (so that people can edit their images and replace the OVMF with the one that has PXE?