Skip to content

Commit 86256eb

Browse files
committed
vmm: disallow iso rootfs for modern images
1 parent 01c26b7 commit 86256eb

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

vmm/src/app/qemu.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -419,13 +419,19 @@ impl VmConfig {
419419
]);
420420
}
421421
if let Some(rootfs) = &self.image.rootfs {
422+
let img_ver = self.image.info.version_tuple().unwrap_or_default();
422423
let ext = rootfs
423424
.extension()
424425
.unwrap_or_default()
425426
.to_str()
426427
.unwrap_or_default();
427428
match ext {
428429
"iso" => {
430+
if img_ver >= (0, 5, 0) {
431+
bail!(
432+
"Unsupported rootfs type: {ext}. Image versions >= 0.5.0 must use verity rootfs"
433+
);
434+
}
429435
command.arg("-cdrom").arg(rootfs);
430436
}
431437
"verity" => {

0 commit comments

Comments
 (0)