Skip to content

Commit 7b1cb6f

Browse files
authored
feat(control): add ZoneSpec.vm_image for VM-image zones (#41)
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 41fce4c commit 7b1cb6f

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.
@@ -637,6 +641,22 @@ message ZoneScratchDiskSpecStaticBlock {
637641
string device = 2;
638642
}
639643

644+
message ZoneVmImageSpec {
645+
// Resolved against the daemon's VM-image directory; absolute paths and
646+
// paths escaping it are rejected.
647+
string path = 1;
648+
// No autodetection: mitigates CHV format-probing CVE GHSA-jmr4-g2hv-mjj6
649+
// (hardened in CHV v51.0).
650+
ZoneVmImageFormat format = 2;
651+
}
652+
653+
enum ZoneVmImageFormat {
654+
ZONE_VM_IMAGE_FORMAT_UNSPECIFIED = 0;
655+
ZONE_VM_IMAGE_FORMAT_RAW = 1;
656+
// V1: launched with in-image backing files disabled.
657+
ZONE_VM_IMAGE_FORMAT_QCOW2 = 2;
658+
}
659+
640660
message ZoneDeviceStatus {
641661
repeated ZoneDiskStatus disks = 1;
642662
ZoneMountStatus mount = 2;

0 commit comments

Comments
 (0)