From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from ma1-aaemail-dr-lapp02.apple.com (ma1-aaemail-dr-lapp02.apple.com [17.171.2.68]) by mx.groups.io with SMTP id smtpd.web11.16963.1585328753209826832 for ; Fri, 27 Mar 2020 10:05:53 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@apple.com header.s=20180706 header.b=UFol/Cb/; spf=pass (domain: apple.com, ip: 17.171.2.68, mailfrom: afish@apple.com) Received: from pps.filterd (ma1-aaemail-dr-lapp02.apple.com [127.0.0.1]) by ma1-aaemail-dr-lapp02.apple.com (8.16.0.27/8.16.0.27) with SMTP id 02RGldUJ024459; Fri, 27 Mar 2020 10:05:51 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=apple.com; h=sender : from : content-type : mime-version : subject : date : references : to : in-reply-to : message-id; s=20180706; bh=Xa5ZiBmoTbFMvz4XlgBSvTeBaHs8e7xkt9mzhx57YJs=; b=UFol/Cb/XgAqfQPUzy3MjSHhFPPnrHMoTz/17fA/gqbC/qrtMuVT5jPQljwxsoa1NWCK 6lLw3JANyQ3BN7vzZbeNpjYBEOz5qcH9OqH+VFuKhLFz4mqpl0NrKsqDst5eYsJt28gN XSgBHLdscraHDJMgrHHcEL8JtbkUskwJpoFkqa3pmJvYOdY0wQ0TE3cPO7xBw30rs+E5 j7WGM+TcLwR9WqUc5ln09688fDo2CLXP8oizGzZ/3lDT4XXKiAdmR0NEB7pG+AUrw7rm 7RBhd17tkoWSke6K7KJLz5Lrrlf///XcEd+47pLk1abDv4skH8Mv8yp9+03mshW7tBgf 3Q== Received: from rn-mailsvcp-mta-lapp02.rno.apple.com (rn-mailsvcp-mta-lapp02.rno.apple.com [10.225.203.150]) by ma1-aaemail-dr-lapp02.apple.com with ESMTP id 2ywfkvk0u6-3 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO); Fri, 27 Mar 2020 10:05:51 -0700 Received: from nwk-mmpp-sz09.apple.com (nwk-mmpp-sz09.apple.com [17.128.115.80]) by rn-mailsvcp-mta-lapp02.rno.apple.com (Oracle Communications Messaging Server 8.1.0.5.20200312 64bit (built Mar 12 2020)) with ESMTPS id <0Q7V00FHV3HQJJD0@rn-mailsvcp-mta-lapp02.rno.apple.com>; Fri, 27 Mar 2020 10:05:50 -0700 (PDT) Received: from process_milters-daemon.nwk-mmpp-sz09.apple.com by nwk-mmpp-sz09.apple.com (Oracle Communications Messaging Server 8.0.2.4.20190507 64bit (built May 7 2019)) id <0Q7V004003D7Y800@nwk-mmpp-sz09.apple.com>; Fri, 27 Mar 2020 10:05:50 -0700 (PDT) X-Va-A: X-Va-T-CD: 70b276dbf427235b74b78a5c75802a55 X-Va-E-CD: 5105c84f85c5a9a0a431fc5feec163c8 X-Va-R-CD: 4484c3e2ea704d76d8b97e7d50191864 X-Va-CD: 0 X-Va-ID: cb00e73f-8aee-40f3-9d57-68ccd4ca8633 X-V-A: X-V-T-CD: 70b276dbf427235b74b78a5c75802a55 X-V-E-CD: 5105c84f85c5a9a0a431fc5feec163c8 X-V-R-CD: 4484c3e2ea704d76d8b97e7d50191864 X-V-CD: 0 X-V-ID: d6ff783a-fa6a-46ea-bb0e-f59eb83c97bd X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.138,18.0.645 definitions=2020-03-27_05:2020-03-27,2020-03-27 signatures=0 Received: from [17.235.24.78] by nwk-mmpp-sz09.apple.com (Oracle Communications Messaging Server 8.0.2.4.20190507 64bit (built May 7 2019)) with ESMTPSA id <0Q7V00M0E3HPB650@nwk-mmpp-sz09.apple.com>; Fri, 27 Mar 2020 10:05:50 -0700 (PDT) Sender: afish@apple.com From: "Andrew Fish" MIME-version: 1.0 (Mac OS X Mail 13.0 \(3594.4.17\)) Subject: Re: [edk2-devel] Initial PXE boot over IPv6 Date: Fri, 27 Mar 2020 10:05:49 -0700 References: To: devel@edk2.groups.io, per_sundstrom@yahoo.com In-reply-to: Message-id: <15C7FD98-549E-43B7-93B3-EA71F88F393E@apple.com> X-Mailer: Apple Mail (2.3594.4.17) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.138,18.0.645 definitions=2020-03-27_05:2020-03-27,2020-03-27 signatures=0 Content-type: multipart/alternative; boundary="Apple-Mail=_0C65934E-723B-4803-8D39-32AB3973055F" --Apple-Mail=_0C65934E-723B-4803-8D39-32AB3973055F Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii /Per, PCD's are a Platform Configuration Database that is used in the edk2. Valu= es can be compiled in, patched in binaries, or looked up dynamically in a d= atabase. The idea is the consuming code, like the UefiPxeBcDxe driver, code= s stays the same and the platform sets the mechanism that is used. It looks= like value you care about is resolving to a compiled in constant.=20 If you want to change the value in the build go to OvmfPkg/OvmfPkgX64.dsc= (or the platform build DSC file you are using) under the [PcdsFixedAtBuild= ] section add this line: gEfiNetworkPkgTokenSpaceGuid.PcdIPv4PXESupport|0 This PCD value is defined here: NetworkPkg/NetworkPkg.dec [PcdsFixedAtBuild, PcdsPatchableInModule, PcdsDynamic, PcdsDynamicEx] ... ## IPv4 PXE support # 0x01 =3D PXE Enabled # 0x00 =3D PXE Disabled gEfiNetworkPkgTokenSpaceGuid.PcdIPv4PXESupport|0x01|UINT8|0x10000009 The list of types define (DEClare) the legal PCD types and the default val= ue. Adding the info to the OVMF DSC file lets the platform build control th= e PCD type and the default value.=20 Feel free to file a bugzilla and ask for a command line build option to co= ntrol this feature.=20 Thanks, Andrew Fish > On Mar 27, 2020, at 8:51 AM, per_sundstrom via Groups.Io wrote: >=20 > Hi, > I want to exclusively use PXE/IPv6 when deploying a set of physical mach= ines with some QEMU/KVM virtual machines on top. >=20 > So far, the only [hacky] way I have managed to do this is to: > 1) Bring up a VM with OVMF > 2) Set the wanted boot-order with PXE over IPv6 at the top > 3) Save this to the NVRAM > 4) Repete the above for a set of VMs with different MAC addresse > 5) Keep these NVRAMs as "canned" templates (with associated fixed MACs) > 4) Later use one of these NVRAM as a template for VMs with the associate= d MAC=20 >=20 > Obviously this does not scale to hundreds of VMs >=20 > Reading through the code is seems that it might be possible to disable P= XE over IPv4 with > the PCD variable "IPv4PXESupport" =3D . >=20 > I have tried with > > >=20 > where the file is a one byte binary zero and I have verified that it sho= ws up in /sys/firmware/qemu_fw_cfg. > linux-u7u9:/sys/firmware/qemu_fw_cfg/by_name # ls opt/ovmf/X-PcdIPv4PXES= upport/ > key name raw size > linux-u7u9:/sys/firmware/qemu_fw_cfg/by_name # cat opt/ovmf/X-PcdIPv4PXE= Support/size=20 > 1 > linux-u7u9:/sys/firmware/qemu_fw_cfg/by_name # od -b opt/ovmf/X-PcdIPv4P= XESupport/raw=20 > 0000000 000 > Is this something that should work, or is this variable compiled in ? > Are there other ways of acomplishing what I try to do ? >=20 > Thanks, >=20 > /Per >=20 --Apple-Mail=_0C65934E-723B-4803-8D39-32AB3973055F Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=us-ascii /Per,
<= br class=3D"">
PCD's are a Platform Configuration Data= base that is used in the edk2. Values can be compiled in, patched in binari= es, or looked up dynamically in a database. The idea is the consuming code,= like the UefiPxeBcDxe driver, codes stays the same and the platform s= ets the mechanism that is used. It looks like value you care about is resol= ving to a compiled in constant. 

