#992119 virt-install --cloud-init doesn't work with Debian genericcloud images

#992119#5
Date:
2021-08-12 00:13:29 UTC
From:
To:
I tried to use virt-install's --cloud-init option with a genericcloud
image[0], and cloud-init in the image didn't seem to find the ISO that
virt-install set up. From the XML, it looks like virt-install made a
SATA drive:

     <disk type='file' device='cdrom'>
       <driver name='qemu' type='raw'/>
       <source
file='/var/lib/libvirt/boot/virtinst-5wk0hc7u-cloudinit.iso' index='1'/>
       <backingStore/>
       <target dev='sda' bus='sata'/>
       <readonly/>
       <alias name='sata0-0-0'/>
       <address type='drive' controller='0' bus='0' target='0' unit='0'/>
     </disk>

https://cloud.debian.org/images/cloud/ says that genericcloud "is
smaller than `generic` by excluding drivers for physical hardware", so
I'm guessing the reason cloud-init couldn't find the ISO is that
genericcloud images don't include SATA drivers? I tried a generic image
instead, and it worked.

Would it make sense to change virt-install to use virtio for the ISO
file? (Or some other way of providing the ISO that genericcloud has
drivers for?)

  [0]
https://cloud.debian.org/images/cloud/bullseye/daily/20210808-728/debian-11-genericcloud-amd64-daily-20210808-728.raw

#992119#10
Date:
2023-04-20 17:47:18 UTC
From:
To:
A possible workaround is passing "--machine pc" to virt-install. This
causes the old(er) i440FX instead of Q35 (current default) to be used.

The following would provide a solution, but seems to be out of scope for
the cloud kernel:
https://salsa.debian.org/kernel-team/linux/-/merge_requests/699