Skip to content

vm-configurator: Don't use device.get_name () directly

According to libosinfo the device's name element is simply a human readable string but there's absolutely no guarantee that it's the device name used by qemu/libvirt.

So far, we've been lucky enough to never hit a poblem because of that but there was already some issues on virt-manager because they were blindly using that.

In order to avoid issues for the future, let's actually translate (on our side for now) the libosinfo names into qemu/libvirt names (the ones supported by libvirt-glib) and ensure we always use a valid one.

One example of the issue is the "ich9-hda" audio device that's known as "ich9" on libvirt-glib side. Fortunately, we wouldn't never ever hit the issue there as for this cases we're already returning the DomainSoundModel.

Signed-off-by: Fabiano Fidêncio fidencio@redhat.com

Merge request reports