From b9d31acfa9fd3e1a35f0659594f04e9db215538b Mon Sep 17 00:00:00 2001 From: Till Wegmueller Date: Tue, 7 Apr 2026 21:15:20 +0200 Subject: [PATCH] Use IDE CDROM for cloud-init seed ISO instead of virtio-blk Ubuntu cloud images use LABEL=cloudimg-rootfs to find the root disk, which expects it to be the first virtio-blk device. Having the seed ISO as a second virtio-blk device confused the boot order, causing a kernel panic. Using IDE CDROM avoids this conflict. --- crates/vm-manager/src/backends/qemu.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/crates/vm-manager/src/backends/qemu.rs b/crates/vm-manager/src/backends/qemu.rs index 2b741d5..2238a95 100644 --- a/crates/vm-manager/src/backends/qemu.rs +++ b/crates/vm-manager/src/backends/qemu.rs @@ -265,16 +265,16 @@ impl Hypervisor for QemuBackend { } } - // Seed ISO (cloud-init) + // Seed ISO (cloud-init) — use IDE CDROM so it doesn't interfere with + // the root disk's virtio-blk device ordering (Ubuntu cloud images use + // LABEL=cloudimg-rootfs which expects the root disk as the first virtio device) if let Some(ref iso) = vm.seed_iso_path { args.extend([ "-drive".into(), format!( - "file={},format=raw,if=none,id=seed,readonly=on", + "file={},format=raw,if=ide,media=cdrom,readonly=on", iso.display() ), - "-device".into(), - "virtio-blk-pci,drive=seed".into(), ]); }