
On Tue, Jun 24, 2025 at 11:47:57 +0200, Jiri Denemark wrote:
From: Peter Krempa <pkrempa@redhat.com>
While 'usb-bot' and 'usb-storage' are ABI and migration compatible for disks it's not the case for cdroms. When migrating from a new config using 'usb-bot' to an older daemon which would use 'usb-storage' the guest os will get I/O errors.
Thus we must properly fill in models for 'usb' disks so that cdroms can be handled properly.
When parsing XML fill in the models and drop the appropriate models when formatting migratable XML.
The logic is explained in comments in the code.
Signed-off-by: Peter Krempa <pkrempa@redhat.com> --- src/qemu/qemu_domain.c | 21 ++++++++ src/qemu/qemu_postparse.c | 49 ++++++++++++++++++- src/qemu/qemu_postparse.h | 4 +- tests/qemublocktest.c | 13 +++-- .../qemuhotplug-base-live+cdrom-usb.xml | 2 +- .../qemuhotplug-base-live+disk-usb.xml | 2 +- .../disk-cache.x86_64-latest.xml | 2 +- .../disk-usb-device-model.x86_64-latest.xml | 4 +- ...test.QEMU_CAPS_DEVICE_USB_BOT-disabled.xml | 24 ++++----- ...date.QEMU_CAPS_DEVICE_USB_BOT-disabled.xml | 24 ++++----- ...sk-usb-device.x86_64-latest.abi-update.xml | 24 ++++----- .../disk-usb-device.x86_64-latest.xml | 24 ++++----- 12 files changed, 132 insertions(+), 61 deletions(-) ... The logic is OK. I guess my comment in the previous patch was actually about using VIR_DOMAIN_DEF_PARSE_ABI_UPDATE flag. But you're not touching this part here so I guess everything should be fine. Although I'm still surprised we'd allow ABI update when starting a domain, I
On Mon, Jun 23, 2025 at 21:59:14 +0200, Peter Krempa wrote: thought this was only allowed when defining it...
/* default disk encryption engine */ for (n = disk->src; virStorageSourceIsBacking(n); n = n->backingStore) { if (n->encryption && n->encryption->engine == VIR_STORAGE_ENCRYPTION_ENGINE_DEFAULT)
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>