Files
cozystack/packages/apps/vm-instance/values.schema.json
Andrei KvapilandClaude 039b67ecf1 feat(vm-instance): add firmware config (UEFI/BIOS, Secure Boot, persistent EFI)
Expose a per-VM `firmware` block on the VMInstance API so users can
control the boot mode directly instead of relying solely on the
instanceProfile:

- bootloader: "uefi" (OVMF) or "bios" (SeaBIOS); empty inherits the
  instanceProfile default (backward compatible)
- secureBoot: enable UEFI Secure Boot (also emits domain.features.smm,
  which KubeVirt requires when Secure Boot is on)
- efiPersistent: persist EFI NVRAM so enrolled Secure Boot keys (e.g. an
  updated Microsoft UEFI CA) survive reboots

efiPersistent uses a KubeVirt backend-storage PVC. On the default
ReadWriteOnce storage that PVC pins the VM to its node, so a
persistent-EFI VM cannot be live-migrated; this is documented on the
field and is sufficient for one-time in-guest tasks such as a Microsoft
UEFI CA update. Live-migration would require an RWX-Filesystem
vmStateStorageClass and is out of scope for this chart.

Regenerated values.schema.json, README, the generated API types and
deepcopy, and the vm-instance-rd ApplicationDefinition.

Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: Andrei Kvapil <andrei.kvapil@aenix.io>
2026-08-31 18:35:39 +02:00

211 lines
5.9 KiB
JSON

{
"title": "Chart Values",
"type": "object",
"properties": {
"cloudInit": {
"description": "Cloud-init user data.",
"type": "string",
"default": ""
},
"cloudInitSeed": {
"description": "Seed string to generate SMBIOS UUID for the VM.",
"type": "string",
"default": ""
},
"cpuModel": {
"description": "Model specifies the CPU model inside the VMI. List of available models https://github.com/libvirt/libvirt/tree/master/src/cpu_map",
"type": "string",
"default": ""
},
"disks": {
"description": "List of disks to attach.",
"type": "array",
"default": [],
"items": {
"type": "object",
"required": [
"name"
],
"properties": {
"bus": {
"description": "Disk bus type (e.g. \"sata\").",
"type": "string"
},
"name": {
"description": "Disk name.",
"type": "string"
}
}
}
},
"external": {
"description": "Enable external access from outside the cluster.",
"type": "boolean",
"default": false
},
"externalAllowICMP": {
"description": "Whether to accept ICMP traffic to the VM in PortList mode (preserves ping and PMTU discovery). No effect in WholeIP mode. Default true so ping behaves as users expect even when port filtering is in effect.",
"type": "boolean",
"default": true
},
"externalMethod": {
"description": "Method to pass through traffic to the VM.",
"type": "string",
"default": "PortList",
"enum": [
"PortList",
"WholeIP"
]
},
"externalPorts": {
"description": "Ports to forward from outside the cluster.",
"type": "array",
"default": [
22
],
"items": {
"type": "integer"
}
},
"firmware": {
"description": "Firmware and boot configuration (UEFI/BIOS selection, Secure Boot, persistent EFI NVRAM).",
"type": "object",
"default": {},
"properties": {
"bootloader": {
"description": "Bootloader to boot the VM with: \"uefi\" (OVMF) or \"bios\" (SeaBIOS). Empty inherits the instanceProfile default.",
"type": "string"
},
"efiPersistent": {
"description": "Persist EFI NVRAM (e.g. enrolled Secure Boot keys, such as an updated Microsoft UEFI CA) across reboots. Only applies when bootloader is \"uefi\". On default RWO storage the VM is node-pinned (no live-migration).",
"type": "boolean"
},
"secureBoot": {
"description": "Enable UEFI Secure Boot. Only applies when bootloader is \"uefi\".",
"type": "boolean"
}
}
},
"gpus": {
"description": "List of GPUs to attach (NVIDIA driver requires at least 4 GiB RAM).",
"type": "array",
"default": [],
"items": {
"type": "object",
"required": [
"name"
],
"properties": {
"name": {
"description": "The name of the GPU resource to attach.",
"type": "string"
}
}
}
},
"instanceProfile": {
"description": "Virtual Machine preferences profile.",
"type": "string",
"default": "ubuntu"
},
"instanceType": {
"description": "Virtual Machine instance type.",
"type": "string",
"default": "u1.medium"
},
"networks": {
"description": "Networks to attach the VM to.",
"type": "array",
"default": [],
"items": {
"type": "object",
"properties": {
"name": {
"description": "Network attachment name.",
"type": "string"
}
}
}
},
"resources": {
"description": "Resource configuration for the virtual machine.",
"type": "object",
"default": {},
"properties": {
"cpu": {
"description": "Number of CPU cores allocated.",
"pattern": "^(\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))))?$",
"anyOf": [
{
"type": "integer"
},
{
"type": "string"
}
],
"x-kubernetes-int-or-string": true
},
"memory": {
"description": "Amount of memory allocated.",
"pattern": "^(\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))))?$",
"anyOf": [
{
"type": "integer"
},
{
"type": "string"
}
],
"x-kubernetes-int-or-string": true
},
"sockets": {
"description": "Number of CPU sockets (vCPU topology).",
"pattern": "^(\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))))?$",
"anyOf": [
{
"type": "integer"
},
{
"type": "string"
}
],
"x-kubernetes-int-or-string": true
}
}
},
"runStrategy": {
"description": "Requested running state of the VirtualMachineInstance",
"type": "string",
"default": "Always",
"enum": [
"Always",
"Halted",
"Manual",
"RerunOnFailure",
"Once"
]
},
"sshKeys": {
"description": "List of SSH public keys for authentication.",
"type": "array",
"default": [],
"items": {
"type": "string"
}
},
"subnets": {
"description": "Deprecated: use networks instead.",
"type": "array",
"default": [],
"items": {
"type": "object",
"properties": {
"name": {
"description": "Network attachment name.",
"type": "string"
}
}
}
}
}
}