Bugzilla:
https://bugzilla.redhat.com/show_bug.cgi?id=1942325
The first part of the series introduces the "gcaps_virtio_1_0" guest
capability (default value, according to the current virt-v2v assumption:
"true"), and updates the libvirt and JSON outputs to take the new
capability into account.
In the libvirt output, the virtio device models are flipped to -- or are
explicitly introduced as -- virtio-transitional if the machine type is
Q35 and the new "gcaps_virtio_1_0" capability is "false".
In the JSON output, we don't change any device models, only expose the
new capability, and allow CNV / KubeVirt to act upon it. This follows
the spirit of <
https://bugzilla.redhat.com/show_bug.cgi?id=1942325#c11>.
The second part of the series wraps the osinfo_os_get_all_devices()
libosinfo API, and introduces a dependent function to retrieve the guest
OS's support for each of the Q35 chipset and the virtio-1.0 protocol
(extrapolated from support for virtio1.0-net), from the osinfo database.
The final patch in the series couples the two previous parts. The Notes
section of this patch contains extensive test results.
Thanks,
Laszlo
Laszlo Ersek (9):
lib/types: reformat "string_of_guestcaps"
lib/types: update "string_of_guestcaps"
lib/types: introduce the "gcaps_virtio_1_0" guest capability
output/create_libvirt_xml: pick "virtio-transitional" models when
needed
output/create_json: expose "gcaps_virtio_1_0"
convert/libosinfo: wrap osinfo_os_get_all_devices()
convert/libosinfo_utils: introduce "string_of_osinfo_device_list"
convert/libosinfo_utils: introduce "os_support_of_osinfo_device_list"
convert: determine machine type and virtio-1.0 from osinfo for x86
guests
convert/convert_linux.ml | 50 +++++++++------
convert/convert_windows.ml | 31 ++++++---
convert/libosinfo-c.c | 66 ++++++++++++++++++++
convert/libosinfo.ml | 14 +++++
convert/libosinfo.mli | 14 +++++
convert/libosinfo_utils.ml | 54 ++++++++++++++++
convert/libosinfo_utils.mli | 17 +++++
lib/types.ml | 24 +++++--
lib/types.mli | 4 ++
output/create_json.ml | 1 +
output/create_libvirt_xml.ml | 28 ++++++---
tests/test-v2v-cdrom.expected | 2 +-
tests/test-v2v-floppy.expected | 2 +-
tests/test-v2v-i-ova.xml | 8 +--
14 files changed, 266 insertions(+), 49 deletions(-)
base-commit: 07b12fe99fb9cf0b75fe45d3eaa07b4bbc1bbe89
--
2.19.1.3.g30247aa5d201