Files
harvester-ui-extension/pkg/harvester/utils/vm.js
T
Alejandro BonillaandClaude Opus 5.5 5af181f5b6 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>
2026-10-07 11:21:27 +08:00

23 lines
634 B
JavaScript

import { HCI as HCI_ANNOTATIONS } from '@pkg/harvester/config/labels-annotations';
export function parseVolumeClaimTemplates(data) {
let out = [];
try {
out = JSON.parse(data?.metadata?.annotations?.[HCI_ANNOTATIONS.VOLUME_CLAIM_TEMPLATE]) || [];
} catch (e) {}
return out;
}
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);
}