<= /div>
If you want to change the value in the build go to &nb= sp;OvmfPkg/OvmfPkgX64.dsc (or the platform build DSC file you are using) un= der the [PcdsFixedAtBuild] section add this line:
  gEfiNetworkPkgTokenSpaceGuid.PcdIPv4PXESupport|0

This PCD value is defined here: = NetworkPkg/NetworkPkg.dec
[PcdsFixedAtBuild, PcdsPatchableIn= Module, PcdsDynamic, PcdsDynamicEx]
...
&nbs= p; ## IPv4 PXE support
  # 0x01 =3D PXE Enabled
  # 0x00 =3D PXE Disabled
  gEfiNetworkPkgTokenSpace= Guid.PcdIPv4PXESupport|0x01|UINT8|0x10000009

The list of types define (DEClare) the legal P= CD types and the default value. Adding the info to the OVMF DSC file lets t= he platform build control the PCD type and the default value. 

Feel free to file a bugz= illa and ask for a command line build option to control this feature. =

Thanks,

Andrew Fish


On Mar 27, 2020, at 8:51 AM, pe= r_sundstrom via Groups.Io <per_sundstrom=3Dyahoo.com@groups.io> wrote:
Hi,
I want to exclusively use PXE/IPv6 when deploying a set of physical machin= es with some QEMU/KVM virtual machines on top.

