Skip to content

Commit 617e3b9

Browse files
committed
feat(control): add ZoneSpec.vm_image for VM-image zones
V1 scope of the VM Image Support PRD. qcow2 launches with in-image backing files disabled to keep the V1 trust boundary narrow. Fixes edera-dev/protect#2878 Signed-off-by: Luca Di Maio <luca.dimaio1@gmail.com>
1 parent 7906942 commit 617e3b9

1 file changed

Lines changed: 20 additions & 0 deletions

File tree

protect/control/v1/common.proto

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@ message ZoneSpec {
3838
string fork_parent_zone_id = 12;
3939
// Configures Control API access for the zone.
4040
ZoneControlApiSpec control_api = 13;
41+
// Boots the zone from a disk image via UEFI firmware instead of the
42+
// container path. KVM-only; mutually exclusive with `kernel`, `initrd`,
43+
// `addons`, `scratch_disk` (rejected by the daemon).
44+
ZoneVmImageSpec vm_image = 14;
4145
}
4246

4347
// Access control specification on the Control API for a zone.
@@ -627,6 +631,22 @@ message ZoneScratchDiskSpecStaticBlock {
627631
string device = 2;
628632
}
629633

634+
message ZoneVmImageSpec {
635+
// Resolved against the daemon's VM-image directory; absolute paths and
636+
// paths escaping it are rejected.
637+
string path = 1;
638+
// No autodetection: mitigates CHV format-probing CVE GHSA-jmr4-g2hv-mjj6
639+
// (hardened in CHV v51.0).
640+
ZoneVmImageFormat format = 2;
641+
}
642+
643+
enum ZoneVmImageFormat {
644+
ZONE_VM_IMAGE_FORMAT_UNSPECIFIED = 0;
645+
ZONE_VM_IMAGE_FORMAT_RAW = 1;
646+
// V1: launched with in-image backing files disabled.
647+
ZONE_VM_IMAGE_FORMAT_QCOW2 = 2;
648+
}
649+
630650
message ZoneDeviceStatus {
631651
repeated ZoneDiskStatus disks = 1;
632652
ZoneMountStatus mount = 2;

0 commit comments

Comments
 (0)