From: Masayoshi Mizuma <m.mizuma@xxxxxxxxxxxxxx> This patch series is RFC to implement to make <transient/> disk sharable. Currently, <transient/> disk option for qemu uses blockdev-snapshot QMP command with overlay. In that case, qemu holds the write lock to the original disk, so we cannot share the original disks with the other qemu guests. This patch series tries to implement to make the disks, which have <transient/> disk option, sharable by using disk hot-plug. First, create the overlay disk with the original disk is set as the backingStore. Then, blockdev-del the StorageProgs and FormatProgs of the disk. That's because to fix the bootindex of the disk. Lastly, device_add the disks and CPUs start. The sharable transient disk has the same limitation as the current <transient/> disk option, and also has the following limitations: - qemu needs to have hotplug feature - All the disk bus is virtio Masayoshi Mizuma (7): qemu_hotplug: Add asynJob argument to qemuDomainAttachDiskGeneric qemu_hotplug: Add asyncJob argument to qemuDomainAttachDeviceDiskLiveInternal qemu_hotplug: Add asynJob argument to qemuDomainRemoveDiskDevice qemu_hotplug: Add bootindex argument to qemuDomainAttachDiskGeneric qemu_hotplug: make <transient/> disk sharable qemu: Add check whether the transient disks are sharable qemu: Add virtio disks as sharable transient disks src/qemu/qemu_command.c | 20 ++- src/qemu/qemu_domain.h | 3 + src/qemu/qemu_hotplug.c | 322 ++++++++++++++++++++++++++++++++++++++-- src/qemu/qemu_hotplug.h | 3 + src/qemu/qemu_process.c | 38 ++++- 5 files changed, 368 insertions(+), 18 deletions(-) -- 2.27.0