jammy-server-cloudimg-amd64-disk-kvm.img NoCloud data source not detected with qemu SATA cdrom
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
cloud-init |
New
|
Undecided
|
Unassigned | ||
cloud-init (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
cloud-init running in ubuntu jammy-server-
SATA is the default used by qemu's -M q35 machine type, which is the preferred modern config over the default `-M pc` machine type, which uses IDE. Using -M pc and therefore IDE _does_ work.
Using the the non-KVM image also _does_ work (jammy-
Debugging this a bit showed that cloud-init `ds-identify --force` correctly finds the ISO once I've logged in, but not at boot up, I think because the sata cdrom is discovered by udev too late. This also affects ubuntu20.04 cloud images similarly: -disk-kvm is busted, other image is fine.
Maybe it's an initrd driver issue, or issue with bits being modularized when they shouldn't, not sure. Here's the loaded driver difference for -M pc and -M q35 with -kvm-disk.img
root@ubuntu:~# diff -rup pc q35
--- pc 2022-02-22 19:25:11.731067208 +0000
+++ q35 2022-02-22 19:26:55.749459099 +0000
@@ -7,7 +7,8 @@ loop 28672 6
dm_multipath 24576 0
dm_mod 86016 3 dm_multipath
kvm_intel 200704 0
-pata_acpi 12288 0
+ahci 36864 0
+libahci 24576 1 ahci
fuse 106496 1
configfs 32768 1
ip_tables 24576 0
Some background: I'm upstream virt-manager/
This isn't virt-install --cloud-init specific, see this report which pointed me towards the -kvm-disk difference: https:/
Though virt-install users are kinda more likely to hit this since we increasingly default to q35. If users are just testing with qemu-kvm directly without specifying -machine q35, they won't hit this.
Reproducer with virt-install:
git clone https:/
cd virt-manager
wget https:/
./virt-install --osinfo ubuntu20.04 --disk jammy-server-
The reporter of the virt-install bug also found this expired focal cloud-images bug which sounds like the same root issue: https:/ /bugs.launchpad .net/cloud- images/ +bug/1940791
If someone with more launchpad knowledge can route this report to the correct place, please do. Would be nice to get this straightened out before 22.04 is released.