Repository navigation
Conversation
Allow users to restrict the network boot protocols for a specific network. Some networks may not provide IPv4 or IPv6 access based on hardware configuration. If a user attempts to network boot it will prioritise IPv6 before falling back to IPv4 if the IPv6 DHCP request times out. This can create a long delay before booting successfully. Some users may also want to demonstrate adoption of IPv6 only; disabling IPv4 booting is a good step towards this. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Signed-off-by: Gerald Elder-Vass <gerald.elder-vass@citrix.com>
The virtual UEFI firmware controls which boot devices are valid for a given VM. Populate XenStore with the VM's network restrictions before it boots so the firmware can appropriately block non-conforming network boot paths. It is expected for a VM to be resident on a single network while making use of this feature (per customer request), hence if a protocol is disabled on _any_ network the VM is attached to; the protocol will be disabled for the VM. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Signed-off-by: Gerald Elder-Vass <gerald.elder-vass@citrix.com>
During network creation, or upgrade, the network's new pxe-dhcp field should be automatically populated with the default values. Initially everything is "enabled" to maintain compatibility during an upgrade. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Signed-off-by: Gerald Elder-Vass <gerald.elder-vass@citrix.com>
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Signed-off-by: Gerald Elder-Vass <gerald.elder-vass@citrix.com>
|
Hi Gerald! It seems strange to me that this setting is being added to network instead to the VM, or, to be more precise, the template so it can scale; this is because this is a setting that is applied in xenstore, per-VM; instead of being a setting that's being set for the network layer, i.e. openvswitch. If the setting was about limiting which DHCP is allowed in a network I would agree it makes sense to place it in the network object, but as things stand I'm not convinced. Is there anything in particular that made you choose to express the setting this way? |
|
Hi Pau! 😄 Our internal design agreed that the network level made sense as this is where the restriction would actually exist (does the physical network support the protocol), but it definitely does complicate determining if a VM can network boot with that protocol or not when multiple networks are involved. |
I don't think there's a good way to set keys to xenstore, so a custom string map is reasonable. Other might have differing opinions (@last-genius) |
Right now, the map's keys silently get truncated by xenopsd - it's not obvious from the datamodel what the possible values are. IMO it's better to have two boolean fields: |
|
Thanks chaps, I'll close this draft PR and open one with the suggested changes after I've tested it :D |
|
Raised #7318 |
This improvement is from a customer request to avoid network boot using disabled internet protocols specifically on UEFI VMs.
The network itself is restricted from using the specific protocol hence the restriction is applied at the network level.
For the initial feature implementation, we determine that a VM is unable to use a specific protocol if the protocol is disabled on any of the networks attached. The VMs in question are expected to only have a single network.
In future it may make sense to provide finer granularity by applying the restriction to the VM or to the VIF itself.
The Toolstack will populate a XenStore entry before the VM boots which the virtual firmware will read to determine if a boot device is valid.
In XenServer, the firmware will assume the protocol is enabled unless it can; access XenStore, determine the XenStore entry for the protocol exists, read the entry, confirm the entry is exactly "false".
Along with populating the default network value on create/upgrade; this will ensure there is no change in behaviour until a user opts into the feature.
The code in this PR was Co-authored by claude using the Sonnet 5 model
--
After applying updates and restarting:
Changing the value:
Changed value:
XenStore populated before first boot: