mirror of
https://github.com/CloudNebulaProject/vm-manager.git
synced 2026-04-10 21:30:41 +00:00
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.
This commit is contained in:
parent
4c73599379
commit
b9d31acfa9
1 changed files with 4 additions and 4 deletions
|
|
@ -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 {
|
if let Some(ref iso) = vm.seed_iso_path {
|
||||||
args.extend([
|
args.extend([
|
||||||
"-drive".into(),
|
"-drive".into(),
|
||||||
format!(
|
format!(
|
||||||
"file={},format=raw,if=none,id=seed,readonly=on",
|
"file={},format=raw,if=ide,media=cdrom,readonly=on",
|
||||||
iso.display()
|
iso.display()
|
||||||
),
|
),
|
||||||
"-device".into(),
|
|
||||||
"virtio-blk-pci,drive=seed".into(),
|
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue