feat: support network boot (PXE) for VM interfaces (#1176)

Add an "Enable network boot (PXE)" option to bridge network interfaces and
a VM-level choice to place network boot devices before or after volumes.
The form now owns interface boot order: enabled NICs get sequential boot
orders ahead of or behind the volumes, and a stale bootOrder is no longer
inherited from the old spec.

This also fixes editing a VM whose interface bootOrder was set in YAML
(the documented workaround): the form used to renumber disks from 1 while
keeping the NIC's bootOrder, producing a duplicate that KubeVirt rejects.

The boot order shown on the VM, snapshot and backup detail pages now
includes network interfaces.

Related: harvester/harvester#3325

Signed-off-by: Alejandro Bonilla <abonilla@suse.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Alejandro Bonilla
2026-10-07 11:21:27 +08:00
committed by GitHub
co-authored by Claude Opus 5.5
parent 528255dea4
commit 5af181f5b6
11 changed files with 141 additions and 51 deletions
+9
View File
@@ -11,3 +11,12 @@ export function parseVolumeClaimTemplates(data) {
}
export const EMPTY_IMAGE = 'EMPTY_IMAGE';
/**
* Disks and interfaces that take part in the boot sequence, sorted by boot order.
*/
export function getBootDevices(devices = {}) {
return [...(devices.disks || []), ...(devices.interfaces || [])]
.filter((device) => !!device.bootOrder)
.sort((a, b) => a.bootOrder - b.bootOrder);
}