So far, the only [hacky] way I have managed to do this is to:
1) Bring up a VM with OVMF
2) Set the wanted boot-order wit= h PXE over IPv6 at the top
3) Save this to the NVRAM
4) Repete the above for a set of VMs with different MAC addresse
5) Keep these NVRAMs as "canned" templates (with associated fixe= d MACs)
4) Later use one of these NVRAM as a template for VMs= with the associated MAC 

Obviously this = does not scale to hundreds of VMs

Reading thro= ugh the code is seems that it might be possible to disable PXE over IPv4 wi= th
the PCD variable "IPv4PXESupport" =3D <one byte binary = zero>.

I have tried with
&nbs= p;   <qemu:arg value=3D'-fw_cfg'/>
 &nbs= p;  <qemu:arg value=3D'opt/ovmf/X-PcdIPv4PXESupport,file=3D/var/lib= /libvirt/qemu/nvram/zero'/>

where the file = is a one byte binary zero and I have verified that it shows up in /sys/firm= ware/qemu_fw_cfg.

linux-u7u9:/sys/firmware/qemu_fw_cfg/by_name # ls opt/ovmf/X= -PcdIPv4PXESupport/
key  name  raw size
linux-u7u9:/sys/firmware/qemu_fw_cfg/by_na= me # cat opt/ovmf/X-PcdIPv4PXESupport/size
1
linux-u7u9:/sys/firmware/qemu_fw_cfg/by_name # od -= b opt/ovmf/X-PcdIPv4PXESupport/raw
0000000 000

Is= this something that should work, or is this variable compiled in ?
Are there other ways of acomplishing what I try to do ?

Thanks,

   /Per

--Apple-Mail=_0C65934E-723B-4803-8D39-32AB3973055F--