Due to a bug report by someone trying to add two cd drives to a Q35
domain in virt-manager (which assumes all CD drives are IDE), I've
learned that libvirt doesn't support adding a "piix3-ide" controller
when there is no ide controller for the domain (or when there are more
than 4 disk devices that need to be connected to an IDE controller). It
does dutifully add:
<controller type='ide' index='n'/>
as many times as necessary, it's just that there is no code behind that
to add the device to the qemu commandline.
I first thought I should add support for this, but then had second
thoughts after following this reasoning:
1) I'm not sure exactly where the piix3-ide controller was added to
qemu, but it was apparently sometime after qemu-1.2.0 (at least
according to tests/qemuhelpdata/qemu-1.2.0-device).
2) At some point (again not sure, but it was there at least in qemu 1.0)
support for a SATA controller was added (named ich9-achi by qemu), and
it can also accept CD devices. So there is no version of qemu that has
piix3-ide and no ich9-ahci.
3) "ide old, ahci new"
4) I'm doubtful there is any OS old enough to require an IDE disk
controller rather than SATA that anyone would also want to put > 4 disk
devices on.
That leads me to think that maybe it is a better idea to just log an
error if someone tries to add a disk with bus='ide' on a Q35 domain, or
add more than 4 of them on an i440fx domain.
Does anyone have an opinion, or (better yet) a smoking gun (e.g.
problems with piix3-ide, or alternately problems with ahci or a
situation where IDE would be required) that will force action in one
direction or the other?
(One possible example - although ahci was added on or before qemu 1.0,
up until the most recent upstream it wasn't possible to migrate or save
a domain with an ahci controller. Do we need to worry about people with
qemu < 2.3.0 that want > 4 IDE devices? Or should we figure that if none
have come up before now, likely none will come up in the future either?)