mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-08-27 19:11:16 +00:00
We have previously effectively ignored all <controller type='ide'> elements in a domain definition. On the i440fx-based machinetypes there is an IDE controller that is included in the chipset and can't be removed (which is the ide controller with index='0'>), so it makes sense to ignore that one controller. However, if an i440fx domain definition has a 2nd controller, nothing catches this error (unless you also have a disk attached to it, in which case qemu will complain that you're trying to use the ide controller named "ide1", which doesn't exist), and if any other type of domain has even a single controller defined, it will be incorrectly ignored. Ignoring a bogus controller definition isn't such a big problem, as long as an error is logged when any disk is attached to that non-existent controller. But in the case of q35-based machinetypes, the hardcoded id ("alias" in libvirt terms) of its builtin SATA controller is "ide", which happens to be the same id as the builtin IDE controller on i440fx machinetypes. So libvirt creates a commandline believing that it is connecting the disk to the builtin (but actually nonexistent) IDE controller, qemu thinks that libvirt wanted that disk connected to the builtin SATA controller, and everybody is happy. Until you try to connect a 2nd disk to the IDE controller. Then qemu will complain that you're trying to set unit=1 on a controller that requires unit=0 (SATA controllers are organized differently than IDE controllers). After this patch, if a domain has an IDE controller defined for a machinetype that has no IDE controllers, libvirt will log an error about the controller itself as it is building the qemu commandline (rather than a (possible) error from qemu about disks attached to that controller). This is done by adding IDE to the list of controller types that are handled in the loop that creates controller command strings in qemuBuildCommandline() (previously it would *always* skip IDE controllers). Then qemuBuildControllerDevStr() is modified to log an appropriate error in the case of IDE controllers. In the future, if we add support for extra IDE controllers (piix3-ide and/or piix4-ide) we can just add it into the IDE case in qemuBuildControllerDevStr(). For now, nobody seems anxious to add extra support for an aging and very slow controller, when there are so many better options available. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1176071 (Fedora) |
||
---|---|---|
.. | ||
qemuxml2xmlout-balloon-device-auto.xml | ||
qemuxml2xmlout-balloon-device-period.xml | ||
qemuxml2xmlout-bios-nvram-os-interleave.xml | ||
qemuxml2xmlout-boot-menu-disable-with-timeout.xml | ||
qemuxml2xmlout-channel-virtio-auto.xml | ||
qemuxml2xmlout-channel-virtio-state-active.xml | ||
qemuxml2xmlout-channel-virtio-state-inactive.xml | ||
qemuxml2xmlout-console-compat-auto.xml | ||
qemuxml2xmlout-console-virtio.xml | ||
qemuxml2xmlout-cpu-empty.xml | ||
qemuxml2xmlout-cpu-numa1.xml | ||
qemuxml2xmlout-cpu-numa2.xml | ||
qemuxml2xmlout-cpu-numa-no-memory-element.xml | ||
qemuxml2xmlout-cputune-iothreads.xml | ||
qemuxml2xmlout-cputune-iothreadsched.xml | ||
qemuxml2xmlout-default-kvm-host-arch.xml | ||
qemuxml2xmlout-default-qemu-host-arch.xml | ||
qemuxml2xmlout-disk-backing-chains-active.xml | ||
qemuxml2xmlout-disk-backing-chains-inactive.xml | ||
qemuxml2xmlout-disk-drive-discard.xml | ||
qemuxml2xmlout-disk-mirror-old-inactive.xml | ||
qemuxml2xmlout-disk-mirror-old.xml | ||
qemuxml2xmlout-disk-mirror.xml | ||
qemuxml2xmlout-disk-scsi-device-auto.xml | ||
qemuxml2xmlout-disk-source-pool.xml | ||
qemuxml2xmlout-graphics-listen-network2.xml | ||
qemuxml2xmlout-graphics-spice-timeout.xml | ||
qemuxml2xmlout-hostdev-scsi-autogen-address.xml | ||
qemuxml2xmlout-memtune-unlimited.xml | ||
qemuxml2xmlout-memtune.xml | ||
qemuxml2xmlout-metadata-duplicate.xml | ||
qemuxml2xmlout-metadata.xml | ||
qemuxml2xmlout-numad-auto-memory-vcpu-cpuset.xml | ||
qemuxml2xmlout-numad-auto-memory-vcpu-no-cpuset-and-placement.xml | ||
qemuxml2xmlout-numad-auto-vcpu-no-numatune.xml | ||
qemuxml2xmlout-numatune-auto-prefer.xml | ||
qemuxml2xmlout-numatune-memnode.xml | ||
qemuxml2xmlout-pci-autoadd-addr.xml | ||
qemuxml2xmlout-pci-autoadd-idx.xml | ||
qemuxml2xmlout-pci-bridge-many-disks.xml | ||
qemuxml2xmlout-pcie-root.xml | ||
qemuxml2xmlout-pcihole64-gib.xml | ||
qemuxml2xmlout-pmu-feature.xml | ||
qemuxml2xmlout-q35.xml | ||
qemuxml2xmlout-s390-defaultconsole.xml | ||
qemuxml2xmlout-seclabel-dynamic-labelskip.xml | ||
qemuxml2xmlout-seclabel-dynamic-none-relabel.xml | ||
qemuxml2xmlout-seclabel-dynamic-relabel.xml | ||
qemuxml2xmlout-seclabel-none.xml | ||
qemuxml2xmlout-serial-target-port-auto.xml | ||
qemuxml2xmlout-tap-vhost-incorrect.xml | ||
qemuxml2xmlout-usb-ich9-ehci-addr.xml | ||
qemuxml2xmlout-usb-redir-filter-version.xml | ||
qemuxml2xmlout-usb-redir-filter.xml |