[PATCH] ch_driver: fix condition in virCHDomainRemoveInactive()
by Purna Pavan Chandra Aekkaladevi
Rectify the condition to remove a domain only if it is not persistent.
Signed-off-by: Purna Pavan Chandra Aekkaladevi <paekkaladevi(a)linux.microsoft.com>
---
src/ch/ch_domain.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/ch/ch_domain.c b/src/ch/ch_domain.c
index c0d6c75b1d..2f3fae6758 100644
--- a/src/ch/ch_domain.c
+++ b/src/ch/ch_domain.c
@@ -36,7 +36,7 @@ void
virCHDomainRemoveInactive(virCHDriver *driver,
virDomainObj *vm)
{
- if (vm->persistent) {
+ if (!vm->persistent) {
virDomainObjListRemove(driver->domains, vm);
}
}
--
2.34.1
10 months, 3 weeks
[libvirt PATCH V2 0/4] add loongarch support for libvirt
by Xianglai Li
Hello, Everyone:
This patch series adds libvirt support for loongarch.Although the bios
path and name has not been officially integrated into qemu and we think
there are still many shortcomings, we try to push a version of patch to
the community according to the opinions of the community, hoping to
listen to everyone's opinions. Anyway we have a version of libvirt that
supports loongarch.
You can also get libvirt's patch from the link below:
https://gitlab.com/lixianglai/libvirt
branch: loongarch
Since the patch associated with loongarch has not yet been submitted to
the virt-manager community, we are providing a temporary patch with
loongarch for the time being patch's virt-manager, the open source work
of virt-manager adding loongarch will be followed up later or
synchronized with the open source libvirt.
You can get the virt-manager code with loongarch patch from the link below:
https://github.com/lixianglai/virt-manager
branch: loongarch
loongarch's virtual machine bios is not yet available in qemu, so you can get it from the following link
https://github.com/lixianglai/LoongarchVirtFirmware
(Note: You should clone the repository using git instead of downloading the file via wget or you'll get xml)
We named the bios QEMU_EFI.fd, QEMU_VARS.fd is used to store pflash images of non-volatile
variables.After installing qemu-system-loongarch64,You can install the loongarch bios by executing the script
install-loongarch-virt-firmware.sh
Since there is no fedora operating system that supports the loongarch
architecture, you can find an iso that supports loongarch at the link
below for testing purposes:
https://github.com/fedora-remix-loongarch/releases-info
Well, if you have completed the above steps I think you can now install loongarch virtual machine,
you can install it through the virt-manager graphical interface, or install it through vrit-install,
here is an example of installing it using virt-install:
virt-install \
--virt-type=qemu \
--name loongarch-test \
--memory 4096 \
--vcpus=4 \
--arch=loongarch64 \
--boot cdrom \
--disk device=cdrom,bus=scsi,path=/root/livecd-fedora-mate-4.loongarch64.iso \
--disk path=/var/lib/libvirt/images/debian12-loongarch64.qcow2,size=10,format=qcow2,bus=scsi \
--network network=default \
--osinfo archlinux \
--video=virtio \
--graphics=vnc,listen=0.0.0.0
CHANGES
V1->V2:
1.Modify the link addresses of virtu-manager and firmeware in the cover
letter. Please obtain the code and firmware from the latest link
address.
2.Rename the bios name. Delete the loongarch bios name from libvirt
and use the json file to obtain the bios path.
3.Refer to riscv64 to simplify the implementation of loongarch cpu
driver.And fix some code style errors.
4.Delete unnecessary or redundant device enablement.Such as USB NEC.
5.Add some test cases for loongarch.
xianglai li (4):
Add loongarch cpu support
Config some capabilities for loongarch virt machine
Implement the method of getting host info for loongarch
Add test script for loongarch
src/conf/schemas/basictypes.rng | 1 +
src/cpu/cpu.c | 2 +
src/cpu/cpu_loongarch.c | 80 +
src/cpu/cpu_loongarch.h | 25 +
src/cpu/meson.build | 1 +
src/qemu/qemu_capabilities.c | 12 +-
src/qemu/qemu_domain.c | 33 +-
src/qemu/qemu_domain.h | 1 +
src/util/virarch.c | 4 +
src/util/virarch.h | 4 +
src/util/virhostcpu.c | 7 +-
src/util/virsysinfo.c | 3 +-
.../qemu_8.2.0-tcg-virt.loongarch64.xml | 163 +
.../qemu_8.2.0-virt.loongarch64.xml | 167 +
tests/domaincapstest.c | 13 +
.../caps_8.2.0_loongarch64.replies | 30140 ++++++++++++++++
.../caps_8.2.0_loongarch64.xml | 175 +
.../qemucaps2xmloutdata/caps.loongarch64.xml | 28 +
...o-type-loongarch64.loongarch64-latest.args | 34 +
.../default-video-type-loongarch64.xml | 18 +
...ch64-virt-graphics.loongarch64-latest.args | 56 +
.../loongarch64-virt-graphics.xml | 48 +
...ch64-virt-headless.loongarch64-latest.args | 52 +
.../loongarch64-virt-headless.xml | 42 +
...ongarch64-virt-pci.loongarch64-latest.args | 39 +
.../qemuxml2argvdata/loongarch64-virt-pci.xml | 27 +
.../loongarch64-virt.loongarch64-latest.args | 44 +
tests/qemuxml2argvdata/loongarch64-virt.xml | 22 +
tests/qemuxml2argvtest.c | 9 +
...eo-type-loongarch64.loongarch64-latest.xml | 45 +
...rch64-virt-graphics.loongarch64-latest.xml | 114 +
...rch64-virt-headless.loongarch64-latest.xml | 100 +
...oongarch64-virt-pci.loongarch64-latest.xml | 48 +
.../loongarch64-virt.loongarch64-latest.xml | 66 +
tests/qemuxml2xmltest.c | 6 +
tests/testutilshostcpus.h | 10 +
36 files changed, 31633 insertions(+), 6 deletions(-)
create mode 100644 src/cpu/cpu_loongarch.c
create mode 100644 src/cpu/cpu_loongarch.h
create mode 100644 tests/domaincapsdata/qemu_8.2.0-tcg-virt.loongarch64.xml
create mode 100644 tests/domaincapsdata/qemu_8.2.0-virt.loongarch64.xml
create mode 100644 tests/qemucapabilitiesdata/caps_8.2.0_loongarch64.replies
create mode 100644 tests/qemucapabilitiesdata/caps_8.2.0_loongarch64.xml
create mode 100644 tests/qemucaps2xmloutdata/caps.loongarch64.xml
create mode 100644 tests/qemuxml2argvdata/default-video-type-loongarch64.loongarch64-latest.args
create mode 100644 tests/qemuxml2argvdata/default-video-type-loongarch64.xml
create mode 100644 tests/qemuxml2argvdata/loongarch64-virt-graphics.loongarch64-latest.args
create mode 100644 tests/qemuxml2argvdata/loongarch64-virt-graphics.xml
create mode 100644 tests/qemuxml2argvdata/loongarch64-virt-headless.loongarch64-latest.args
create mode 100644 tests/qemuxml2argvdata/loongarch64-virt-headless.xml
create mode 100644 tests/qemuxml2argvdata/loongarch64-virt-pci.loongarch64-latest.args
create mode 100644 tests/qemuxml2argvdata/loongarch64-virt-pci.xml
create mode 100644 tests/qemuxml2argvdata/loongarch64-virt.loongarch64-latest.args
create mode 100644 tests/qemuxml2argvdata/loongarch64-virt.xml
create mode 100644 tests/qemuxml2xmloutdata/default-video-type-loongarch64.loongarch64-latest.xml
create mode 100644 tests/qemuxml2xmloutdata/loongarch64-virt-graphics.loongarch64-latest.xml
create mode 100644 tests/qemuxml2xmloutdata/loongarch64-virt-headless.loongarch64-latest.xml
create mode 100644 tests/qemuxml2xmloutdata/loongarch64-virt-pci.loongarch64-latest.xml
create mode 100644 tests/qemuxml2xmloutdata/loongarch64-virt.loongarch64-latest.xml
--
2.39.1
10 months, 3 weeks
[PATCH 00/33] qemu: Improve handling of architecture-specific defaults
by Andrea Bolognani
This is a significantly expanded upon follow up to [1], and
specifically the last 5 patches in that series.
While looking at implementing the improvements suggested by Peter, I
realized that there were many additional areas in which our handling
of defaults was suboptimal, with the relevant code scattered all over
the place and sometimes duplicated. So I set out to rationalize
things.
I ended up changing very little in terms of observable behavior
outside of RISC-V, where I feel that we still have leeway to make
things right before it reaches significant adoption and backwards
compatibility becomes a major concern.
[1] https://lists.libvirt.org/archives/list/devel@lists.libvirt.org/thread/MR...
Andrea Bolognani (33):
tests: Add usb-controller-automatic-unavailable-q35
tests: Add aarch64-panic-no-model
tests: Add title-and-description
tests: Drop existing <title> and <description> tags
tests: Rename and minimize no-memory
tests: Add minimal cases for many architectures
tests: Drop minimal
tests: Add default-models cases for many architectures
qemu: Fix a few comments
qemu: Default to no USB and no memballoon for new architectures
qemu: Clean up qemuDomainDefaultNetModel()
qemu: Drop qemuDomainFindSCSIControllerModel()
qemu: Drop qemuDomainSetSCSIControllerModel()
qemu: Add missing error handling
qemu: Simplify qemuDomainFindOrCreateSCSIDiskController()
qemu: Move qemuDomainGetSCSIControllerModel()
qemu: Rename qemuDomainDefaultSCSIControllerModel()
qemu: Clean up qemuDomainDefaultSCSIControllerModel()
qemu: Add qemuDomainDefaultUSBControllerModel()
qemu: Enhance qemuDomainDefaultUSBControllerModel()
qemu: Clean up qemuDomainDefaultUSBControllerModel()
qemu: Move qemuDomainForbidLegacyUSBController()
qemu: Enhance qemuDomainForbidLegacyUSBController()
qemu: Add qemuDomainDefaultSerialType()
qemu: Add qemuDomainDefaultSerialModel()
qemu: Add qemuDomainDefaultPanicModel()
qemu: Use qemuDomainDefaultPanicModel() more
qemu: Rename qemuDomainDefaultVideoModel()
qemu: Move qemuDomainDefault*() functions together
qemu: Only default to <panic model='isa'/> on x86
qemu: Don't add memballoon by default on RISC-V
qemu: Use qemu-xhci by default on RISC-V
qemu: Use virtio-scsi by default on RISC-V
src/qemu/qemu_alias.c | 13 +-
src/qemu/qemu_command.c | 23 +-
src/qemu/qemu_domain.c | 588 ++++++++++++------
src/qemu/qemu_domain.h | 4 +
src/qemu/qemu_domain_address.c | 87 ---
src/qemu/qemu_domain_address.h | 11 -
src/qemu/qemu_hotplug.c | 13 +-
src/qemu/qemu_validate.c | 9 +-
tests/qemuxmlconfdata/440fx-wrong-root.xml | 5 -
.../aarch64-panic-no-model.aarch64-latest.err | 1 +
.../aarch64-panic-no-model.xml | 13 +
...64-virt-default-models.aarch64-latest.args | 44 ++
...h64-virt-default-models.aarch64-latest.xml | 79 +++
.../aarch64-virt-default-models.xml | 21 +
.../aarch64-virt-minimal.aarch64-latest.args | 31 +
.../aarch64-virt-minimal.aarch64-latest.xml | 26 +
.../qemuxmlconfdata/aarch64-virt-minimal.xml | 12 +
.../cpu-host-model-features.x86_64-latest.xml | 5 -
.../cpu-host-model-features.xml | 5 -
...ost-passthrough-features.x86_64-latest.xml | 5 -
.../cpu-host-passthrough-features.xml | 5 -
.../cpu-tsc-frequency.x86_64-latest.xml | 5 -
tests/qemuxmlconfdata/cpu-tsc-frequency.xml | 5 -
.../disk-cdrom-bus-other.x86_64-latest.xml | 1 -
.../qemuxmlconfdata/disk-cdrom-bus-other.xml | 1 -
tests/qemuxmlconfdata/minimal-no-memory.xml | 25 -
.../minimal.x86_64-latest.args | 36 --
tests/qemuxmlconfdata/minimal.xml | 34 -
tests/qemuxmlconfdata/missing-machine.xml | 1 -
...latest.err => no-memory.x86_64-latest.err} | 0
tests/qemuxmlconfdata/no-memory.xml | 11 +
...4-pseries-default-models.ppc64-latest.args | 38 ++
...64-pseries-default-models.ppc64-latest.xml | 53 ++
.../ppc64-pseries-default-models.xml | 21 +
.../ppc64-pseries-minimal.ppc64-latest.args | 33 +
.../ppc64-pseries-minimal.ppc64-latest.xml | 33 +
.../qemuxmlconfdata/ppc64-pseries-minimal.xml | 12 +
...64-virt-default-models.riscv64-latest.args | 42 ++
...v64-virt-default-models.riscv64-latest.xml | 69 ++
.../riscv64-virt-default-models.xml | 21 +
.../riscv64-virt-minimal.riscv64-latest.args | 30 +
.../riscv64-virt-minimal.riscv64-latest.xml | 20 +
.../qemuxmlconfdata/riscv64-virt-minimal.xml | 12 +
...s390x-ccw-default-models.s390x-latest.args | 37 ++
.../s390x-ccw-default-models.s390x-latest.xml | 46 ++
.../s390x-ccw-default-models.xml | 21 +
.../s390x-ccw-minimal.s390x-latest.args | 32 +
.../s390x-ccw-minimal.s390x-latest.xml | 27 +
tests/qemuxmlconfdata/s390x-ccw-minimal.xml | 12 +
.../title-and-description.x86_64-latest.args | 31 +
...> title-and-description.x86_64-latest.xml} | 20 +-
.../qemuxmlconfdata/title-and-description.xml | 19 +
...tomatic-unavailable-q35.x86_64-latest.args | 33 +
...utomatic-unavailable-q35.x86_64-latest.xml | 30 +
...b-controller-automatic-unavailable-q35.xml | 20 +
...86_64-pc-default-models.x86_64-latest.args | 39 ++
...x86_64-pc-default-models.x86_64-latest.xml | 50 ++
.../x86_64-pc-default-models.xml | 21 +
.../x86_64-pc-minimal.x86_64-latest.args | 33 +
...ml => x86_64-pc-minimal.x86_64-latest.xml} | 24 +-
tests/qemuxmlconfdata/x86_64-pc-minimal.xml | 12 +
...6_64-q35-default-models.x86_64-latest.args | 44 ++
...86_64-q35-default-models.x86_64-latest.xml | 68 ++
.../x86_64-q35-default-models.xml | 21 +
.../x86_64-q35-minimal.x86_64-latest.args | 38 ++
.../x86_64-q35-minimal.x86_64-latest.xml | 50 ++
tests/qemuxmlconfdata/x86_64-q35-minimal.xml | 12 +
tests/qemuxmlconftest.c | 28 +-
68 files changed, 1783 insertions(+), 488 deletions(-)
create mode 100644 tests/qemuxmlconfdata/aarch64-panic-no-model.aarch64-latest.err
create mode 100644 tests/qemuxmlconfdata/aarch64-panic-no-model.xml
create mode 100644 tests/qemuxmlconfdata/aarch64-virt-default-models.aarch64-latest.args
create mode 100644 tests/qemuxmlconfdata/aarch64-virt-default-models.aarch64-latest.xml
create mode 100644 tests/qemuxmlconfdata/aarch64-virt-default-models.xml
create mode 100644 tests/qemuxmlconfdata/aarch64-virt-minimal.aarch64-latest.args
create mode 100644 tests/qemuxmlconfdata/aarch64-virt-minimal.aarch64-latest.xml
create mode 100644 tests/qemuxmlconfdata/aarch64-virt-minimal.xml
delete mode 100644 tests/qemuxmlconfdata/minimal-no-memory.xml
delete mode 100644 tests/qemuxmlconfdata/minimal.x86_64-latest.args
delete mode 100644 tests/qemuxmlconfdata/minimal.xml
rename tests/qemuxmlconfdata/{minimal-no-memory.x86_64-latest.err => no-memory.x86_64-latest.err} (100%)
create mode 100644 tests/qemuxmlconfdata/no-memory.xml
create mode 100644 tests/qemuxmlconfdata/ppc64-pseries-default-models.ppc64-latest.args
create mode 100644 tests/qemuxmlconfdata/ppc64-pseries-default-models.ppc64-latest.xml
create mode 100644 tests/qemuxmlconfdata/ppc64-pseries-default-models.xml
create mode 100644 tests/qemuxmlconfdata/ppc64-pseries-minimal.ppc64-latest.args
create mode 100644 tests/qemuxmlconfdata/ppc64-pseries-minimal.ppc64-latest.xml
create mode 100644 tests/qemuxmlconfdata/ppc64-pseries-minimal.xml
create mode 100644 tests/qemuxmlconfdata/riscv64-virt-default-models.riscv64-latest.args
create mode 100644 tests/qemuxmlconfdata/riscv64-virt-default-models.riscv64-latest.xml
create mode 100644 tests/qemuxmlconfdata/riscv64-virt-default-models.xml
create mode 100644 tests/qemuxmlconfdata/riscv64-virt-minimal.riscv64-latest.args
create mode 100644 tests/qemuxmlconfdata/riscv64-virt-minimal.riscv64-latest.xml
create mode 100644 tests/qemuxmlconfdata/riscv64-virt-minimal.xml
create mode 100644 tests/qemuxmlconfdata/s390x-ccw-default-models.s390x-latest.args
create mode 100644 tests/qemuxmlconfdata/s390x-ccw-default-models.s390x-latest.xml
create mode 100644 tests/qemuxmlconfdata/s390x-ccw-default-models.xml
create mode 100644 tests/qemuxmlconfdata/s390x-ccw-minimal.s390x-latest.args
create mode 100644 tests/qemuxmlconfdata/s390x-ccw-minimal.s390x-latest.xml
create mode 100644 tests/qemuxmlconfdata/s390x-ccw-minimal.xml
create mode 100644 tests/qemuxmlconfdata/title-and-description.x86_64-latest.args
copy tests/qemuxmlconfdata/{440fx-wrong-root.xml => title-and-description.x86_64-latest.xml} (58%)
create mode 100644 tests/qemuxmlconfdata/title-and-description.xml
create mode 100644 tests/qemuxmlconfdata/usb-controller-automatic-unavailable-q35.x86_64-latest.args
create mode 100644 tests/qemuxmlconfdata/usb-controller-automatic-unavailable-q35.x86_64-latest.xml
create mode 100644 tests/qemuxmlconfdata/usb-controller-automatic-unavailable-q35.xml
create mode 100644 tests/qemuxmlconfdata/x86_64-pc-default-models.x86_64-latest.args
create mode 100644 tests/qemuxmlconfdata/x86_64-pc-default-models.x86_64-latest.xml
create mode 100644 tests/qemuxmlconfdata/x86_64-pc-default-models.xml
create mode 100644 tests/qemuxmlconfdata/x86_64-pc-minimal.x86_64-latest.args
rename tests/qemuxmlconfdata/{minimal.x86_64-latest.xml => x86_64-pc-minimal.x86_64-latest.xml} (52%)
create mode 100644 tests/qemuxmlconfdata/x86_64-pc-minimal.xml
create mode 100644 tests/qemuxmlconfdata/x86_64-q35-default-models.x86_64-latest.args
create mode 100644 tests/qemuxmlconfdata/x86_64-q35-default-models.x86_64-latest.xml
create mode 100644 tests/qemuxmlconfdata/x86_64-q35-default-models.xml
create mode 100644 tests/qemuxmlconfdata/x86_64-q35-minimal.x86_64-latest.args
create mode 100644 tests/qemuxmlconfdata/x86_64-q35-minimal.x86_64-latest.xml
create mode 100644 tests/qemuxmlconfdata/x86_64-q35-minimal.xml
--
2.43.0
10 months, 3 weeks
[PATCH] remote_driver: Restore special behavior of remoteDomainGetBlockIoTune()
by Michal Privoznik
In v9.10.0-rc1~103 the remote driver was switched to g_auto() for
client RPC return parameters. But whilst doing so a small bug
slipped in: previously, when virDomainGetBlockIoTune() was called
with *nparams == 0, the function set *nparams to the number of
supported params and zero was returned (so that client can
allocate memory and call the API second time). IOW - the usual,
old style of APIs where we didn't want to allocate memory on
caller's behalf. But because of this bug, a negative one is
returned instead.
Fixes: 501825011c1fe80f458820c7efe5a198e0af9be5
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
src/remote/remote_driver.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/remote/remote_driver.c b/src/remote/remote_driver.c
index 392377deae..bedf2cb833 100644
--- a/src/remote/remote_driver.c
+++ b/src/remote/remote_driver.c
@@ -2570,7 +2570,7 @@ static int remoteDomainGetBlockIoTune(virDomainPtr domain,
*/
if (*nparams == 0) {
*nparams = ret.nparams;
- return -1;
+ return 0;
}
if (virTypedParamsDeserialize((struct _virTypedParameterRemote *) ret.params.params_val,
--
2.43.0
10 months, 3 weeks
[PATCH] qemu: fix nbdkit command test for backing chains
by Jonathon Jongsma
Previously this test only tested the generated nbdkit command for the
top level disk source. Update it to test the generated commmands for all
sources in the chain.
Signed-off-by: Jonathon Jongsma <jjongsma(a)redhat.com>
---
...sk0 => disk-cdrom-network.args.disk0-src0} | 2 +-
...sk1 => disk-cdrom-network.args.disk1-src0} | 2 +-
...sk-cdrom-network.args.disk1-src0.pipe.778} | 0
...sk2 => disk-cdrom-network.args.disk2-src0} | 2 +-
...sk-cdrom-network.args.disk2-src0.pipe.780} | 0
...isk0 => disk-network-http.args.disk0-src0} | 2 +-
...isk1 => disk-network-http.args.disk1-src0} | 2 +-
...isk2 => disk-network-http.args.disk2-src0} | 2 +-
...isk-network-http.args.disk2-src0.pipe.778} | 0
...isk3 => disk-network-http.args.disk3-src0} | 2 +-
...isk-network-http.args.disk3-src0.pipe.780} | 0
...ource-curl-nbdkit-backing.args.disk0-src0} | 2 +-
...l-nbdkit-backing.args.disk0-src0.pipe.778} | 0
...source-curl-nbdkit-backing.args.disk0-src1 | 7 ++
...rl-nbdkit-backing.args.disk0-src1.pipe.780 | 1 +
... disk-network-source-curl.args.disk0-src0} | 2 +-
...work-source-curl.args.disk0-src0.pipe.778} | 0
... disk-network-source-curl.args.disk1-src0} | 2 +-
...work-source-curl.args.disk1-src0.pipe.780} | 0
...work-source-curl.args.disk1-src0.pipe.782} | 0
... disk-network-source-curl.args.disk2-src0} | 2 +-
...work-source-curl.args.disk2-src0.pipe.784} | 0
... disk-network-source-curl.args.disk3-src0} | 2 +-
... disk-network-source-curl.args.disk4-src0} | 2 +-
...0 => disk-network-ssh-key.args.disk0-src0} | 2 +-
...1 => disk-network-ssh-key.args.disk1-src0} | 2 +-
...disk-network-ssh-password.args.disk0-src0} | 2 +-
...ork-ssh-password.args.disk0-src0.pipe.778} | 0
...disk0 => disk-network-ssh.args.disk0-src0} | 2 +-
tests/qemunbdkittest.c | 96 ++++++++++---------
30 files changed, 77 insertions(+), 61 deletions(-)
rename tests/qemunbdkitdata/{disk-cdrom-network.args.disk0 => disk-cdrom-network.args.disk0-src0} (63%)
rename tests/qemunbdkitdata/{disk-cdrom-network.args.disk1 => disk-cdrom-network.args.disk1-src0} (70%)
rename tests/qemunbdkitdata/{disk-cdrom-network.args.disk1.pipe.778 => disk-cdrom-network.args.disk1-src0.pipe.778} (100%)
rename tests/qemunbdkitdata/{disk-cdrom-network.args.disk2 => disk-cdrom-network.args.disk2-src0} (72%)
rename tests/qemunbdkitdata/{disk-cdrom-network.args.disk2.pipe.780 => disk-cdrom-network.args.disk2-src0.pipe.780} (100%)
rename tests/qemunbdkitdata/{disk-network-http.args.disk0 => disk-network-http.args.disk0-src0} (64%)
rename tests/qemunbdkitdata/{disk-network-http.args.disk1 => disk-network-http.args.disk1-src0} (59%)
rename tests/qemunbdkitdata/{disk-network-http.args.disk2 => disk-network-http.args.disk2-src0} (64%)
rename tests/qemunbdkitdata/{disk-network-http.args.disk2.pipe.778 => disk-network-http.args.disk2-src0.pipe.778} (100%)
rename tests/qemunbdkitdata/{disk-network-http.args.disk3 => disk-network-http.args.disk3-src0} (70%)
rename tests/qemunbdkitdata/{disk-network-http.args.disk3.pipe.780 => disk-network-http.args.disk3-src0.pipe.780} (100%)
rename tests/qemunbdkitdata/{disk-network-source-curl-nbdkit-backing.args.disk0 => disk-network-source-curl-nbdkit-backing.args.disk0-src0} (69%)
rename tests/qemunbdkitdata/{disk-network-source-curl-nbdkit-backing.args.disk0.pipe.778 => disk-network-source-curl-nbdkit-backing.args.disk0-src0.pipe.778} (100%)
create mode 100644 tests/qemunbdkitdata/disk-network-source-curl-nbdkit-backing.args.disk0-src1
create mode 100644 tests/qemunbdkitdata/disk-network-source-curl-nbdkit-backing.args.disk0-src1.pipe.780
rename tests/qemunbdkitdata/{disk-network-source-curl.args.disk0 => disk-network-source-curl.args.disk0-src0} (69%)
rename tests/qemunbdkitdata/{disk-network-source-curl.args.disk0.pipe.778 => disk-network-source-curl.args.disk0-src0.pipe.778} (100%)
rename tests/qemunbdkitdata/{disk-network-source-curl.args.disk1 => disk-network-source-curl.args.disk1-src0} (75%)
rename tests/qemunbdkitdata/{disk-network-source-curl.args.disk1.pipe.780 => disk-network-source-curl.args.disk1-src0.pipe.780} (100%)
rename tests/qemunbdkitdata/{disk-network-source-curl.args.disk1.pipe.782 => disk-network-source-curl.args.disk1-src0.pipe.782} (100%)
rename tests/qemunbdkitdata/{disk-network-source-curl.args.disk2 => disk-network-source-curl.args.disk2-src0} (69%)
rename tests/qemunbdkitdata/{disk-network-source-curl.args.disk2.pipe.784 => disk-network-source-curl.args.disk2-src0.pipe.784} (100%)
rename tests/qemunbdkitdata/{disk-network-source-curl.args.disk3 => disk-network-source-curl.args.disk3-src0} (64%)
rename tests/qemunbdkitdata/{disk-network-source-curl.args.disk4 => disk-network-source-curl.args.disk4-src0} (65%)
rename tests/qemunbdkitdata/{disk-network-ssh-key.args.disk0 => disk-network-ssh-key.args.disk0-src0} (74%)
rename tests/qemunbdkitdata/{disk-network-ssh-key.args.disk1 => disk-network-ssh-key.args.disk1-src0} (73%)
rename tests/qemunbdkitdata/{disk-network-ssh-password.args.disk0 => disk-network-ssh-password.args.disk0-src0} (71%)
rename tests/qemunbdkitdata/{disk-network-ssh-password.args.disk0.pipe.778 => disk-network-ssh-password.args.disk0-src0.pipe.778} (100%)
rename tests/qemunbdkitdata/{disk-network-ssh.args.disk0 => disk-network-ssh.args.disk0-src0} (66%)
diff --git a/tests/qemunbdkitdata/disk-cdrom-network.args.disk0 b/tests/qemunbdkitdata/disk-cdrom-network.args.disk0-src0
similarity index 63%
rename from tests/qemunbdkitdata/disk-cdrom-network.args.disk0
rename to tests/qemunbdkitdata/disk-cdrom-network.args.disk0-src0
index b2f3be4cba..cec0c758cd 100644
--- a/tests/qemunbdkitdata/disk-cdrom-network.args.disk0
+++ b/tests/qemunbdkitdata/disk-cdrom-network.args.disk0-src0
@@ -1,5 +1,5 @@
nbdkit \
---unix /tmp/statedir-0/nbdkit-test-disk-0.socket \
+--unix /tmp/domain-QEMUGuest1/nbdkit-disk0-src0.socket \
--foreground \
--readonly curl \
protocols=ftp \
diff --git a/tests/qemunbdkitdata/disk-cdrom-network.args.disk1 b/tests/qemunbdkitdata/disk-cdrom-network.args.disk1-src0
similarity index 70%
rename from tests/qemunbdkitdata/disk-cdrom-network.args.disk1
rename to tests/qemunbdkitdata/disk-cdrom-network.args.disk1-src0
index a23f6573d6..62368ac3e6 100644
--- a/tests/qemunbdkitdata/disk-cdrom-network.args.disk1
+++ b/tests/qemunbdkitdata/disk-cdrom-network.args.disk1-src0
@@ -1,5 +1,5 @@
nbdkit \
---unix /tmp/statedir-1/nbdkit-test-disk-1.socket \
+--unix /tmp/domain-QEMUGuest1/nbdkit-disk1-src0.socket \
--foreground \
--readonly curl \
protocols=ftps \
diff --git a/tests/qemunbdkitdata/disk-cdrom-network.args.disk1.pipe.778 b/tests/qemunbdkitdata/disk-cdrom-network.args.disk1-src0.pipe.778
similarity index 100%
rename from tests/qemunbdkitdata/disk-cdrom-network.args.disk1.pipe.778
rename to tests/qemunbdkitdata/disk-cdrom-network.args.disk1-src0.pipe.778
diff --git a/tests/qemunbdkitdata/disk-cdrom-network.args.disk2 b/tests/qemunbdkitdata/disk-cdrom-network.args.disk2-src0
similarity index 72%
rename from tests/qemunbdkitdata/disk-cdrom-network.args.disk2
rename to tests/qemunbdkitdata/disk-cdrom-network.args.disk2-src0
index 04e918609a..70bfa39252 100644
--- a/tests/qemunbdkitdata/disk-cdrom-network.args.disk2
+++ b/tests/qemunbdkitdata/disk-cdrom-network.args.disk2-src0
@@ -1,5 +1,5 @@
nbdkit \
---unix /tmp/statedir-2/nbdkit-test-disk-2.socket \
+--unix /tmp/domain-QEMUGuest1/nbdkit-disk2-src0.socket \
--foreground \
--readonly curl \
protocols=https \
diff --git a/tests/qemunbdkitdata/disk-cdrom-network.args.disk2.pipe.780 b/tests/qemunbdkitdata/disk-cdrom-network.args.disk2-src0.pipe.780
similarity index 100%
rename from tests/qemunbdkitdata/disk-cdrom-network.args.disk2.pipe.780
rename to tests/qemunbdkitdata/disk-cdrom-network.args.disk2-src0.pipe.780
diff --git a/tests/qemunbdkitdata/disk-network-http.args.disk0 b/tests/qemunbdkitdata/disk-network-http.args.disk0-src0
similarity index 64%
rename from tests/qemunbdkitdata/disk-network-http.args.disk0
rename to tests/qemunbdkitdata/disk-network-http.args.disk0-src0
index 8316f353cb..a850610593 100644
--- a/tests/qemunbdkitdata/disk-network-http.args.disk0
+++ b/tests/qemunbdkitdata/disk-network-http.args.disk0-src0
@@ -1,5 +1,5 @@
nbdkit \
---unix /tmp/statedir-0/nbdkit-test-disk-0.socket \
+--unix /tmp/domain-QEMUGuest1/nbdkit-disk0-src0.socket \
--foreground curl \
protocols=http,https \
url=http://example.org:80/test.img \
diff --git a/tests/qemunbdkitdata/disk-network-http.args.disk1 b/tests/qemunbdkitdata/disk-network-http.args.disk1-src0
similarity index 59%
rename from tests/qemunbdkitdata/disk-network-http.args.disk1
rename to tests/qemunbdkitdata/disk-network-http.args.disk1-src0
index a546a68b27..0864840e41 100644
--- a/tests/qemunbdkitdata/disk-network-http.args.disk1
+++ b/tests/qemunbdkitdata/disk-network-http.args.disk1-src0
@@ -1,5 +1,5 @@
nbdkit \
---unix /tmp/statedir-1/nbdkit-test-disk-1.socket \
+--unix /tmp/domain-QEMUGuest1/nbdkit-disk1-src0.socket \
--foreground curl \
protocols=https \
url=https://example.org:443/test2.img
diff --git a/tests/qemunbdkitdata/disk-network-http.args.disk2 b/tests/qemunbdkitdata/disk-network-http.args.disk2-src0
similarity index 64%
rename from tests/qemunbdkitdata/disk-network-http.args.disk2
rename to tests/qemunbdkitdata/disk-network-http.args.disk2-src0
index 1004547b3a..359767f20c 100644
--- a/tests/qemunbdkitdata/disk-network-http.args.disk2
+++ b/tests/qemunbdkitdata/disk-network-http.args.disk2-src0
@@ -1,5 +1,5 @@
nbdkit \
---unix /tmp/statedir-2/nbdkit-test-disk-2.socket \
+--unix /tmp/domain-QEMUGuest1/nbdkit-disk2-src0.socket \
--foreground curl \
protocols=http,https \
url=http://example.org:1234/test3.img \
diff --git a/tests/qemunbdkitdata/disk-network-http.args.disk2.pipe.778 b/tests/qemunbdkitdata/disk-network-http.args.disk2-src0.pipe.778
similarity index 100%
rename from tests/qemunbdkitdata/disk-network-http.args.disk2.pipe.778
rename to tests/qemunbdkitdata/disk-network-http.args.disk2-src0.pipe.778
diff --git a/tests/qemunbdkitdata/disk-network-http.args.disk3 b/tests/qemunbdkitdata/disk-network-http.args.disk3-src0
similarity index 70%
rename from tests/qemunbdkitdata/disk-network-http.args.disk3
rename to tests/qemunbdkitdata/disk-network-http.args.disk3-src0
index e3c357b89a..6f2fa96b63 100644
--- a/tests/qemunbdkitdata/disk-network-http.args.disk3
+++ b/tests/qemunbdkitdata/disk-network-http.args.disk3-src0
@@ -1,5 +1,5 @@
nbdkit \
---unix /tmp/statedir-3/nbdkit-test-disk-3.socket \
+--unix /tmp/domain-QEMUGuest1/nbdkit-disk3-src0.socket \
--foreground curl \
protocols=https \
'url=https://example.org:1234/test4.img?par=val&other=ble' \
diff --git a/tests/qemunbdkitdata/disk-network-http.args.disk3.pipe.780 b/tests/qemunbdkitdata/disk-network-http.args.disk3-src0.pipe.780
similarity index 100%
rename from tests/qemunbdkitdata/disk-network-http.args.disk3.pipe.780
rename to tests/qemunbdkitdata/disk-network-http.args.disk3-src0.pipe.780
diff --git a/tests/qemunbdkitdata/disk-network-source-curl-nbdkit-backing.args.disk0 b/tests/qemunbdkitdata/disk-network-source-curl-nbdkit-backing.args.disk0-src0
similarity index 69%
rename from tests/qemunbdkitdata/disk-network-source-curl-nbdkit-backing.args.disk0
rename to tests/qemunbdkitdata/disk-network-source-curl-nbdkit-backing.args.disk0-src0
index 605354433b..ea54fb56d0 100644
--- a/tests/qemunbdkitdata/disk-network-source-curl-nbdkit-backing.args.disk0
+++ b/tests/qemunbdkitdata/disk-network-source-curl-nbdkit-backing.args.disk0-src0
@@ -1,5 +1,5 @@
nbdkit \
---unix /tmp/statedir-0/nbdkit-test-disk-0.socket \
+--unix /tmp/domain-QEMUGuest1/nbdkit-disk0-src0.socket \
--foreground \
--readonly curl \
protocols=https \
diff --git a/tests/qemunbdkitdata/disk-network-source-curl-nbdkit-backing.args.disk0.pipe.778 b/tests/qemunbdkitdata/disk-network-source-curl-nbdkit-backing.args.disk0-src0.pipe.778
similarity index 100%
rename from tests/qemunbdkitdata/disk-network-source-curl-nbdkit-backing.args.disk0.pipe.778
rename to tests/qemunbdkitdata/disk-network-source-curl-nbdkit-backing.args.disk0-src0.pipe.778
diff --git a/tests/qemunbdkitdata/disk-network-source-curl-nbdkit-backing.args.disk0-src1 b/tests/qemunbdkitdata/disk-network-source-curl-nbdkit-backing.args.disk0-src1
new file mode 100644
index 0000000000..f9e2d8b86f
--- /dev/null
+++ b/tests/qemunbdkitdata/disk-network-source-curl-nbdkit-backing.args.disk0-src1
@@ -0,0 +1,7 @@
+nbdkit \
+--unix /tmp/domain-QEMUGuest1/nbdkit-disk0-src1.socket \
+--foreground \
+--readonly curl \
+protocols=https \
+url=https://https.example2.org:8444/path/to/backing.qcow2 \
+cookie=-779
diff --git a/tests/qemunbdkitdata/disk-network-source-curl-nbdkit-backing.args.disk0-src1.pipe.780 b/tests/qemunbdkitdata/disk-network-source-curl-nbdkit-backing.args.disk0-src1.pipe.780
new file mode 100644
index 0000000000..0aafdfb733
--- /dev/null
+++ b/tests/qemunbdkitdata/disk-network-source-curl-nbdkit-backing.args.disk0-src1.pipe.780
@@ -0,0 +1 @@
+cookie3=cookievalue3; cookie4=cookievalue4
diff --git a/tests/qemunbdkitdata/disk-network-source-curl.args.disk0 b/tests/qemunbdkitdata/disk-network-source-curl.args.disk0-src0
similarity index 69%
rename from tests/qemunbdkitdata/disk-network-source-curl.args.disk0
rename to tests/qemunbdkitdata/disk-network-source-curl.args.disk0-src0
index 948dbfbe5a..ff3b06760d 100644
--- a/tests/qemunbdkitdata/disk-network-source-curl.args.disk0
+++ b/tests/qemunbdkitdata/disk-network-source-curl.args.disk0-src0
@@ -1,5 +1,5 @@
nbdkit \
---unix /tmp/statedir-0/nbdkit-test-disk-0.socket \
+--unix /tmp/domain-QEMUGuest1/nbdkit-disk0-src0.socket \
--foreground \
--readonly curl \
protocols=https \
diff --git a/tests/qemunbdkitdata/disk-network-source-curl.args.disk0.pipe.778 b/tests/qemunbdkitdata/disk-network-source-curl.args.disk0-src0.pipe.778
similarity index 100%
rename from tests/qemunbdkitdata/disk-network-source-curl.args.disk0.pipe.778
rename to tests/qemunbdkitdata/disk-network-source-curl.args.disk0-src0.pipe.778
diff --git a/tests/qemunbdkitdata/disk-network-source-curl.args.disk1 b/tests/qemunbdkitdata/disk-network-source-curl.args.disk1-src0
similarity index 75%
rename from tests/qemunbdkitdata/disk-network-source-curl.args.disk1
rename to tests/qemunbdkitdata/disk-network-source-curl.args.disk1-src0
index d1288dd242..972b07b0e2 100644
--- a/tests/qemunbdkitdata/disk-network-source-curl.args.disk1
+++ b/tests/qemunbdkitdata/disk-network-source-curl.args.disk1-src0
@@ -1,5 +1,5 @@
nbdkit \
---unix /tmp/statedir-1/nbdkit-test-disk-1.socket \
+--unix /tmp/domain-QEMUGuest1/nbdkit-disk1-src0.socket \
--foreground curl \
protocols=https \
'url=https://https.example.org:8443/path/to/disk5.iso?foo=bar' \
diff --git a/tests/qemunbdkitdata/disk-network-source-curl.args.disk1.pipe.780 b/tests/qemunbdkitdata/disk-network-source-curl.args.disk1-src0.pipe.780
similarity index 100%
rename from tests/qemunbdkitdata/disk-network-source-curl.args.disk1.pipe.780
rename to tests/qemunbdkitdata/disk-network-source-curl.args.disk1-src0.pipe.780
diff --git a/tests/qemunbdkitdata/disk-network-source-curl.args.disk1.pipe.782 b/tests/qemunbdkitdata/disk-network-source-curl.args.disk1-src0.pipe.782
similarity index 100%
rename from tests/qemunbdkitdata/disk-network-source-curl.args.disk1.pipe.782
rename to tests/qemunbdkitdata/disk-network-source-curl.args.disk1-src0.pipe.782
diff --git a/tests/qemunbdkitdata/disk-network-source-curl.args.disk2 b/tests/qemunbdkitdata/disk-network-source-curl.args.disk2-src0
similarity index 69%
rename from tests/qemunbdkitdata/disk-network-source-curl.args.disk2
rename to tests/qemunbdkitdata/disk-network-source-curl.args.disk2-src0
index f1d0e1929e..6cfa70ad36 100644
--- a/tests/qemunbdkitdata/disk-network-source-curl.args.disk2
+++ b/tests/qemunbdkitdata/disk-network-source-curl.args.disk2-src0
@@ -1,5 +1,5 @@
nbdkit \
---unix /tmp/statedir-2/nbdkit-test-disk-2.socket \
+--unix /tmp/domain-QEMUGuest1/nbdkit-disk2-src0.socket \
--foreground \
--readonly curl \
protocols=http,https \
diff --git a/tests/qemunbdkitdata/disk-network-source-curl.args.disk2.pipe.784 b/tests/qemunbdkitdata/disk-network-source-curl.args.disk2-src0.pipe.784
similarity index 100%
rename from tests/qemunbdkitdata/disk-network-source-curl.args.disk2.pipe.784
rename to tests/qemunbdkitdata/disk-network-source-curl.args.disk2-src0.pipe.784
diff --git a/tests/qemunbdkitdata/disk-network-source-curl.args.disk3 b/tests/qemunbdkitdata/disk-network-source-curl.args.disk3-src0
similarity index 64%
rename from tests/qemunbdkitdata/disk-network-source-curl.args.disk3
rename to tests/qemunbdkitdata/disk-network-source-curl.args.disk3-src0
index f517baa948..2377d2e41b 100644
--- a/tests/qemunbdkitdata/disk-network-source-curl.args.disk3
+++ b/tests/qemunbdkitdata/disk-network-source-curl.args.disk3-src0
@@ -1,5 +1,5 @@
nbdkit \
---unix /tmp/statedir-3/nbdkit-test-disk-3.socket \
+--unix /tmp/domain-QEMUGuest1/nbdkit-disk3-src0.socket \
--foreground \
--readonly curl \
protocols=ftp \
diff --git a/tests/qemunbdkitdata/disk-network-source-curl.args.disk4 b/tests/qemunbdkitdata/disk-network-source-curl.args.disk4-src0
similarity index 65%
rename from tests/qemunbdkitdata/disk-network-source-curl.args.disk4
rename to tests/qemunbdkitdata/disk-network-source-curl.args.disk4-src0
index 1df47a9d54..584c30bee9 100644
--- a/tests/qemunbdkitdata/disk-network-source-curl.args.disk4
+++ b/tests/qemunbdkitdata/disk-network-source-curl.args.disk4-src0
@@ -1,5 +1,5 @@
nbdkit \
---unix /tmp/statedir-4/nbdkit-test-disk-4.socket \
+--unix /tmp/domain-QEMUGuest1/nbdkit-disk4-src0.socket \
--foreground \
--readonly curl \
protocols=ftps \
diff --git a/tests/qemunbdkitdata/disk-network-ssh-key.args.disk0 b/tests/qemunbdkitdata/disk-network-ssh-key.args.disk0-src0
similarity index 74%
rename from tests/qemunbdkitdata/disk-network-ssh-key.args.disk0
rename to tests/qemunbdkitdata/disk-network-ssh-key.args.disk0-src0
index f627700490..e16f2ca0c4 100644
--- a/tests/qemunbdkitdata/disk-network-ssh-key.args.disk0
+++ b/tests/qemunbdkitdata/disk-network-ssh-key.args.disk0-src0
@@ -1,6 +1,6 @@
SSH_AUTH_SOCK=/path/to/agent/socket \
nbdkit \
---unix /tmp/statedir-0/nbdkit-test-disk-0.socket \
+--unix /tmp/domain-QEMUGuest1/nbdkit-disk0-src0.socket \
--foreground ssh \
host=example.org \
port=2222 \
diff --git a/tests/qemunbdkitdata/disk-network-ssh-key.args.disk1 b/tests/qemunbdkitdata/disk-network-ssh-key.args.disk1-src0
similarity index 73%
rename from tests/qemunbdkitdata/disk-network-ssh-key.args.disk1
rename to tests/qemunbdkitdata/disk-network-ssh-key.args.disk1-src0
index 80df9c30c6..fbac8313d7 100644
--- a/tests/qemunbdkitdata/disk-network-ssh-key.args.disk1
+++ b/tests/qemunbdkitdata/disk-network-ssh-key.args.disk1-src0
@@ -1,5 +1,5 @@
nbdkit \
---unix /tmp/statedir-1/nbdkit-test-disk-1.socket \
+--unix /tmp/domain-QEMUGuest1/nbdkit-disk1-src0.socket \
--foreground ssh \
host=example.org \
port=2222 \
diff --git a/tests/qemunbdkitdata/disk-network-ssh-password.args.disk0 b/tests/qemunbdkitdata/disk-network-ssh-password.args.disk0-src0
similarity index 71%
rename from tests/qemunbdkitdata/disk-network-ssh-password.args.disk0
rename to tests/qemunbdkitdata/disk-network-ssh-password.args.disk0-src0
index ee2d7c3343..0da07e19f4 100644
--- a/tests/qemunbdkitdata/disk-network-ssh-password.args.disk0
+++ b/tests/qemunbdkitdata/disk-network-ssh-password.args.disk0-src0
@@ -1,5 +1,5 @@
nbdkit \
---unix /tmp/statedir-0/nbdkit-test-disk-0.socket \
+--unix /tmp/domain-QEMUGuest1/nbdkit-disk0-src0.socket \
--foreground ssh \
host=example.org \
port=2222 \
diff --git a/tests/qemunbdkitdata/disk-network-ssh-password.args.disk0.pipe.778 b/tests/qemunbdkitdata/disk-network-ssh-password.args.disk0-src0.pipe.778
similarity index 100%
rename from tests/qemunbdkitdata/disk-network-ssh-password.args.disk0.pipe.778
rename to tests/qemunbdkitdata/disk-network-ssh-password.args.disk0-src0.pipe.778
diff --git a/tests/qemunbdkitdata/disk-network-ssh.args.disk0 b/tests/qemunbdkitdata/disk-network-ssh.args.disk0-src0
similarity index 66%
rename from tests/qemunbdkitdata/disk-network-ssh.args.disk0
rename to tests/qemunbdkitdata/disk-network-ssh.args.disk0-src0
index 481b218936..2c8f54d5ce 100644
--- a/tests/qemunbdkitdata/disk-network-ssh.args.disk0
+++ b/tests/qemunbdkitdata/disk-network-ssh.args.disk0-src0
@@ -1,5 +1,5 @@
nbdkit \
---unix /tmp/statedir-0/nbdkit-test-disk-0.socket \
+--unix /tmp/domain-QEMUGuest1/nbdkit-disk0-src0.socket \
--foreground ssh \
host=example.org \
port=2222 \
diff --git a/tests/qemunbdkittest.c b/tests/qemunbdkittest.c
index 3f6bd09616..d0332a8e9f 100644
--- a/tests/qemunbdkittest.c
+++ b/tests/qemunbdkittest.c
@@ -174,7 +174,10 @@ testNbdkit(const void *data)
const TestInfo *info = data;
g_autoptr(virDomainDef) def = NULL;
size_t i;
+ size_t n;
int ret = 0;
+ virStorageSource *backing = NULL;
+ g_autofree char *statedir = NULL;
/* restart mock pipe fds so tests are consistent */
mockpipefd = PIPE_FD_START;
@@ -189,56 +192,61 @@ testNbdkit(const void *data)
VIR_DOMAIN_DEF_PARSE_SKIP_VALIDATE)))
return -1;
+ statedir = g_strdup_printf("/tmp/domain-%s", def->name);
for (i = 0; i < def->ndisks; i++) {
virDomainDiskDef *disk = def->disks[i];
- g_autofree char *statedir = g_strdup_printf("/tmp/statedir-%zi", i);
- g_autofree char *alias = g_strdup_printf("test-disk-%zi", i);
- g_autofree char *cmdfile = g_strdup_printf("%s.args.disk%zi",
- info->outtemplate, i);
-
- if (qemuNbdkitInitStorageSource(info->nbdkitcaps, disk->src, statedir,
- alias, 101, 101)) {
- qemuDomainStorageSourcePrivate *srcPriv =
- qemuDomainStorageSourcePrivateFetch(disk->src);
- g_autoptr(virCommand) cmd = NULL;
- g_autoptr(virCommandDryRunToken) dryRunToken = virCommandDryRunTokenNew();
- g_auto(virBuffer) buf = VIR_BUFFER_INITIALIZER;
- g_autofree char *actualCmdline = NULL;
- virCommandSendBuffer *sendbuffers;
- int nsendbuffers;
- size_t j;
-
- virCommandSetDryRun(dryRunToken, &buf, true, true, NULL, NULL);
- cmd = qemuNbdkitProcessBuildCommand(srcPriv->nbdkitProcess);
-
- if (virCommandRun(cmd, NULL) < 0) {
- ret = -1;
- continue;
- }
- virCommandPeekSendBuffers(cmd, &sendbuffers, &nsendbuffers);
-
- if (!(actualCmdline = virBufferContentAndReset(&buf))) {
- ret = -1;
- continue;
- }
+ for (n = 0, backing = disk->src; backing != NULL; n++, backing = backing->backingStore) {
+ g_autofree char *alias = g_strdup_printf("disk%zi-src%zi", i, n);
+ g_autofree char *cmdfile = g_strdup_printf("%s.args.%s",
+ info->outtemplate, alias);
+
+ if (qemuNbdkitInitStorageSource(info->nbdkitcaps, backing, statedir,
+ alias, 101, 101)) {
+ qemuDomainStorageSourcePrivate *srcPriv =
+ qemuDomainStorageSourcePrivateFetch(backing);
+ g_autoptr(virCommand) cmd = NULL;
+ g_autoptr(virCommandDryRunToken) dryRunToken = virCommandDryRunTokenNew();
+ g_auto(virBuffer) buf = VIR_BUFFER_INITIALIZER;
+ g_autofree char *actualCmdline = NULL;
+ virCommandSendBuffer *sendbuffers;
+ int nsendbuffers;
+ size_t j;
+
+ if (srcPriv->nbdkitProcess == NULL)
+ continue;
+
+ virCommandSetDryRun(dryRunToken, &buf, true, true, NULL, NULL);
+ cmd = qemuNbdkitProcessBuildCommand(srcPriv->nbdkitProcess);
+
+ if (virCommandRun(cmd, NULL) < 0) {
+ ret = -1;
+ continue;
+ }
+ virCommandPeekSendBuffers(cmd, &sendbuffers, &nsendbuffers);
- if (virTestCompareToFileFull(actualCmdline, cmdfile, false) < 0)
- ret = -1;
+ if (!(actualCmdline = virBufferContentAndReset(&buf))) {
+ ret = -1;
+ continue;
+ }
- for (j = 0; j < nsendbuffers; j++) {
- virCommandSendBuffer *buffer = &sendbuffers[j];
- g_autofree char *pipefile = g_strdup_printf("%s.pipe.%i",
- cmdfile,
- buffer->fd);
+ if (virTestCompareToFileFull(actualCmdline, cmdfile, false) < 0)
+ ret = -1;
- if (virTestCompareToFile((const char*)buffer->buffer, pipefile) < 0)
+ for (j = 0; j < nsendbuffers; j++) {
+ virCommandSendBuffer *buffer = &sendbuffers[j];
+ g_autofree char *pipefile = g_strdup_printf("%s.pipe.%i",
+ cmdfile,
+ buffer->fd);
+
+ if (virTestCompareToFile((const char*)buffer->buffer, pipefile) < 0)
+ ret = -1;
+ }
+ } else {
+ if (virFileExists(cmdfile)) {
+ virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
+ "qemuNbdkitInitStorageSource() was not expected to fail");
ret = -1;
- }
- } else {
- if (virFileExists(cmdfile)) {
- virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
- "qemuNbdkitInitStorageSource() was not expected to fail");
- ret = -1;
+ }
}
}
}
--
2.43.0
10 months, 3 weeks
[PATCH 0/3] tests: Improve ABI_UPDATE macros
by Andrea Bolognani
Andrea Bolognani (3):
tests: Drop ppc64-usb-controller-legacy
tests: Use ABI_UPDATE macros more
tests: Improve ABI_UPDATE macros
...fi-aarch64.aarch64-latest.abi-update.args} | 0
...efi-aarch64.aarch64-latest.abi-update.xml} | 0
.../firmware-auto-efi-abi-update-aarch64.xml | 1 -
.../firmware-auto-efi-abi-update.xml | 1 -
...-auto-efi-format-loader-raw-abi-update.xml | 1 -
...loader-raw.aarch64-latest.abi-update.args} | 0
...-loader-raw.aarch64-latest.abi-update.xml} | 0
...ware-auto-efi-loader-secure-abi-update.xml | 1 -
...ader-secure.x86_64-latest.abi-update.args} | 0
...oader-secure.x86_64-latest.abi-update.xml} | 0
.../firmware-auto-efi-rw-abi-update.xml | 1 -
...-auto-efi-rw.x86_64-latest.abi-update.err} | 0
...re-auto-efi.x86_64-latest.abi-update.args} | 0
...are-auto-efi.x86_64-latest.abi-update.xml} | 0
...efi-features.x86_64-latest.abi-update.err} | 0
...memory-hotplug-nvdimm-ppc64-abi-update.xml | 1 -
...nvdimm-ppc64.ppc64-latest.abi-update.args} | 0
...-nvdimm-ppc64.ppc64-latest.abi-update.xml} | 0
...memory-hotplug-ppc64-nonuma-abi-update.xml | 1 -
...ppc64-nonuma.ppc64-latest.abi-update.args} | 0
...-ppc64-nonuma.ppc64-latest.abi-update.xml} | 0
...64-usb-controller-legacy.ppc64-latest.args | 33 -------------
...c64-usb-controller-legacy.ppc64-latest.xml | 38 ---------------
.../ppc64-usb-controller-legacy.xml | 1 -
.../ppc64-usb-controller-qemu-xhci.xml | 1 -
...b-controller.ppc64-latest.abi-update.args} | 0
...sb-controller.ppc64-latest.abi-update.xml} | 0
tests/qemuxmlconftest.c | 48 ++++++++++---------
28 files changed, 26 insertions(+), 102 deletions(-)
rename tests/qemuxmlconfdata/{firmware-auto-efi-abi-update-aarch64.aarch64-latest.args => firmware-auto-efi-aarch64.aarch64-latest.abi-update.args} (100%)
rename tests/qemuxmlconfdata/{firmware-auto-efi-abi-update-aarch64.aarch64-latest.xml => firmware-auto-efi-aarch64.aarch64-latest.abi-update.xml} (100%)
delete mode 120000 tests/qemuxmlconfdata/firmware-auto-efi-abi-update-aarch64.xml
delete mode 120000 tests/qemuxmlconfdata/firmware-auto-efi-abi-update.xml
delete mode 120000 tests/qemuxmlconfdata/firmware-auto-efi-format-loader-raw-abi-update.xml
rename tests/qemuxmlconfdata/{firmware-auto-efi-format-loader-raw-abi-update.aarch64-latest.args => firmware-auto-efi-format-loader-raw.aarch64-latest.abi-update.args} (100%)
rename tests/qemuxmlconfdata/{firmware-auto-efi-format-loader-raw-abi-update.aarch64-latest.xml => firmware-auto-efi-format-loader-raw.aarch64-latest.abi-update.xml} (100%)
delete mode 120000 tests/qemuxmlconfdata/firmware-auto-efi-loader-secure-abi-update.xml
rename tests/qemuxmlconfdata/{firmware-auto-efi-abi-update.x86_64-latest.args => firmware-auto-efi-loader-secure.x86_64-latest.abi-update.args} (100%)
rename tests/qemuxmlconfdata/{firmware-auto-efi-abi-update.x86_64-latest.xml => firmware-auto-efi-loader-secure.x86_64-latest.abi-update.xml} (100%)
delete mode 120000 tests/qemuxmlconfdata/firmware-auto-efi-rw-abi-update.xml
rename tests/qemuxmlconfdata/{firmware-auto-efi-rw-abi-update.x86_64-latest.err => firmware-auto-efi-rw.x86_64-latest.abi-update.err} (100%)
rename tests/qemuxmlconfdata/{firmware-auto-efi-loader-secure-abi-update.x86_64-latest.args => firmware-auto-efi.x86_64-latest.abi-update.args} (100%)
rename tests/qemuxmlconfdata/{firmware-auto-efi-loader-secure-abi-update.x86_64-latest.xml => firmware-auto-efi.x86_64-latest.abi-update.xml} (100%)
rename tests/qemuxmlconfdata/{firmware-manual-efi-features.x86_64-latest.err => firmware-manual-efi-features.x86_64-latest.abi-update.err} (100%)
delete mode 120000 tests/qemuxmlconfdata/memory-hotplug-nvdimm-ppc64-abi-update.xml
rename tests/qemuxmlconfdata/{memory-hotplug-nvdimm-ppc64-abi-update.ppc64-latest.args => memory-hotplug-nvdimm-ppc64.ppc64-latest.abi-update.args} (100%)
rename tests/qemuxmlconfdata/{memory-hotplug-nvdimm-ppc64-abi-update.ppc64-latest.xml => memory-hotplug-nvdimm-ppc64.ppc64-latest.abi-update.xml} (100%)
delete mode 120000 tests/qemuxmlconfdata/memory-hotplug-ppc64-nonuma-abi-update.xml
rename tests/qemuxmlconfdata/{memory-hotplug-ppc64-nonuma-abi-update.ppc64-latest.args => memory-hotplug-ppc64-nonuma.ppc64-latest.abi-update.args} (100%)
rename tests/qemuxmlconfdata/{memory-hotplug-ppc64-nonuma-abi-update.ppc64-latest.xml => memory-hotplug-ppc64-nonuma.ppc64-latest.abi-update.xml} (100%)
delete mode 100644 tests/qemuxmlconfdata/ppc64-usb-controller-legacy.ppc64-latest.args
delete mode 100644 tests/qemuxmlconfdata/ppc64-usb-controller-legacy.ppc64-latest.xml
delete mode 120000 tests/qemuxmlconfdata/ppc64-usb-controller-legacy.xml
delete mode 120000 tests/qemuxmlconfdata/ppc64-usb-controller-qemu-xhci.xml
rename tests/qemuxmlconfdata/{ppc64-usb-controller-qemu-xhci.ppc64-latest.args => ppc64-usb-controller.ppc64-latest.abi-update.args} (100%)
rename tests/qemuxmlconfdata/{ppc64-usb-controller-qemu-xhci.ppc64-latest.xml => ppc64-usb-controller.ppc64-latest.abi-update.xml} (100%)
--
2.43.0
11 months
QEMU Blocl librbd encryption bugfix
by Caleb Davis
Hello there,
As users of libvirt and rbd, we've run into a bug when using encrypted
images with libvirt where `engine=librbd`. This bug has been addressed by a
patch submitted to the mailing list in January of 2023:
https://lists.libvirt.org/archives/list/devel@lists.libvirt.org/message/C...
I've tested this fix myself and can confirm that it resolves our issue
attempting to attach encrypted images using the librbd engine.
I see that this fix has not made it into the master branch. How can my team
and I go about pushing for this fix to be included?
Thank you,
Caleb Davis
11 months
[PATCH 0/4] vmx: A couple of disk related fixes
by Michal Privoznik
The first patch fixes an issue.
The last one - I am not sure if it's not going to break something and
thus it's optional.
Michal Prívozník (4):
vmx: Accept empty fileName for cdrom-image
vmx2xmltest: Add another test case
vmx: Separate disk target name generation into a function
vmx: Ensure unique disk targets when parsing
src/vmx/vmx.c | 199 +++++++++++++++--------
tests/vmx2xmldata/esx-in-the-wild-12.vmx | 86 ++++++++++
tests/vmx2xmldata/esx-in-the-wild-12.xml | 39 +++++
tests/vmx2xmldata/esx-in-the-wild-8.xml | 4 +-
tests/vmx2xmltest.c | 1 +
5 files changed, 261 insertions(+), 68 deletions(-)
create mode 100644 tests/vmx2xmldata/esx-in-the-wild-12.vmx
create mode 100644 tests/vmx2xmldata/esx-in-the-wild-12.xml
--
2.41.0
11 months
[PATCH] qemu_hotplug: Don't lose 'created' flag in qemuDomainChangeNet()
by Michal Privoznik
After v9.1.0-rc1~116 we track whether it's us who created a
macvtap or not. But when updating a vNIC its definition might be
replaced with a new one (though, ifname is not allowed to
change), e.g. to reflect new QoS, link state, etc.
Now, the fact whether we created macvtap for given vNIC is stored
in net->privateData->created. And replacing definition is done by
simply freeing the old definition and making the pointer point to
the new one. But this does not preserve the 'created' flag, which
in turn means when a domain is shutting off, the macvtap is not
removed (see loop inside of qemuProcessStop()).
Copy this flag into new definition and leave a note in
_qemuDomainNetworkPrivate struct.
Fixes: 61d1b9e6592660121aeda66bf7adbcd39de06aa8
Resolves: https://issues.redhat.com/browse/RHEL-22714
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
I also contemplated idea of preserving whole privateData, e.g.:
virObjectUnref(newdev->privateData);
newdev->privateData = g_steal_pointer(&olddev->privateData);
but then decided against it. Looks like a heavy gun, though in my
debugging all members but 'created' were zero/NULL at point of calling
qemuDomainChangeNet(). Then there is qemuDomainNetworkPrivateFormat()
and qemuDomainNetworkPrivateParse() combo, but in order to use it I'd
need to create and then parse an XML doc (to get 'ctxt') and that looks
too much work for very little gain.
Does somebody have any other idea?
src/qemu/qemu_domain.h | 2 ++
src/qemu/qemu_hotplug.c | 5 +++++
2 files changed, 7 insertions(+)
diff --git a/src/qemu/qemu_domain.h b/src/qemu/qemu_domain.h
index b4512cc80e..6ba3f10e8d 100644
--- a/src/qemu/qemu_domain.h
+++ b/src/qemu/qemu_domain.h
@@ -420,6 +420,8 @@ typedef struct _qemuDomainNetworkPrivate qemuDomainNetworkPrivate;
struct _qemuDomainNetworkPrivate {
virObject parent;
+ /* Don't forget to possibly copy these members in qemuDomainChangeNet(). */
+
/* True if the device was created by us. Otherwise we should
* avoid removing it. Currently only used for
* VIR_DOMAIN_NET_TYPE_DIRECT. */
diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c
index 0e45bd53e1..31b00e05ca 100644
--- a/src/qemu/qemu_hotplug.c
+++ b/src/qemu/qemu_hotplug.c
@@ -4166,6 +4166,11 @@ qemuDomainChangeNet(virQEMUDriver *driver,
else
VIR_WARN("Unable to release network device '%s'", NULLSTR(olddev->ifname));
}
+
+ /* Carry over fact whether we created the device or not. */
+ QEMU_DOMAIN_NETWORK_PRIVATE(newdev)->created =
+ QEMU_DOMAIN_NETWORK_PRIVATE(olddev)->created;
+
virDomainNetDefFree(olddev);
/* move newdev into the nets list, and NULL it out from the
* virDomainDeviceDef that we were given so that the caller
--
2.43.0
11 months
[PATCH] Add explanation about the attribute "delay"
by Yalan Zhang
The libvirt created linux bridge has a configurable value "delay",
the default value is "0", but it will not take effect. That's because
kernel has a minimum value for linux bridge. Add some explanation
about it in the document.
Signed-off-by: Yalan Zhang <yalzhang(a)redhat.com>
---
docs/formatnetwork.rst | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/docs/formatnetwork.rst b/docs/formatnetwork.rst
index 5335da5e11..aee70bbd0d 100644
--- a/docs/formatnetwork.rst
+++ b/docs/formatnetwork.rst
@@ -106,7 +106,8 @@ to the physical LAN (if at all).
prefix "virbr" is recommended (and that is what is auto-generated), but not
enforced. Attribute ``stp`` specifies if Spanning Tree Protocol is 'on' or
'off' (default is 'on'). Attribute ``delay`` sets the bridge's forward delay
- value in seconds (default is 0). :since:`Since 0.3.0`
+ value in seconds (default is 0. As the kernel has a minimum delay, values
+ below it may not be counted). :since:`Since 0.3.0`
The ``macTableManager`` attribute of the bridge element is used to tell
libvirt how the bridge's MAC address table (used to determine the correct
--
2.43.0
11 months