diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
index 510182582326e715d3cdc63df896bcfb21b8fded..e5f19ddcaa28bddd8feaf0f1498735337502cc07 100644
--- a/src/qemu/qemu_capabilities.c
+++ b/src/qemu/qemu_capabilities.c
@@ -4619,13 +4619,15 @@ virQEMUCapsInitProcessCaps(virQEMUCapsPtr qemuCaps)
virQEMUCapsClear(qemuCaps, QEMU_CAPS_DEVICE_VFIO_CCW);
}
- /* To avoid guest ABI regression, blockdev shall be enabled only when
- * we are able to pass the custom 'device_id' for SCSI disks and cdroms. */
- if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_SCSI_DISK_DEVICE_ID))
- virQEMUCapsClear(qemuCaps, QEMU_CAPS_BLOCKDEV);
-
if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_CPU_UNAVAILABLE_FEATURES))
virQEMUCapsSet(qemuCaps, QEMU_CAPS_CANONICAL_CPU_FEATURES);
+
+ /* To avoid guest ABI regression, blockdev shall be enabled only when
+ * we are able to pass the custom 'device_id' for SCSI disks and cdroms. */
+ if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_BLOCK_FILE_AUTO_READONLY_DYNAMIC) &&
+ virQEMUCapsGet(qemuCaps, QEMU_CAPS_SCSI_DISK_DEVICE_ID) &&
+ virQEMUCapsGet(qemuCaps, QEMU_CAPS_SAVEVM_MONITOR_NODES))
+ virQEMUCapsSet(qemuCaps, QEMU_CAPS_BLOCKDEV);
}
diff --git a/tests/domaincapsdata/qemu_4.2.0-q35.x86_64.xml b/tests/domaincapsdata/qemu_4.2.0-q35.x86_64.xml
index 50b846c9f4eeddc4130ffa3d1998e103fff863fa..db0bf87e20f062f8ce85e37879a6146b9631add9 100644
--- a/tests/domaincapsdata/qemu_4.2.0-q35.x86_64.xml
+++ b/tests/domaincapsdata/qemu_4.2.0-q35.x86_64.xml
@@ -173,7 +173,7 @@
-
+
diff --git a/tests/domaincapsdata/qemu_4.2.0-tcg.x86_64.xml b/tests/domaincapsdata/qemu_4.2.0-tcg.x86_64.xml
index c9480f35302c7e298f334813338506312ba2c870..ddea9c52ea4ad2b072d4297c60c10828a8ead535 100644
--- a/tests/domaincapsdata/qemu_4.2.0-tcg.x86_64.xml
+++ b/tests/domaincapsdata/qemu_4.2.0-tcg.x86_64.xml
@@ -184,7 +184,7 @@
-
+
diff --git a/tests/domaincapsdata/qemu_4.2.0-virt.aarch64.xml b/tests/domaincapsdata/qemu_4.2.0-virt.aarch64.xml
index 837dcff0d9595a54efe008ad63cb191d7e22ef1c..d101914b060ce1cbff6d9c2e243512bec8bc6ce6 100644
--- a/tests/domaincapsdata/qemu_4.2.0-virt.aarch64.xml
+++ b/tests/domaincapsdata/qemu_4.2.0-virt.aarch64.xml
@@ -147,7 +147,7 @@
-
+
diff --git a/tests/domaincapsdata/qemu_4.2.0.aarch64.xml b/tests/domaincapsdata/qemu_4.2.0.aarch64.xml
index 218b9d7c0e432b45693506a6f39ab399f6a994df..65a842c1b1d3c1f0cb1104afbab7435991cd9f34 100644
--- a/tests/domaincapsdata/qemu_4.2.0.aarch64.xml
+++ b/tests/domaincapsdata/qemu_4.2.0.aarch64.xml
@@ -141,7 +141,7 @@
-
+
diff --git a/tests/domaincapsdata/qemu_4.2.0.x86_64.xml b/tests/domaincapsdata/qemu_4.2.0.x86_64.xml
index 4df4667464e8b3fe294bb82716ae6aff12e52fed..c6b528c5f53a7057b3dc2633ab83a5c5c4153e3e 100644
--- a/tests/domaincapsdata/qemu_4.2.0.x86_64.xml
+++ b/tests/domaincapsdata/qemu_4.2.0.x86_64.xml
@@ -173,7 +173,7 @@
-
+
diff --git a/tests/qemucapabilitiesdata/caps_4.2.0.aarch64.xml b/tests/qemucapabilitiesdata/caps_4.2.0.aarch64.xml
index 3bae6d8e2c9d6fcdcf842f8cfca14ca77e9be566..6ed4829be6109c7cc8c8286f50fd72ad037237ce 100644
--- a/tests/qemucapabilitiesdata/caps_4.2.0.aarch64.xml
+++ b/tests/qemucapabilitiesdata/caps_4.2.0.aarch64.xml
@@ -152,6 +152,7 @@
+
diff --git a/tests/qemucapabilitiesdata/caps_4.2.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_4.2.0.x86_64.xml
index 561f756ead98964a530d7ef6ceb98530c497662b..c7bac03f4406325a6f00389393d03c7ef24f18ad 100644
--- a/tests/qemucapabilitiesdata/caps_4.2.0.x86_64.xml
+++ b/tests/qemucapabilitiesdata/caps_4.2.0.x86_64.xml
@@ -192,6 +192,7 @@
+
diff --git a/tests/qemuxml2argvdata/aarch64-default-cpu-kvm-virt-4.2.aarch64-latest.args b/tests/qemuxml2argvdata/aarch64-default-cpu-kvm-virt-4.2.aarch64-latest.args
index fe33d5410aefad9942630f03438762fe281d7db9..e8da16897f320e27d035f809a2d0bb0ab06d4005 100644
--- a/tests/qemuxml2argvdata/aarch64-default-cpu-kvm-virt-4.2.aarch64-latest.args
+++ b/tests/qemuxml2argvdata/aarch64-default-cpu-kvm-virt-4.2.aarch64-latest.args
@@ -29,9 +29,11 @@ file=/tmp/lib/domain--1-guest/master-key.aes \
-device pcie-root-port,port=0x8,chassis=1,id=pci.1,bus=pcie.0,multifunction=on,\
addr=0x1 \
-device pcie-root-port,port=0x9,chassis=2,id=pci.2,bus=pcie.0,addr=0x1.0x1 \
--drive file=/var/lib/libvirt/images/guest.qcow2,format=qcow2,if=none,\
-id=drive-virtio-disk0 \
--device virtio-blk-pci,scsi=off,bus=pci.1,addr=0x0,drive=drive-virtio-disk0,\
+-blockdev '{"driver":"file","filename":"/var/lib/libvirt/images/guest.qcow2",\
+"node-name":"libvirt-1-storage","auto-read-only":true,"discard":"unmap"}' \
+-blockdev '{"node-name":"libvirt-1-format","read-only":false,"driver":"qcow2",\
+"file":"libvirt-1-storage"}' \
+-device virtio-blk-pci,scsi=off,bus=pci.1,addr=0x0,drive=libvirt-1-format,\
id=virtio-disk0,bootindex=1 \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,\
resourcecontrol=deny \
diff --git a/tests/qemuxml2argvdata/aarch64-default-cpu-tcg-virt-4.2.aarch64-latest.args b/tests/qemuxml2argvdata/aarch64-default-cpu-tcg-virt-4.2.aarch64-latest.args
index 5305c234647cf738507ad4662eaf198e57bb477e..1b417431077a9c7b5ee7b91865ad0664aaa01b57 100644
--- a/tests/qemuxml2argvdata/aarch64-default-cpu-tcg-virt-4.2.aarch64-latest.args
+++ b/tests/qemuxml2argvdata/aarch64-default-cpu-tcg-virt-4.2.aarch64-latest.args
@@ -30,9 +30,11 @@ file=/tmp/lib/domain--1-guest/master-key.aes \
-device pcie-root-port,port=0x8,chassis=1,id=pci.1,bus=pcie.0,multifunction=on,\
addr=0x1 \
-device pcie-root-port,port=0x9,chassis=2,id=pci.2,bus=pcie.0,addr=0x1.0x1 \
--drive file=/var/lib/libvirt/images/guest.qcow2,format=qcow2,if=none,\
-id=drive-virtio-disk0 \
--device virtio-blk-pci,scsi=off,bus=pci.1,addr=0x0,drive=drive-virtio-disk0,\
+-blockdev '{"driver":"file","filename":"/var/lib/libvirt/images/guest.qcow2",\
+"node-name":"libvirt-1-storage","auto-read-only":true,"discard":"unmap"}' \
+-blockdev '{"node-name":"libvirt-1-format","read-only":false,"driver":"qcow2",\
+"file":"libvirt-1-storage"}' \
+-device virtio-blk-pci,scsi=off,bus=pci.1,addr=0x0,drive=libvirt-1-format,\
id=virtio-disk0,bootindex=1 \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,\
resourcecontrol=deny \
diff --git a/tests/qemuxml2argvdata/aarch64-os-firmware-efi.aarch64-latest.args b/tests/qemuxml2argvdata/aarch64-os-firmware-efi.aarch64-latest.args
index 3914b6bf6ea9ab191caf715f8a5b1ce8d7259efd..ed6e513f3c592ddbb9229b10d56bfb4e61e810c5 100644
--- a/tests/qemuxml2argvdata/aarch64-os-firmware-efi.aarch64-latest.args
+++ b/tests/qemuxml2argvdata/aarch64-os-firmware-efi.aarch64-latest.args
@@ -12,12 +12,20 @@ QEMU_AUDIO_DRV=none \
-S \
-object secret,id=masterKey0,format=raw,\
file=/tmp/lib/domain--1-aarch64test/master-key.aes \
--machine virt-4.0,accel=tcg,usb=off,dump-guest-core=off,gic-version=2 \
+-blockdev '{"driver":"file","filename":"/usr/share/AAVMF/AAVMF_CODE.fd",\
+"node-name":"libvirt-pflash0-storage","auto-read-only":true,\
+"discard":"unmap"}' \
+-blockdev '{"node-name":"libvirt-pflash0-format","read-only":true,\
+"driver":"raw","file":"libvirt-pflash0-storage"}' \
+-blockdev '{"driver":"file",\
+"filename":"/var/lib/libvirt/qemu/nvram/aarch64test_VARS.fd",\
+"node-name":"libvirt-pflash1-storage","auto-read-only":true,\
+"discard":"unmap"}' \
+-blockdev '{"node-name":"libvirt-pflash1-format","read-only":false,\
+"driver":"raw","file":"libvirt-pflash1-storage"}' \
+-machine virt-4.0,accel=tcg,usb=off,dump-guest-core=off,gic-version=2,\
+pflash0=libvirt-pflash0-format,pflash1=libvirt-pflash1-format \
-cpu cortex-a53 \
--drive file=/usr/share/AAVMF/AAVMF_CODE.fd,if=pflash,format=raw,unit=0,\
-readonly=on \
--drive file=/var/lib/libvirt/qemu/nvram/aarch64test_VARS.fd,if=pflash,\
-format=raw,unit=1 \
-m 1024 \
-overcommit mem-lock=off \
-smp 1,sockets=1,cores=1,threads=1 \
diff --git a/tests/qemuxml2argvdata/aarch64-virt-graphics.aarch64-latest.args b/tests/qemuxml2argvdata/aarch64-virt-graphics.aarch64-latest.args
index 129fac58381c009e1303080e74f6283bb8e0fca7..c7095a24a5123af2c586f3056a777bc1c77015a9 100644
--- a/tests/qemuxml2argvdata/aarch64-virt-graphics.aarch64-latest.args
+++ b/tests/qemuxml2argvdata/aarch64-virt-graphics.aarch64-latest.args
@@ -12,11 +12,19 @@ QEMU_AUDIO_DRV=none \
-S \
-object secret,id=masterKey0,format=raw,\
file=/tmp/lib/domain--1-guest/master-key.aes \
--machine virt,accel=tcg,usb=off,dump-guest-core=off,gic-version=2 \
--drive file=/usr/share/AAVMF/AAVMF_CODE.fd,if=pflash,format=raw,unit=0,\
-readonly=on \
--drive file=/var/lib/libvirt/qemu/nvram/guest_VARS.fd,if=pflash,format=raw,\
-unit=1 \
+-blockdev '{"driver":"file","filename":"/usr/share/AAVMF/AAVMF_CODE.fd",\
+"node-name":"libvirt-pflash0-storage","auto-read-only":true,\
+"discard":"unmap"}' \
+-blockdev '{"node-name":"libvirt-pflash0-format","read-only":true,\
+"driver":"raw","file":"libvirt-pflash0-storage"}' \
+-blockdev '{"driver":"file",\
+"filename":"/var/lib/libvirt/qemu/nvram/guest_VARS.fd",\
+"node-name":"libvirt-pflash1-storage","auto-read-only":true,\
+"discard":"unmap"}' \
+-blockdev '{"node-name":"libvirt-pflash1-format","read-only":false,\
+"driver":"raw","file":"libvirt-pflash1-storage"}' \
+-machine virt,accel=tcg,usb=off,dump-guest-core=off,gic-version=2,\
+pflash0=libvirt-pflash0-format,pflash1=libvirt-pflash1-format \
-m 4096 \
-overcommit mem-lock=off \
-smp 4,sockets=4,cores=1,threads=1 \
@@ -39,9 +47,11 @@ addr=0x1 \
-device pcie-root-port,port=0xf,chassis=8,id=pci.8,bus=pcie.0,addr=0x1.0x7 \
-device qemu-xhci,p2=15,p3=15,id=usb,bus=pci.2,addr=0x0 \
-device virtio-serial-pci,id=virtio-serial0,bus=pci.3,addr=0x0 \
--drive file=/var/lib/libvirt/images/guest.qcow2,format=qcow2,if=none,\
-id=drive-virtio-disk0 \
--device virtio-blk-pci,scsi=off,bus=pci.4,addr=0x0,drive=drive-virtio-disk0,\
+-blockdev '{"driver":"file","filename":"/var/lib/libvirt/images/guest.qcow2",\
+"node-name":"libvirt-1-storage","auto-read-only":true,"discard":"unmap"}' \
+-blockdev '{"node-name":"libvirt-1-format","read-only":false,"driver":"qcow2",\
+"file":"libvirt-1-storage"}' \
+-device virtio-blk-pci,scsi=off,bus=pci.4,addr=0x0,drive=libvirt-1-format,\
id=virtio-disk0,bootindex=1 \
-netdev user,id=hostnet0 \
-device virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:53:45:a5,bus=pci.1,\
diff --git a/tests/qemuxml2argvdata/aarch64-virt-headless.aarch64-latest.args b/tests/qemuxml2argvdata/aarch64-virt-headless.aarch64-latest.args
index b4947f9b0f8f5bc75461f40a6abfd3d4ba6aa0e2..d9b8db5cafd28a4f254abb8b0334d37b665bc359 100644
--- a/tests/qemuxml2argvdata/aarch64-virt-headless.aarch64-latest.args
+++ b/tests/qemuxml2argvdata/aarch64-virt-headless.aarch64-latest.args
@@ -12,11 +12,19 @@ QEMU_AUDIO_DRV=none \
-S \
-object secret,id=masterKey0,format=raw,\
file=/tmp/lib/domain--1-guest/master-key.aes \
--machine virt,accel=tcg,usb=off,dump-guest-core=off,gic-version=2 \
--drive file=/usr/share/AAVMF/AAVMF_CODE.fd,if=pflash,format=raw,unit=0,\
-readonly=on \
--drive file=/var/lib/libvirt/qemu/nvram/guest_VARS.fd,if=pflash,format=raw,\
-unit=1 \
+-blockdev '{"driver":"file","filename":"/usr/share/AAVMF/AAVMF_CODE.fd",\
+"node-name":"libvirt-pflash0-storage","auto-read-only":true,\
+"discard":"unmap"}' \
+-blockdev '{"node-name":"libvirt-pflash0-format","read-only":true,\
+"driver":"raw","file":"libvirt-pflash0-storage"}' \
+-blockdev '{"driver":"file",\
+"filename":"/var/lib/libvirt/qemu/nvram/guest_VARS.fd",\
+"node-name":"libvirt-pflash1-storage","auto-read-only":true,\
+"discard":"unmap"}' \
+-blockdev '{"node-name":"libvirt-pflash1-format","read-only":false,\
+"driver":"raw","file":"libvirt-pflash1-storage"}' \
+-machine virt,accel=tcg,usb=off,dump-guest-core=off,gic-version=2,\
+pflash0=libvirt-pflash0-format,pflash1=libvirt-pflash1-format \
-m 4096 \
-overcommit mem-lock=off \
-smp 4,sockets=4,cores=1,threads=1 \
@@ -39,9 +47,11 @@ addr=0x1 \
-device pcie-root-port,port=0xe,chassis=7,id=pci.7,bus=pcie.0,addr=0x1.0x6 \
-device qemu-xhci,p2=15,p3=15,id=usb,bus=pci.2,addr=0x0 \
-device virtio-serial-pci,id=virtio-serial0,bus=pci.3,addr=0x0 \
--drive file=/var/lib/libvirt/images/guest.qcow2,format=qcow2,if=none,\
-id=drive-virtio-disk0 \
--device virtio-blk-pci,scsi=off,bus=pci.4,addr=0x0,drive=drive-virtio-disk0,\
+-blockdev '{"driver":"file","filename":"/var/lib/libvirt/images/guest.qcow2",\
+"node-name":"libvirt-1-storage","auto-read-only":true,"discard":"unmap"}' \
+-blockdev '{"node-name":"libvirt-1-format","read-only":false,"driver":"qcow2",\
+"file":"libvirt-1-storage"}' \
+-device virtio-blk-pci,scsi=off,bus=pci.4,addr=0x0,drive=libvirt-1-format,\
id=virtio-disk0,bootindex=1 \
-netdev user,id=hostnet0 \
-device virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:09:a4:37,bus=pci.1,\
diff --git a/tests/qemuxml2argvdata/controller-virtio-scsi.x86_64-latest.args b/tests/qemuxml2argvdata/controller-virtio-scsi.x86_64-latest.args
index 32b781ced9f706159dec4c7d885e738c205af366..1647cfdd977383f33c8dbdc4b4a207fd98585a8c 100644
--- a/tests/qemuxml2argvdata/controller-virtio-scsi.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/controller-virtio-scsi.x86_64-latest.args
@@ -32,21 +32,36 @@ file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \
-device virtio-scsi-pci,id=scsi2,cmd_per_lun=50,bus=pci.0,addr=0x4 \
-device virtio-scsi-pci,id=scsi3,max_sectors=512,bus=pci.0,addr=0x5 \
-device virtio-scsi-pci,id=scsi4,ioeventfd=on,bus=pci.0,addr=0x6 \
--drive file=/dev/HostVG/QEMUGuest1,format=raw,if=none,id=drive-scsi0-0-0-0 \
+-blockdev '{"driver":"host_device","filename":"/dev/HostVG/QEMUGuest1",\
+"node-name":"libvirt-5-storage","auto-read-only":true,"discard":"unmap"}' \
+-blockdev '{"node-name":"libvirt-5-format","read-only":false,"driver":"raw",\
+"file":"libvirt-5-storage"}' \
-device scsi-hd,bus=scsi0.0,channel=0,scsi-id=0,lun=0,\
-device_id=drive-scsi0-0-0-0,drive=drive-scsi0-0-0-0,id=scsi0-0-0-0,bootindex=1 \
--drive file=/dev/HostVG/QEMUGuest2,format=raw,if=none,id=drive-scsi1-0-0-0 \
+device_id=drive-scsi0-0-0-0,drive=libvirt-5-format,id=scsi0-0-0-0,bootindex=1 \
+-blockdev '{"driver":"host_device","filename":"/dev/HostVG/QEMUGuest2",\
+"node-name":"libvirt-4-storage","auto-read-only":true,"discard":"unmap"}' \
+-blockdev '{"node-name":"libvirt-4-format","read-only":false,"driver":"raw",\
+"file":"libvirt-4-storage"}' \
-device scsi-hd,bus=scsi1.0,channel=0,scsi-id=0,lun=0,\
-device_id=drive-scsi1-0-0-0,drive=drive-scsi1-0-0-0,id=scsi1-0-0-0 \
--drive file=/dev/HostVG/QEMUGuest3,format=raw,if=none,id=drive-scsi2-0-0-0 \
+device_id=drive-scsi1-0-0-0,drive=libvirt-4-format,id=scsi1-0-0-0 \
+-blockdev '{"driver":"host_device","filename":"/dev/HostVG/QEMUGuest3",\
+"node-name":"libvirt-3-storage","auto-read-only":true,"discard":"unmap"}' \
+-blockdev '{"node-name":"libvirt-3-format","read-only":false,"driver":"raw",\
+"file":"libvirt-3-storage"}' \
-device scsi-hd,bus=scsi2.0,channel=0,scsi-id=0,lun=0,\
-device_id=drive-scsi2-0-0-0,drive=drive-scsi2-0-0-0,id=scsi2-0-0-0 \
--drive file=/dev/HostVG/QEMUGuest4,format=raw,if=none,id=drive-scsi3-0-0-0 \
+device_id=drive-scsi2-0-0-0,drive=libvirt-3-format,id=scsi2-0-0-0 \
+-blockdev '{"driver":"host_device","filename":"/dev/HostVG/QEMUGuest4",\
+"node-name":"libvirt-2-storage","auto-read-only":true,"discard":"unmap"}' \
+-blockdev '{"node-name":"libvirt-2-format","read-only":false,"driver":"raw",\
+"file":"libvirt-2-storage"}' \
-device scsi-hd,bus=scsi3.0,channel=0,scsi-id=0,lun=0,\
-device_id=drive-scsi3-0-0-0,drive=drive-scsi3-0-0-0,id=scsi3-0-0-0 \
--drive file=/dev/HostVG/QEMUGuest5,format=raw,if=none,id=drive-scsi4-0-0-0 \
+device_id=drive-scsi3-0-0-0,drive=libvirt-2-format,id=scsi3-0-0-0 \
+-blockdev '{"driver":"host_device","filename":"/dev/HostVG/QEMUGuest5",\
+"node-name":"libvirt-1-storage","auto-read-only":true,"discard":"unmap"}' \
+-blockdev '{"node-name":"libvirt-1-format","read-only":false,"driver":"raw",\
+"file":"libvirt-1-storage"}' \
-device scsi-hd,bus=scsi4.0,channel=0,scsi-id=0,lun=0,\
-device_id=drive-scsi4-0-0-0,drive=drive-scsi4-0-0-0,id=scsi4-0-0-0 \
+device_id=drive-scsi4-0-0-0,drive=libvirt-1-format,id=scsi4-0-0-0 \
-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x7 \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,\
resourcecontrol=deny \
diff --git a/tests/qemuxml2argvdata/disk-aio.x86_64-latest.args b/tests/qemuxml2argvdata/disk-aio.x86_64-latest.args
index 623ea39a2e87bd0e64808a3bd6ee8dd9ffc3823d..a424e58a4894df46592f310b45a66ad88027a6e7 100644
--- a/tests/qemuxml2argvdata/disk-aio.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/disk-aio.x86_64-latest.args
@@ -27,13 +27,20 @@ file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \
-no-acpi \
-boot strict=on \
-device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 \
--drive file=/dev/HostVG/QEMUGuest1,format=qcow2,if=none,id=drive-ide0-0-0,\
-cache=none,aio=native \
--device ide-hd,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=1,\
+-blockdev '{"driver":"host_device","filename":"/dev/HostVG/QEMUGuest1",\
+"aio":"native","node-name":"libvirt-2-storage","cache":{"direct":true,\
+"no-flush":false},"auto-read-only":true,"discard":"unmap"}' \
+-blockdev '{"node-name":"libvirt-2-format","read-only":false,\
+"cache":{"direct":true,"no-flush":false},"driver":"qcow2",\
+"file":"libvirt-2-storage"}' \
+-device ide-hd,bus=ide.0,unit=0,drive=libvirt-2-format,id=ide0-0-0,bootindex=1,\
write-cache=on \
--drive file=/dev/HostVG/QEMUGuest2,format=raw,if=none,id=drive-ide0-1-0,\
-readonly=on,aio=threads \
--device ide-cd,bus=ide.1,unit=0,drive=drive-ide0-1-0,id=ide0-1-0 \
+-blockdev '{"driver":"host_device","filename":"/dev/HostVG/QEMUGuest2",\
+"aio":"threads","node-name":"libvirt-1-storage","auto-read-only":true,\
+"discard":"unmap"}' \
+-blockdev '{"node-name":"libvirt-1-format","read-only":true,"driver":"raw",\
+"file":"libvirt-1-storage"}' \
+-device ide-cd,bus=ide.1,unit=0,drive=libvirt-1-format,id=ide0-1-0 \
-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x2 \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,\
resourcecontrol=deny \
diff --git a/tests/qemuxml2argvdata/disk-backing-chains-noindex.x86_64-latest.args b/tests/qemuxml2argvdata/disk-backing-chains-noindex.x86_64-latest.args
index bba58be46c3a87dafcdfda3a7ce4db053392cb54..a2f030f165635495ea133710f2b658ac3dcb4b91 100644
--- a/tests/qemuxml2argvdata/disk-backing-chains-noindex.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/disk-backing-chains-noindex.x86_64-latest.args
@@ -27,33 +27,138 @@ file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \
-no-acpi \
-boot strict=on \
-device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 \
--drive 'file=gluster+unix:///Volume2/Image?socket=/path/to/sock,file.debug=4,\
-format=qcow2,if=none,id=drive-virtio-disk0' \
--device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x2,drive=drive-virtio-disk0,\
+-blockdev '{"driver":"file","filename":"/tmp/missing-backing-store.qcow",\
+"node-name":"libvirt-25-storage","auto-read-only":true,"discard":"unmap"}' \
+-blockdev '{"node-name":"libvirt-25-format","read-only":true,"driver":"qcow2",\
+"file":"libvirt-25-storage"}' \
+-blockdev '{"driver":"gluster","volume":"Volume2","path":"Image",\
+"server":[{"type":"unix","path":"/path/to/sock"}],"debug":4,\
+"node-name":"libvirt-24-storage","auto-read-only":true,"discard":"unmap"}' \
+-blockdev '{"node-name":"libvirt-24-format","read-only":false,"driver":"qcow2",\
+"file":"libvirt-24-storage","backing":"libvirt-25-format"}' \
+-device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x2,drive=libvirt-24-format,\
id=virtio-disk0,bootindex=1 \
--drive file=nbd:unix:/var/run/nbdsock:exportname=bar,format=qcow2,if=none,\
-id=drive-virtio-disk1 \
--device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x3,drive=drive-virtio-disk1,\
+-blockdev '{"driver":"file","filename":"/tmp/Fedora-17-x86_64-Live-KDE.iso",\
+"node-name":"libvirt-23-storage","auto-read-only":true,"discard":"unmap"}' \
+-blockdev '{"node-name":"libvirt-23-format","read-only":true,"driver":"raw",\
+"file":"libvirt-23-storage"}' \
+-blockdev '{"driver":"file","filename":"/tmp/image5.qcow",\
+"node-name":"libvirt-22-storage","auto-read-only":true,"discard":"unmap"}' \
+-blockdev '{"node-name":"libvirt-22-format","read-only":true,"driver":"qcow2",\
+"file":"libvirt-22-storage","backing":"libvirt-23-format"}' \
+-blockdev '{"driver":"file","filename":"/tmp/image4.qcow",\
+"node-name":"libvirt-21-storage","auto-read-only":true,"discard":"unmap"}' \
+-blockdev '{"node-name":"libvirt-21-format","read-only":true,"driver":"qcow2",\
+"file":"libvirt-21-storage","backing":"libvirt-22-format"}' \
+-blockdev '{"driver":"file","filename":"/tmp/image3.qcow",\
+"node-name":"libvirt-20-storage","auto-read-only":true,"discard":"unmap"}' \
+-blockdev '{"node-name":"libvirt-20-format","read-only":true,"driver":"qcow2",\
+"file":"libvirt-20-storage","backing":"libvirt-21-format"}' \
+-blockdev '{"driver":"file","filename":"/tmp/image2",\
+"node-name":"libvirt-19-storage","auto-read-only":true,"discard":"unmap"}' \
+-blockdev '{"node-name":"libvirt-19-format","read-only":true,"driver":"vmdk",\
+"file":"libvirt-19-storage","backing":"libvirt-20-format"}' \
+-blockdev '{"driver":"host_device","filename":"/dev/HostVG/QEMUGuest1",\
+"node-name":"libvirt-18-storage","auto-read-only":true,"discard":"unmap"}' \
+-blockdev '{"node-name":"libvirt-18-format","read-only":true,"driver":"qcow2",\
+"file":"libvirt-18-storage","backing":"libvirt-19-format"}' \
+-blockdev '{"driver":"nbd","server":{"type":"unix","path":"/var/run/nbdsock"},\
+"export":"bar","node-name":"libvirt-17-storage","auto-read-only":true,\
+"discard":"unmap"}' \
+-blockdev '{"node-name":"libvirt-17-format","read-only":false,"driver":"qcow2",\
+"file":"libvirt-17-storage","backing":"libvirt-18-format"}' \
+-device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x3,drive=libvirt-17-format,\
id=virtio-disk1 \
--drive file=gluster://example.org:6000/Volume1/Image,file.debug=4,format=raw,\
-if=none,id=drive-virtio-disk2 \
--device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x4,drive=drive-virtio-disk2,\
+-blockdev '{"driver":"gluster","volume":"Volume1","path":"Image",\
+"server":[{"type":"inet","host":"example.org","port":"6000"}],"debug":4,\
+"node-name":"libvirt-16-storage","auto-read-only":true,"discard":"unmap"}' \
+-blockdev '{"node-name":"libvirt-16-format","read-only":false,"driver":"raw",\
+"file":"libvirt-16-storage"}' \
+-device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x4,drive=libvirt-16-format,\
id=virtio-disk2 \
--object secret,id=virtio-disk3-secret0,\
+-blockdev '{"driver":"file","filename":"/tmp/image.qcow",\
+"node-name":"libvirt-15-storage","auto-read-only":true,"discard":"unmap"}' \
+-blockdev '{"node-name":"libvirt-15-format","read-only":true,"driver":"qcow2",\
+"file":"libvirt-15-storage","backing":null}' \
+-object secret,id=libvirt-14-storage-secret0,\
data=9eao5F8qtkGt+seB1HYivWIxbtwUu6MQtg1zpj/oDtUsPr1q8wBYM91uEHCn6j/1,\
keyid=masterKey0,iv=AAECAwQFBgcICQoLDA0ODw==,format=base64 \
--drive 'file=rbd:pool/image:id=myname:auth_supported=cephx\;none:\
-mon_host=mon1.example.org\:6321\;mon2.example.org\:6322\;mon3.example.org\:\
-6322,file.password-secret=virtio-disk3-secret0,format=qcow2,if=none,\
-id=drive-virtio-disk3' \
--device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x5,drive=drive-virtio-disk3,\
+-blockdev '{"driver":"rbd","pool":"pool","image":"image",\
+"server":[{"host":"mon1.example.org","port":"6321"},{"host":"mon2.example.org",\
+"port":"6322"},{"host":"mon3.example.org","port":"6322"}],"user":"myname",\
+"auth-client-required":["cephx","none"],\
+"key-secret":"libvirt-14-storage-secret0","node-name":"libvirt-14-storage",\
+"auto-read-only":true,"discard":"unmap"}' \
+-blockdev '{"node-name":"libvirt-14-format","read-only":false,"driver":"qcow2",\
+"file":"libvirt-14-storage","backing":"libvirt-15-format"}' \
+-device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x5,drive=libvirt-14-format,\
id=virtio-disk3 \
--drive file=/dev/HostVG/QEMUGuest11,format=qcow2,if=none,id=drive-virtio-disk4 \
--device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x6,drive=drive-virtio-disk4,\
+-blockdev '{"driver":"host_device","filename":"/dev/HostVG/QEMUGuest11",\
+"node-name":"libvirt-13-storage","auto-read-only":true,"discard":"unmap"}' \
+-blockdev '{"node-name":"libvirt-13-format","read-only":false,"driver":"qcow2",\
+"file":"libvirt-13-storage"}' \
+-device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x6,drive=libvirt-13-format,\
id=virtio-disk4 \
--drive file=/var/lib/libvirt/images/rhel7.1484071880,format=qcow2,if=none,\
-id=drive-virtio-disk5 \
--device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x7,drive=drive-virtio-disk5,\
+-blockdev '{"driver":"file","filename":"/var/lib/libvirt/images/rhel7.qcow2",\
+"node-name":"libvirt-12-storage","auto-read-only":true,"discard":"unmap"}' \
+-blockdev '{"node-name":"libvirt-12-format","read-only":true,"driver":"qcow2",\
+"file":"libvirt-12-storage","backing":null}' \
+-blockdev '{"driver":"file",\
+"filename":"/var/lib/libvirt/images/rhel7.1483536402",\
+"node-name":"libvirt-11-storage","auto-read-only":true,"discard":"unmap"}' \
+-blockdev '{"node-name":"libvirt-11-format","read-only":true,"driver":"qcow2",\
+"file":"libvirt-11-storage","backing":"libvirt-12-format"}' \
+-blockdev '{"driver":"file",\
+"filename":"/var/lib/libvirt/images/rhel7.1483545313",\
+"node-name":"libvirt-10-storage","auto-read-only":true,"discard":"unmap"}' \
+-blockdev '{"node-name":"libvirt-10-format","read-only":true,"driver":"qcow2",\
+"file":"libvirt-10-storage","backing":"libvirt-11-format"}' \
+-blockdev '{"driver":"file",\
+"filename":"/var/lib/libvirt/images/rhel7.1483545901",\
+"node-name":"libvirt-9-storage","auto-read-only":true,"discard":"unmap"}' \
+-blockdev '{"node-name":"libvirt-9-format","read-only":true,"driver":"qcow2",\
+"file":"libvirt-9-storage","backing":"libvirt-10-format"}' \
+-blockdev '{"driver":"file",\
+"filename":"/var/lib/libvirt/images/rhel7.1483546244",\
+"node-name":"libvirt-8-storage","auto-read-only":true,"discard":"unmap"}' \
+-blockdev '{"node-name":"libvirt-8-format","read-only":true,"driver":"qcow2",\
+"file":"libvirt-8-storage","backing":"libvirt-9-format"}' \
+-blockdev '{"driver":"file",\
+"filename":"/var/lib/libvirt/images/rhel7.1483605920",\
+"node-name":"libvirt-7-storage","auto-read-only":true,"discard":"unmap"}' \
+-blockdev '{"node-name":"libvirt-7-format","read-only":true,"driver":"qcow2",\
+"file":"libvirt-7-storage","backing":"libvirt-8-format"}' \
+-blockdev '{"driver":"file",\
+"filename":"/var/lib/libvirt/images/rhel7.1483605924",\
+"node-name":"libvirt-6-storage","auto-read-only":true,"discard":"unmap"}' \
+-blockdev '{"node-name":"libvirt-6-format","read-only":true,"driver":"qcow2",\
+"file":"libvirt-6-storage","backing":"libvirt-7-format"}' \
+-blockdev '{"driver":"file",\
+"filename":"/var/lib/libvirt/images/rhel7.1483615252",\
+"node-name":"libvirt-5-storage","auto-read-only":true,"discard":"unmap"}' \
+-blockdev '{"node-name":"libvirt-5-format","read-only":true,"driver":"qcow2",\
+"file":"libvirt-5-storage","backing":"libvirt-6-format"}' \
+-blockdev '{"driver":"file",\
+"filename":"/var/lib/libvirt/images/rhel7.1484071872",\
+"node-name":"libvirt-4-storage","auto-read-only":true,"discard":"unmap"}' \
+-blockdev '{"node-name":"libvirt-4-format","read-only":true,"driver":"qcow2",\
+"file":"libvirt-4-storage","backing":"libvirt-5-format"}' \
+-blockdev '{"driver":"file",\
+"filename":"/var/lib/libvirt/images/rhel7.1484071876",\
+"node-name":"libvirt-3-storage","auto-read-only":true,"discard":"unmap"}' \
+-blockdev '{"node-name":"libvirt-3-format","read-only":true,"driver":"qcow2",\
+"file":"libvirt-3-storage","backing":"libvirt-4-format"}' \
+-blockdev '{"driver":"file",\
+"filename":"/var/lib/libvirt/images/rhel7.1484071877",\
+"node-name":"libvirt-2-storage","auto-read-only":true,"discard":"unmap"}' \
+-blockdev '{"node-name":"libvirt-2-format","read-only":true,"driver":"qcow2",\
+"file":"libvirt-2-storage","backing":"libvirt-3-format"}' \
+-blockdev '{"driver":"file",\
+"filename":"/var/lib/libvirt/images/rhel7.1484071880",\
+"node-name":"libvirt-1-storage","auto-read-only":true,"discard":"unmap"}' \
+-blockdev '{"node-name":"libvirt-1-format","read-only":false,"driver":"qcow2",\
+"file":"libvirt-1-storage","backing":"libvirt-2-format"}' \
+-device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x7,drive=libvirt-1-format,\
id=virtio-disk5 \
-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x8 \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,\
diff --git a/tests/qemuxml2argvdata/disk-cache.x86_64-latest.args b/tests/qemuxml2argvdata/disk-cache.x86_64-latest.args
index 01d3b9d4909a85d67530171538d34e8e2e4cdc63..49dee03493215009f2078b69c70072e1cb32a67b 100644
--- a/tests/qemuxml2argvdata/disk-cache.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/disk-cache.x86_64-latest.args
@@ -29,25 +29,45 @@ file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \
-boot strict=on \
-device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 \
-device lsi,id=scsi0,bus=pci.0,addr=0x2 \
--drive file=/dev/HostVG/QEMUGuest1,format=qcow2,if=none,id=drive-ide0-0-0,\
-cache=writeback \
--device ide-hd,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=1,\
+-blockdev '{"driver":"host_device","filename":"/dev/HostVG/QEMUGuest1",\
+"node-name":"libvirt-5-storage","cache":{"direct":false,"no-flush":false},\
+"auto-read-only":true,"discard":"unmap"}' \
+-blockdev '{"node-name":"libvirt-5-format","read-only":false,\
+"cache":{"direct":false,"no-flush":false},"driver":"qcow2",\
+"file":"libvirt-5-storage"}' \
+-device ide-hd,bus=ide.0,unit=0,drive=libvirt-5-format,id=ide0-0-0,bootindex=1,\
write-cache=on \
--drive file=/dev/HostVG/QEMUGuest1,format=qcow2,if=none,id=drive-ide0-0-1,\
-cache=unsafe \
--device ide-hd,bus=ide.0,unit=1,drive=drive-ide0-0-1,id=ide0-0-1,\
+-blockdev '{"driver":"host_device","filename":"/dev/HostVG/QEMUGuest1",\
+"node-name":"libvirt-4-storage","cache":{"direct":false,"no-flush":true},\
+"auto-read-only":true,"discard":"unmap"}' \
+-blockdev '{"node-name":"libvirt-4-format","read-only":false,\
+"cache":{"direct":false,"no-flush":true},"driver":"qcow2",\
+"file":"libvirt-4-storage"}' \
+-device ide-hd,bus=ide.0,unit=1,drive=libvirt-4-format,id=ide0-0-1,\
write-cache=on \
--drive file=/dev/HostVG/QEMUGuest1,format=qcow2,if=none,id=drive-scsi0-0-0,\
-cache=none \
+-blockdev '{"driver":"host_device","filename":"/dev/HostVG/QEMUGuest1",\
+"node-name":"libvirt-3-storage","cache":{"direct":true,"no-flush":false},\
+"auto-read-only":true,"discard":"unmap"}' \
+-blockdev '{"node-name":"libvirt-3-format","read-only":false,\
+"cache":{"direct":true,"no-flush":false},"driver":"qcow2",\
+"file":"libvirt-3-storage"}' \
-device scsi-hd,bus=scsi0.0,scsi-id=0,device_id=drive-scsi0-0-0,\
-drive=drive-scsi0-0-0,id=scsi0-0-0,write-cache=on \
--drive file=/dev/HostVG/QEMUGuest1,format=qcow2,if=none,id=drive-virtio-disk0,\
-cache=writethrough \
--device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x3,drive=drive-virtio-disk0,\
+drive=libvirt-3-format,id=scsi0-0-0,write-cache=on \
+-blockdev '{"driver":"host_device","filename":"/dev/HostVG/QEMUGuest1",\
+"node-name":"libvirt-2-storage","cache":{"direct":false,"no-flush":false},\
+"auto-read-only":true,"discard":"unmap"}' \
+-blockdev '{"node-name":"libvirt-2-format","read-only":false,\
+"cache":{"direct":false,"no-flush":false},"driver":"qcow2",\
+"file":"libvirt-2-storage"}' \
+-device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x3,drive=libvirt-2-format,\
id=virtio-disk0,write-cache=off \
--drive file=/dev/HostVG/QEMUGuest1,format=qcow2,if=none,id=drive-usb-disk1,\
-cache=directsync \
--device usb-storage,bus=usb.0,port=1,drive=drive-usb-disk1,id=usb-disk1,\
+-blockdev '{"driver":"host_device","filename":"/dev/HostVG/QEMUGuest1",\
+"node-name":"libvirt-1-storage","cache":{"direct":true,"no-flush":false},\
+"auto-read-only":true,"discard":"unmap"}' \
+-blockdev '{"node-name":"libvirt-1-format","read-only":false,\
+"cache":{"direct":true,"no-flush":false},"driver":"qcow2",\
+"file":"libvirt-1-storage"}' \
+-device usb-storage,bus=usb.0,port=1,drive=libvirt-1-format,id=usb-disk1,\
removable=off,write-cache=off \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,\
resourcecontrol=deny \
diff --git a/tests/qemuxml2argvdata/disk-cdrom-empty-network-invalid.x86_64-latest.args b/tests/qemuxml2argvdata/disk-cdrom-empty-network-invalid.x86_64-latest.args
index 1e43047459bc0c679d86c6c03ee34ba769f59316..bdd89d75061c314bb151e86aa698801e2f1bfc42 100644
--- a/tests/qemuxml2argvdata/disk-cdrom-empty-network-invalid.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/disk-cdrom-empty-network-invalid.x86_64-latest.args
@@ -27,8 +27,7 @@ file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \
-no-acpi \
-boot strict=on \
-device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 \
--drive if=none,id=drive-ide0-1-1,readonly=on \
--device ide-cd,bus=ide.1,unit=1,drive=drive-ide0-1-1,id=ide0-1-1 \
+-device ide-cd,bus=ide.1,unit=1,id=ide0-1-1 \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,\
resourcecontrol=deny \
-msg timestamp=on
diff --git a/tests/qemuxml2argvdata/disk-cdrom-network.x86_64-latest.args b/tests/qemuxml2argvdata/disk-cdrom-network.x86_64-latest.args
index e0d2eb049d13982e83bb1a2105c98bb47445bb30..0b4ac07f07733a1e90f7c4aa9163195f58d8f822 100644
--- a/tests/qemuxml2argvdata/disk-cdrom-network.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/disk-cdrom-network.x86_64-latest.args
@@ -27,18 +27,26 @@ file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \
-no-shutdown \
-boot strict=on \
-device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 \
--drive file=ftp://host.name:21/url/path/file.iso,format=raw,if=none,\
-id=drive-ide0-0-0,readonly=on \
--device ide-cd,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=1 \
--drive file=ftps://host.name:990/url/path/file.iso,format=raw,if=none,\
-id=drive-ide0-0-1,readonly=on \
--device ide-cd,bus=ide.0,unit=1,drive=drive-ide0-0-1,id=ide0-0-1 \
--drive file=https://host.name:443/url/path/file.iso,format=raw,if=none,\
-id=drive-ide0-1-0,readonly=on \
--device ide-cd,bus=ide.1,unit=0,drive=drive-ide0-1-0,id=ide0-1-0 \
--drive file=tftp://host.name:69/url/path/file.iso,format=raw,if=none,\
-id=drive-ide0-1-1,readonly=on \
--device ide-cd,bus=ide.1,unit=1,drive=drive-ide0-1-1,id=ide0-1-1 \
+-blockdev '{"driver":"ftp","url":"ftp://host.name:21/url/path/file.iso",\
+"node-name":"libvirt-4-storage","auto-read-only":true,"discard":"unmap"}' \
+-blockdev '{"node-name":"libvirt-4-format","read-only":true,"driver":"raw",\
+"file":"libvirt-4-storage"}' \
+-device ide-cd,bus=ide.0,unit=0,drive=libvirt-4-format,id=ide0-0-0,bootindex=1 \
+-blockdev '{"driver":"ftps","url":"ftps://host.name:990/url/path/file.iso",\
+"node-name":"libvirt-3-storage","auto-read-only":true,"discard":"unmap"}' \
+-blockdev '{"node-name":"libvirt-3-format","read-only":true,"driver":"raw",\
+"file":"libvirt-3-storage"}' \
+-device ide-cd,bus=ide.0,unit=1,drive=libvirt-3-format,id=ide0-0-1 \
+-blockdev '{"driver":"https","url":"https://host.name:443/url/path/file.iso",\
+"node-name":"libvirt-2-storage","auto-read-only":true,"discard":"unmap"}' \
+-blockdev '{"node-name":"libvirt-2-format","read-only":true,"driver":"raw",\
+"file":"libvirt-2-storage"}' \
+-device ide-cd,bus=ide.1,unit=0,drive=libvirt-2-format,id=ide0-1-0 \
+-blockdev '{"driver":"tftp","url":"tftp://host.name:69/url/path/file.iso",\
+"node-name":"libvirt-1-storage","auto-read-only":true,"discard":"unmap"}' \
+-blockdev '{"node-name":"libvirt-1-format","read-only":true,"driver":"raw",\
+"file":"libvirt-1-storage"}' \
+-device ide-cd,bus=ide.1,unit=1,drive=libvirt-1-format,id=ide0-1-1 \
-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x2 \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,\
resourcecontrol=deny \
diff --git a/tests/qemuxml2argvdata/disk-cdrom-tray.x86_64-latest.args b/tests/qemuxml2argvdata/disk-cdrom-tray.x86_64-latest.args
index 21542db4c2d6be5e089b4e6882e8e38ba8d6e545..6e32f918f39c0073e63d3ee12ffdce86db486acc 100644
--- a/tests/qemuxml2argvdata/disk-cdrom-tray.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/disk-cdrom-tray.x86_64-latest.args
@@ -28,15 +28,23 @@ file=/tmp/lib/domain--1-test/master-key.aes \
-no-acpi \
-boot menu=on,strict=on \
-device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 \
--drive file=/var/lib/libvirt/images/f14.img,format=qcow2,if=none,\
-id=drive-virtio-disk0 \
--device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x4,drive=drive-virtio-disk0,\
+-blockdev '{"driver":"file","filename":"/var/lib/libvirt/images/f14.img",\
+"node-name":"libvirt-3-storage","auto-read-only":true,"discard":"unmap"}' \
+-blockdev '{"node-name":"libvirt-3-format","read-only":false,"driver":"qcow2",\
+"file":"libvirt-3-storage"}' \
+-device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x4,drive=libvirt-3-format,\
id=virtio-disk0,bootindex=2 \
--drive file=/var/lib/libvirt/Fedora-14-x86_64-Live-KDE.iso,format=raw,if=none,\
-id=drive-ide0-1-0,readonly=on \
--device ide-cd,bus=ide.1,unit=0,drive=drive-ide0-1-0,id=ide0-1-0,bootindex=1 \
--drive if=none,id=drive-ide0-1-1,readonly=on \
--device ide-cd,bus=ide.1,unit=1,drive=drive-ide0-1-1,id=ide0-1-1 \
+-blockdev '{"driver":"file",\
+"filename":"/var/lib/libvirt/Fedora-14-x86_64-Live-KDE.iso",\
+"node-name":"libvirt-2-storage","auto-read-only":true,"discard":"unmap"}' \
+-blockdev '{"node-name":"libvirt-2-format","read-only":true,"driver":"raw",\
+"file":"libvirt-2-storage"}' \
+-device ide-cd,bus=ide.1,unit=0,drive=libvirt-2-format,id=ide0-1-0,bootindex=1 \
+-blockdev '{"driver":"file","filename":"/tmp/cdrom.img",\
+"node-name":"libvirt-1-storage","auto-read-only":true,"discard":"unmap"}' \
+-blockdev '{"node-name":"libvirt-1-format","read-only":true,"driver":"raw",\
+"file":"libvirt-1-storage"}' \
+-device ide-cd,bus=ide.1,unit=1,drive=libvirt-1-format,id=ide0-1-1 \
-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x2 \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,\
resourcecontrol=deny \
diff --git a/tests/qemuxml2argvdata/disk-cdrom.x86_64-latest.args b/tests/qemuxml2argvdata/disk-cdrom.x86_64-latest.args
index bacef71aadeab3eff5c8db3588a4d31cf8be621b..a32daba5e7f992fdd37091fd84122488668a7d82 100644
--- a/tests/qemuxml2argvdata/disk-cdrom.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/disk-cdrom.x86_64-latest.args
@@ -27,15 +27,18 @@ file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \
-no-acpi \
-boot strict=on \
-device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 \
--drive file=/dev/HostVG/QEMUGuest1,format=raw,if=none,id=drive-ide0-0-0 \
--device ide-hd,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=1 \
--drive file=/root/boot.iso,format=raw,if=none,id=drive-ide0-0-1,readonly=on \
--device ide-cd,bus=ide.0,unit=1,drive=drive-ide0-0-1,id=ide0-0-1 \
--drive if=none,id=drive-ide0-1-0,readonly=on \
--device ide-cd,bus=ide.1,unit=0,drive=drive-ide0-1-0,id=ide0-1-0,\
-write-cache=on \
--drive if=none,id=drive-ide0-1-1,readonly=on \
--device ide-cd,bus=ide.1,unit=1,drive=drive-ide0-1-1,id=ide0-1-1 \
+-blockdev '{"driver":"host_device","filename":"/dev/HostVG/QEMUGuest1",\
+"node-name":"libvirt-4-storage","auto-read-only":true,"discard":"unmap"}' \
+-blockdev '{"node-name":"libvirt-4-format","read-only":false,"driver":"raw",\
+"file":"libvirt-4-storage"}' \
+-device ide-hd,bus=ide.0,unit=0,drive=libvirt-4-format,id=ide0-0-0,bootindex=1 \
+-blockdev '{"driver":"file","filename":"/root/boot.iso",\
+"node-name":"libvirt-3-storage","auto-read-only":true,"discard":"unmap"}' \
+-blockdev '{"node-name":"libvirt-3-format","read-only":true,"driver":"raw",\
+"file":"libvirt-3-storage"}' \
+-device ide-cd,bus=ide.0,unit=1,drive=libvirt-3-format,id=ide0-0-1 \
+-device ide-cd,bus=ide.1,unit=0,id=ide0-1-0,write-cache=on \
+-device ide-cd,bus=ide.1,unit=1,id=ide0-1-1 \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,\
resourcecontrol=deny \
-msg timestamp=on
diff --git a/tests/qemuxml2argvdata/disk-copy_on_read.x86_64-latest.args b/tests/qemuxml2argvdata/disk-copy_on_read.x86_64-latest.args
index 8552f9f00e648da74822b4e3a29cd83eca1badac..646d63aa900b14e0d9eafb18f7aa8839d116c402 100644
--- a/tests/qemuxml2argvdata/disk-copy_on_read.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/disk-copy_on_read.x86_64-latest.args
@@ -29,13 +29,20 @@ file=/tmp/lib/domain--1-test/master-key.aes \
-boot menu=on,strict=on \
-device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 \
-device virtio-serial-pci,id=virtio-serial0,bus=pci.0,addr=0x6 \
--drive file=/var/lib/libvirt/images/f14.img,format=qcow2,if=none,\
-id=drive-virtio-disk0,copy-on-read=on \
--device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x4,drive=drive-virtio-disk0,\
+-blockdev '{"driver":"file","filename":"/var/lib/libvirt/images/f14.img",\
+"node-name":"libvirt-2-storage","auto-read-only":true,"discard":"unmap"}' \
+-blockdev '{"node-name":"libvirt-2-format","read-only":false,"driver":"qcow2",\
+"file":"libvirt-2-storage"}' \
+-blockdev '{"driver":"copy-on-read","node-name":"libvirt-CoR-vda",\
+"file":"libvirt-2-format"}' \
+-device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x4,drive=libvirt-CoR-vda,\
id=virtio-disk0,bootindex=2 \
--drive file=/var/lib/libvirt/Fedora-14-x86_64-Live-KDE.iso,format=raw,if=none,\
-id=drive-ide0-1-0,readonly=on \
--device ide-cd,bus=ide.1,unit=0,drive=drive-ide0-1-0,id=ide0-1-0,bootindex=1 \
+-blockdev '{"driver":"file",\
+"filename":"/var/lib/libvirt/Fedora-14-x86_64-Live-KDE.iso",\
+"node-name":"libvirt-1-storage","auto-read-only":true,"discard":"unmap"}' \
+-blockdev '{"node-name":"libvirt-1-format","read-only":true,"driver":"raw",\
+"file":"libvirt-1-storage"}' \
+-device ide-cd,bus=ide.1,unit=0,drive=libvirt-1-format,id=ide0-1-0,bootindex=1 \
-netdev user,id=hostnet0 \
-device virtio-net-pci,tx=bh,netdev=hostnet0,id=net0,mac=52:54:00:e5:48:58,\
bus=pci.0,addr=0x2 \
diff --git a/tests/qemuxml2argvdata/disk-detect-zeroes.x86_64-latest.args b/tests/qemuxml2argvdata/disk-detect-zeroes.x86_64-latest.args
index 2a01647e50ecb2bd459e9411a57de5cfc497144d..59dcd98322e24cfacc532c80d04cfa624c1cc20b 100644
--- a/tests/qemuxml2argvdata/disk-detect-zeroes.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/disk-detect-zeroes.x86_64-latest.args
@@ -28,13 +28,18 @@ file=/tmp/lib/domain--1-test/master-key.aes \
-no-acpi \
-boot menu=on,strict=on \
-device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 \
--drive file=/var/lib/libvirt/images/f14.img,format=qcow2,if=none,\
-id=drive-virtio-disk0,discard=unmap,detect-zeroes=unmap \
--device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x4,drive=drive-virtio-disk0,\
+-blockdev '{"driver":"file","filename":"/var/lib/libvirt/images/f14.img",\
+"node-name":"libvirt-2-storage","auto-read-only":true,"discard":"unmap"}' \
+-blockdev '{"node-name":"libvirt-2-format","read-only":false,"discard":"unmap",\
+"detect-zeroes":"unmap","driver":"qcow2","file":"libvirt-2-storage"}' \
+-device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x4,drive=libvirt-2-format,\
id=virtio-disk0,bootindex=2 \
--drive file=/var/lib/libvirt/Fedora-14-x86_64-Live-KDE.iso,format=raw,if=none,\
-id=drive-ide0-1-0,readonly=on,discard=ignore,detect-zeroes=on \
--device ide-cd,bus=ide.1,unit=0,drive=drive-ide0-1-0,id=ide0-1-0,bootindex=1 \
+-blockdev '{"driver":"file",\
+"filename":"/var/lib/libvirt/Fedora-14-x86_64-Live-KDE.iso",\
+"node-name":"libvirt-1-storage","auto-read-only":true,"discard":"unmap"}' \
+-blockdev '{"node-name":"libvirt-1-format","read-only":true,"discard":"ignore",\
+"detect-zeroes":"on","driver":"raw","file":"libvirt-1-storage"}' \
+-device ide-cd,bus=ide.1,unit=0,drive=libvirt-1-format,id=ide0-1-0,bootindex=1 \
-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3 \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,\
resourcecontrol=deny \
diff --git a/tests/qemuxml2argvdata/disk-error-policy.x86_64-latest.args b/tests/qemuxml2argvdata/disk-error-policy.x86_64-latest.args
index ea754cef0fb48eb48f46f2296b55da77af1bdbc7..2ed63972bccb3eb3cf69b924a2819e6b770b5941 100644
--- a/tests/qemuxml2argvdata/disk-error-policy.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/disk-error-policy.x86_64-latest.args
@@ -27,17 +27,29 @@ file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \
-no-acpi \
-boot strict=on \
-device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 \
--drive file=/dev/HostVG/QEMUGuest1,format=qcow2,if=none,id=drive-ide0-0-0,\
-cache=none \
--device ide-hd,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=1,\
+-blockdev '{"driver":"host_device","filename":"/dev/HostVG/QEMUGuest1",\
+"node-name":"libvirt-3-storage","cache":{"direct":true,"no-flush":false},\
+"auto-read-only":true,"discard":"unmap"}' \
+-blockdev '{"node-name":"libvirt-3-format","read-only":false,\
+"cache":{"direct":true,"no-flush":false},"driver":"qcow2",\
+"file":"libvirt-3-storage"}' \
+-device ide-hd,bus=ide.0,unit=0,drive=libvirt-3-format,id=ide0-0-0,bootindex=1,\
write-cache=on,werror=stop,rerror=stop \
--drive file=/dev/HostVG/QEMUGuest2,format=qcow2,if=none,id=drive-ide0-0-1,\
-cache=none \
--device ide-hd,bus=ide.0,unit=1,drive=drive-ide0-0-1,id=ide0-0-1,\
+-blockdev '{"driver":"host_device","filename":"/dev/HostVG/QEMUGuest2",\
+"node-name":"libvirt-2-storage","cache":{"direct":true,"no-flush":false},\
+"auto-read-only":true,"discard":"unmap"}' \
+-blockdev '{"node-name":"libvirt-2-format","read-only":false,\
+"cache":{"direct":true,"no-flush":false},"driver":"qcow2",\
+"file":"libvirt-2-storage"}' \
+-device ide-hd,bus=ide.0,unit=1,drive=libvirt-2-format,id=ide0-0-1,\
write-cache=on,werror=enospc \
--drive file=/dev/HostVG/QEMUGuest3,format=qcow2,if=none,id=drive-ide0-1-0,\
-cache=none \
--device ide-hd,bus=ide.1,unit=0,drive=drive-ide0-1-0,id=ide0-1-0,\
+-blockdev '{"driver":"host_device","filename":"/dev/HostVG/QEMUGuest3",\
+"node-name":"libvirt-1-storage","cache":{"direct":true,"no-flush":false},\
+"auto-read-only":true,"discard":"unmap"}' \
+-blockdev '{"node-name":"libvirt-1-format","read-only":false,\
+"cache":{"direct":true,"no-flush":false},"driver":"qcow2",\
+"file":"libvirt-1-storage"}' \
+-device ide-hd,bus=ide.1,unit=0,drive=libvirt-1-format,id=ide0-1-0,\
write-cache=on,werror=report,rerror=ignore \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,\
resourcecontrol=deny \
diff --git a/tests/qemuxml2argvdata/disk-floppy-q35-2_11.x86_64-latest.args b/tests/qemuxml2argvdata/disk-floppy-q35-2_11.x86_64-latest.args
index fadd5a6d7e05050ca7dcd05e58b3552edd9af243..a624998480d4cd00c636375a0d5230ba05eba736 100644
--- a/tests/qemuxml2argvdata/disk-floppy-q35-2_11.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/disk-floppy-q35-2_11.x86_64-latest.args
@@ -31,9 +31,17 @@ file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \
addr=0x1 \
-device pcie-root-port,port=0x9,chassis=2,id=pci.2,bus=pcie.0,addr=0x1.0x1 \
-device qemu-xhci,id=usb,bus=pci.1,addr=0x0 \
--drive file=/tmp/firmware.img,format=raw,if=none,id=drive-fdc0-0-0 \
--drive file=/tmp/data.img,format=qcow2,if=none,id=drive-fdc0-0-1 \
--device isa-fdc,driveA=drive-fdc0-0-0,bootindexA=1,driveB=drive-fdc0-0-1 \
+-device isa-fdc,bootindexA=1 \
+-blockdev '{"driver":"file","filename":"/tmp/firmware.img",\
+"node-name":"libvirt-2-storage","auto-read-only":true,"discard":"unmap"}' \
+-blockdev '{"node-name":"libvirt-2-format","read-only":false,"driver":"raw",\
+"file":"libvirt-2-storage"}' \
+-device floppy,unit=0,drive=libvirt-2-format,id=fdc0-0-0 \
+-blockdev '{"driver":"file","filename":"/tmp/data.img",\
+"node-name":"libvirt-1-storage","auto-read-only":true,"discard":"unmap"}' \
+-blockdev '{"node-name":"libvirt-1-format","read-only":false,"driver":"qcow2",\
+"file":"libvirt-1-storage"}' \
+-device floppy,unit=1,drive=libvirt-1-format,id=fdc0-0-1 \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,\
resourcecontrol=deny \
-msg timestamp=on
diff --git a/tests/qemuxml2argvdata/disk-floppy-q35-2_9.x86_64-latest.args b/tests/qemuxml2argvdata/disk-floppy-q35-2_9.x86_64-latest.args
index 4c932a7365b6ac2fb83d1f7fc95f3a51d531e758..ec3210cdc8a2d1284e7b5125ce3cc2d45919e370 100644
--- a/tests/qemuxml2argvdata/disk-floppy-q35-2_9.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/disk-floppy-q35-2_9.x86_64-latest.args
@@ -31,9 +31,17 @@ file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \
addr=0x1 \
-device pcie-root-port,port=0x9,chassis=2,id=pci.2,bus=pcie.0,addr=0x1.0x1 \
-device qemu-xhci,id=usb,bus=pci.1,addr=0x0 \
--drive file=/tmp/firmware.img,format=raw,if=none,id=drive-fdc0-0-0 \
--drive file=/tmp/data.img,format=qcow2,if=none,id=drive-fdc0-0-1 \
--device isa-fdc,driveA=drive-fdc0-0-0,bootindexA=1,driveB=drive-fdc0-0-1 \
+-device isa-fdc,bootindexA=1 \
+-blockdev '{"driver":"file","filename":"/tmp/firmware.img",\
+"node-name":"libvirt-2-storage","auto-read-only":true,"discard":"unmap"}' \
+-blockdev '{"node-name":"libvirt-2-format","read-only":false,"driver":"raw",\
+"file":"libvirt-2-storage"}' \
+-device floppy,unit=0,drive=libvirt-2-format,id=fdc0-0-0 \
+-blockdev '{"driver":"file","filename":"/tmp/data.img",\
+"node-name":"libvirt-1-storage","auto-read-only":true,"discard":"unmap"}' \
+-blockdev '{"node-name":"libvirt-1-format","read-only":false,"driver":"qcow2",\
+"file":"libvirt-1-storage"}' \
+-device floppy,unit=1,drive=libvirt-1-format,id=fdc0-0-1 \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,\
resourcecontrol=deny \
-msg timestamp=on
diff --git a/tests/qemuxml2argvdata/disk-floppy.x86_64-latest.args b/tests/qemuxml2argvdata/disk-floppy.x86_64-latest.args
index f2ce94a3301309015615d720a006b307a12f5ca9..1376eaeed61eb7b014a864198df851ba48366f88 100644
--- a/tests/qemuxml2argvdata/disk-floppy.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/disk-floppy.x86_64-latest.args
@@ -27,12 +27,21 @@ file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \
-no-acpi \
-boot strict=on \
-device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 \
--drive file=/dev/HostVG/QEMUGuest1,format=raw,if=none,id=drive-ide0-0-0 \
--device ide-hd,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=1 \
--drive file=/dev/fd0,format=raw,if=none,id=drive-fdc0-0-0 \
--drive file=/tmp/firmware.img,format=raw,if=none,id=drive-fdc0-0-1 \
--global isa-fdc.driveA=drive-fdc0-0-0 \
--global isa-fdc.driveB=drive-fdc0-0-1 \
+-blockdev '{"driver":"host_device","filename":"/dev/HostVG/QEMUGuest1",\
+"node-name":"libvirt-3-storage","auto-read-only":true,"discard":"unmap"}' \
+-blockdev '{"node-name":"libvirt-3-format","read-only":false,"driver":"raw",\
+"file":"libvirt-3-storage"}' \
+-device ide-hd,bus=ide.0,unit=0,drive=libvirt-3-format,id=ide0-0-0,bootindex=1 \
+-blockdev '{"driver":"host_device","filename":"/dev/fd0",\
+"node-name":"libvirt-2-storage","auto-read-only":true,"discard":"unmap"}' \
+-blockdev '{"node-name":"libvirt-2-format","read-only":false,"driver":"raw",\
+"file":"libvirt-2-storage"}' \
+-device floppy,unit=0,drive=libvirt-2-format,id=fdc0-0-0 \
+-blockdev '{"driver":"file","filename":"/tmp/firmware.img",\
+"node-name":"libvirt-1-storage","auto-read-only":true,"discard":"unmap"}' \
+-blockdev '{"node-name":"libvirt-1-format","read-only":false,"driver":"raw",\
+"file":"libvirt-1-storage"}' \
+-device floppy,unit=1,drive=libvirt-1-format,id=fdc0-0-1 \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,\
resourcecontrol=deny \
-msg timestamp=on
diff --git a/tests/qemuxml2argvdata/disk-network-gluster.x86_64-latest.args b/tests/qemuxml2argvdata/disk-network-gluster.x86_64-latest.args
index c34abe89b43630fe40da46e834d5f85195d207b7..76aeccf6d8d3fbbeb6e37035cdd7ffa79aa54e1b 100644
--- a/tests/qemuxml2argvdata/disk-network-gluster.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/disk-network-gluster.x86_64-latest.args
@@ -27,20 +27,28 @@ file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \
-no-acpi \
-boot strict=on \
-device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 \
--drive file=gluster://example.org:6000/Volume1/Image,file.debug=4,format=raw,\
-if=none,id=drive-virtio-disk0 \
--device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x2,drive=drive-virtio-disk0,\
+-blockdev '{"driver":"gluster","volume":"Volume1","path":"Image",\
+"server":[{"type":"inet","host":"example.org","port":"6000"}],"debug":4,\
+"node-name":"libvirt-3-storage","auto-read-only":true,"discard":"unmap"}' \
+-blockdev '{"node-name":"libvirt-3-format","read-only":false,"driver":"raw",\
+"file":"libvirt-3-storage"}' \
+-device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x2,drive=libvirt-3-format,\
id=virtio-disk0,bootindex=1 \
--drive 'file=gluster+unix:///Volume2/Image?socket=/path/to/sock,file.debug=4,\
-format=raw,if=none,id=drive-virtio-disk1' \
--device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x3,drive=drive-virtio-disk1,\
+-blockdev '{"driver":"gluster","volume":"Volume2","path":"Image",\
+"server":[{"type":"unix","path":"/path/to/sock"}],"debug":4,\
+"node-name":"libvirt-2-storage","auto-read-only":true,"discard":"unmap"}' \
+-blockdev '{"node-name":"libvirt-2-format","read-only":false,"driver":"raw",\
+"file":"libvirt-2-storage"}' \
+-device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x3,drive=libvirt-2-format,\
id=virtio-disk1 \
--drive file.driver=gluster,file.volume=Volume3,file.path=Image.qcow2,\
-file.server.0.type=tcp,file.server.0.host=example.org,file.server.0.port=6000,\
-file.server.1.type=tcp,file.server.1.host=example.org,file.server.1.port=24007,\
-file.server.2.type=unix,file.server.2.socket=/path/to/sock,file.debug=4,\
-format=qcow2,if=none,id=drive-virtio-disk2 \
--device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x4,drive=drive-virtio-disk2,\
+-blockdev '{"driver":"gluster","volume":"Volume3","path":"Image.qcow2",\
+"server":[{"type":"inet","host":"example.org","port":"6000"},{"type":"inet",\
+"host":"example.org","port":"24007"},{"type":"unix","path":"/path/to/sock"}],\
+"debug":4,"node-name":"libvirt-1-storage","auto-read-only":true,\
+"discard":"unmap"}' \
+-blockdev '{"node-name":"libvirt-1-format","read-only":false,"driver":"qcow2",\
+"file":"libvirt-1-storage"}' \
+-device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x4,drive=libvirt-1-format,\
id=virtio-disk2 \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,\
resourcecontrol=deny \
diff --git a/tests/qemuxml2argvdata/disk-network-iscsi.x86_64-latest.args b/tests/qemuxml2argvdata/disk-network-iscsi.x86_64-latest.args
index 19fcd97c803c744eb116d48afe179af7611f4567..5bf3e350df9b4acd1ab651981c7b415a1d5655ee 100644
--- a/tests/qemuxml2argvdata/disk-network-iscsi.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/disk-network-iscsi.x86_64-latest.args
@@ -28,39 +28,49 @@ file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \
-boot strict=on \
-device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 \
-device virtio-scsi-pci,id=scsi0,bus=pci.0,addr=0x2 \
--drive file.driver=iscsi,file.portal=example.org:6000,\
-file.target=iqn.1992-01.com.example,file.lun=0,file.transport=tcp,format=raw,\
-if=none,id=drive-virtio-disk0 \
--device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x3,drive=drive-virtio-disk0,\
+-blockdev '{"driver":"iscsi","portal":"example.org:6000",\
+"target":"iqn.1992-01.com.example","lun":0,"transport":"tcp",\
+"node-name":"libvirt-5-storage","auto-read-only":true,"discard":"unmap"}' \
+-blockdev '{"node-name":"libvirt-5-format","read-only":false,"driver":"raw",\
+"file":"libvirt-5-storage"}' \
+-device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x3,drive=libvirt-5-format,\
id=virtio-disk0,bootindex=1 \
--drive file.driver=iscsi,file.portal=example.org:6000,\
-file.target=iqn.1992-01.com.example,file.lun=1,file.transport=tcp,format=raw,\
-if=none,id=drive-virtio-disk1 \
--device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x4,drive=drive-virtio-disk1,\
+-blockdev '{"driver":"iscsi","portal":"example.org:6000",\
+"target":"iqn.1992-01.com.example","lun":1,"transport":"tcp",\
+"node-name":"libvirt-4-storage","auto-read-only":true,"discard":"unmap"}' \
+-blockdev '{"node-name":"libvirt-4-format","read-only":false,"driver":"raw",\
+"file":"libvirt-4-storage"}' \
+-device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x4,drive=libvirt-4-format,\
id=virtio-disk1 \
--object secret,id=virtio-disk2-secret0,\
+-object secret,id=libvirt-3-storage-secret0,\
data=9eao5F8qtkGt+seB1HYivWIxbtwUu6MQtg1zpj/oDtUsPr1q8wBYM91uEHCn6j/1,\
keyid=masterKey0,iv=AAECAwQFBgcICQoLDA0ODw==,format=base64 \
--drive file.driver=iscsi,file.portal=example.org:6000,\
-file.target=iqn.1992-01.com.example:storage,file.lun=1,file.transport=tcp,\
-file.user=myname,file.password-secret=virtio-disk2-secret0,format=raw,if=none,\
-id=drive-virtio-disk2 \
--device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x5,drive=drive-virtio-disk2,\
+-blockdev '{"driver":"iscsi","portal":"example.org:6000",\
+"target":"iqn.1992-01.com.example:storage","lun":1,"transport":"tcp",\
+"user":"myname","password-secret":"libvirt-3-storage-secret0",\
+"node-name":"libvirt-3-storage","auto-read-only":true,"discard":"unmap"}' \
+-blockdev '{"node-name":"libvirt-3-format","read-only":false,"driver":"raw",\
+"file":"libvirt-3-storage"}' \
+-device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x5,drive=libvirt-3-format,\
id=virtio-disk2 \
--object secret,id=virtio-disk3-secret0,\
+-object secret,id=libvirt-2-storage-secret0,\
data=9eao5F8qtkGt+seB1HYivWIxbtwUu6MQtg1zpj/oDtUsPr1q8wBYM91uEHCn6j/1,\
keyid=masterKey0,iv=AAECAwQFBgcICQoLDA0ODw==,format=base64 \
--drive file.driver=iscsi,file.portal=example.org:6000,\
-file.target=iqn.1992-01.com.example:storage,file.lun=2,file.transport=tcp,\
-file.user=myname,file.password-secret=virtio-disk3-secret0,format=raw,if=none,\
-id=drive-virtio-disk3 \
--device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x6,drive=drive-virtio-disk3,\
+-blockdev '{"driver":"iscsi","portal":"example.org:6000",\
+"target":"iqn.1992-01.com.example:storage","lun":2,"transport":"tcp",\
+"user":"myname","password-secret":"libvirt-2-storage-secret0",\
+"node-name":"libvirt-2-storage","auto-read-only":true,"discard":"unmap"}' \
+-blockdev '{"node-name":"libvirt-2-format","read-only":false,"driver":"raw",\
+"file":"libvirt-2-storage"}' \
+-device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x6,drive=libvirt-2-format,\
id=virtio-disk3 \
--drive file.driver=iscsi,file.portal=example.org:3260,\
-file.target=iqn.1992-01.com.example,file.lun=0,file.transport=tcp,format=raw,\
-if=none,id=drive-scsi0-0-0-0 \
+-blockdev '{"driver":"iscsi","portal":"example.org:3260",\
+"target":"iqn.1992-01.com.example","lun":0,"transport":"tcp",\
+"node-name":"libvirt-1-storage","auto-read-only":true,"discard":"unmap"}' \
+-blockdev '{"node-name":"libvirt-1-format","read-only":false,"driver":"raw",\
+"file":"libvirt-1-storage"}' \
-device scsi-block,bus=scsi0.0,channel=0,scsi-id=0,lun=0,\
-drive=drive-scsi0-0-0-0,id=scsi0-0-0-0 \
+drive=libvirt-1-format,id=scsi0-0-0-0 \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,\
resourcecontrol=deny \
-msg timestamp=on
diff --git a/tests/qemuxml2argvdata/disk-network-nbd.x86_64-latest.args b/tests/qemuxml2argvdata/disk-network-nbd.x86_64-latest.args
index 554387358a43378337503d8122d9da18b6581633..95ef39093c6decd6e064ff37077cde036f838e67 100644
--- a/tests/qemuxml2argvdata/disk-network-nbd.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/disk-network-nbd.x86_64-latest.args
@@ -27,22 +27,39 @@ file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \
-no-acpi \
-boot strict=on \
-device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 \
--drive file=nbd:example.org:6000,format=raw,if=none,id=drive-virtio-disk0 \
--device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x2,drive=drive-virtio-disk0,\
+-blockdev '{"driver":"nbd","server":{"type":"inet","host":"example.org",\
+"port":"6000"},"node-name":"libvirt-5-storage","auto-read-only":true,\
+"discard":"unmap"}' \
+-blockdev '{"node-name":"libvirt-5-format","read-only":false,"driver":"raw",\
+"file":"libvirt-5-storage"}' \
+-device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x2,drive=libvirt-5-format,\
id=virtio-disk0,bootindex=1 \
--drive file=nbd:example.org:6000:exportname=bar,format=raw,if=none,\
-id=drive-virtio-disk1 \
--device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x3,drive=drive-virtio-disk1,\
+-blockdev '{"driver":"nbd","server":{"type":"inet","host":"example.org",\
+"port":"6000"},"export":"bar","node-name":"libvirt-4-storage",\
+"auto-read-only":true,"discard":"unmap"}' \
+-blockdev '{"node-name":"libvirt-4-format","read-only":false,"driver":"raw",\
+"file":"libvirt-4-storage"}' \
+-device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x3,drive=libvirt-4-format,\
id=virtio-disk1 \
--drive 'file=nbd://[::1]:6000,format=raw,if=none,id=drive-virtio-disk2' \
--device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x4,drive=drive-virtio-disk2,\
+-blockdev '{"driver":"nbd","server":{"type":"inet","host":"::1","port":"6000"},\
+"node-name":"libvirt-3-storage","auto-read-only":true,"discard":"unmap"}' \
+-blockdev '{"node-name":"libvirt-3-format","read-only":false,"driver":"raw",\
+"file":"libvirt-3-storage"}' \
+-device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x4,drive=libvirt-3-format,\
id=virtio-disk2 \
--drive 'file=nbd://[::1]:6000/bar,format=raw,if=none,id=drive-virtio-disk3' \
--device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x5,drive=drive-virtio-disk3,\
+-blockdev '{"driver":"nbd","server":{"type":"inet","host":"::1","port":"6000"},\
+"export":"bar","node-name":"libvirt-2-storage","auto-read-only":true,\
+"discard":"unmap"}' \
+-blockdev '{"node-name":"libvirt-2-format","read-only":false,"driver":"raw",\
+"file":"libvirt-2-storage"}' \
+-device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x5,drive=libvirt-2-format,\
id=virtio-disk3 \
--drive file=nbd:unix:/var/run/nbdsock:exportname=bar,format=raw,if=none,\
-id=drive-virtio-disk4 \
--device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x6,drive=drive-virtio-disk4,\
+-blockdev '{"driver":"nbd","server":{"type":"unix","path":"/var/run/nbdsock"},\
+"export":"bar","node-name":"libvirt-1-storage","auto-read-only":true,\
+"discard":"unmap"}' \
+-blockdev '{"node-name":"libvirt-1-format","read-only":false,"driver":"raw",\
+"file":"libvirt-1-storage"}' \
+-device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x6,drive=libvirt-1-format,\
id=virtio-disk4 \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,\
resourcecontrol=deny \
diff --git a/tests/qemuxml2argvdata/disk-network-rbd.x86_64-latest.args b/tests/qemuxml2argvdata/disk-network-rbd.x86_64-latest.args
index 98297d8872e44418844e757b54f4245f060382f6..28cea02729831bbe8d3161fef5709119f802ec21 100644
--- a/tests/qemuxml2argvdata/disk-network-rbd.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/disk-network-rbd.x86_64-latest.args
@@ -27,37 +27,56 @@ file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \
-no-acpi \
-boot strict=on \
-device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 \
--drive 'file=rbd:pool/image:auth_supported=none:mon_host=mon1.example.org\:\
-6321\;mon2.example.org\:6322\;mon3.example.org\:6322,format=raw,if=none,\
-id=drive-virtio-disk0' \
--device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x2,drive=drive-virtio-disk0,\
+-blockdev '{"driver":"rbd","pool":"pool","image":"image",\
+"server":[{"host":"mon1.example.org","port":"6321"},{"host":"mon2.example.org",\
+"port":"6322"},{"host":"mon3.example.org","port":"6322"}],\
+"node-name":"libvirt-6-storage","auto-read-only":true,"discard":"unmap"}' \
+-blockdev '{"node-name":"libvirt-6-format","read-only":false,"driver":"raw",\
+"file":"libvirt-6-storage"}' \
+-device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x2,drive=libvirt-6-format,\
id=virtio-disk0,bootindex=1 \
--drive file=rbd:pool/image@asdf:auth_supported=none,format=raw,if=none,\
-id=drive-virtio-disk1 \
--device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x3,drive=drive-virtio-disk1,\
+-blockdev '{"driver":"rbd","pool":"pool","image":"image","snapshot":"asdf",\
+"node-name":"libvirt-5-storage","auto-read-only":true,"discard":"unmap"}' \
+-blockdev '{"node-name":"libvirt-5-format","read-only":false,"driver":"raw",\
+"file":"libvirt-5-storage"}' \
+-device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x3,drive=libvirt-5-format,\
id=virtio-disk1 \
--drive 'file=rbd:pool/image@foo:auth_supported=none:mon_host=mon1.example.org\:\
-6321\;mon2.example.org\:6322\;mon3.example.org\:6322,format=raw,if=none,\
-id=drive-virtio-disk2' \
--device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x4,drive=drive-virtio-disk2,\
+-blockdev '{"driver":"rbd","pool":"pool","image":"image","snapshot":"foo",\
+"server":[{"host":"mon1.example.org","port":"6321"},{"host":"mon2.example.org",\
+"port":"6322"},{"host":"mon3.example.org","port":"6322"}],\
+"node-name":"libvirt-4-storage","auto-read-only":true,"discard":"unmap"}' \
+-blockdev '{"node-name":"libvirt-4-format","read-only":false,"driver":"raw",\
+"file":"libvirt-4-storage"}' \
+-device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x4,drive=libvirt-4-format,\
id=virtio-disk2 \
--drive file=rbd:pool/image@foo:auth_supported=none:conf=/blah/test.conf,\
-format=raw,if=none,id=drive-virtio-disk3 \
--device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x5,drive=drive-virtio-disk3,\
+-blockdev '{"driver":"rbd","pool":"pool","image":"image","snapshot":"foo",\
+"conf":"/blah/test.conf","node-name":"libvirt-3-storage","auto-read-only":true,\
+"discard":"unmap"}' \
+-blockdev '{"node-name":"libvirt-3-format","read-only":false,"driver":"raw",\
+"file":"libvirt-3-storage"}' \
+-device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x5,drive=libvirt-3-format,\
id=virtio-disk3 \
--object secret,id=virtio-disk4-secret0,\
+-object secret,id=libvirt-2-storage-secret0,\
data=9eao5F8qtkGt+seB1HYivWIxbtwUu6MQtg1zpj/oDtUsPr1q8wBYM91uEHCn6j/1,\
keyid=masterKey0,iv=AAECAwQFBgcICQoLDA0ODw==,format=base64 \
--drive 'file=rbd:pool/image:id=myname:auth_supported=cephx\;none:\
-mon_host=mon1.example.org\:6321\;mon2.example.org\:6322\;mon3.example.org\:\
-6322,file.password-secret=virtio-disk4-secret0,format=raw,if=none,\
-id=drive-virtio-disk4' \
--device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x6,drive=drive-virtio-disk4,\
+-blockdev '{"driver":"rbd","pool":"pool","image":"image",\
+"server":[{"host":"mon1.example.org","port":"6321"},{"host":"mon2.example.org",\
+"port":"6322"},{"host":"mon3.example.org","port":"6322"}],"user":"myname",\
+"auth-client-required":["cephx","none"],\
+"key-secret":"libvirt-2-storage-secret0","node-name":"libvirt-2-storage",\
+"auto-read-only":true,"discard":"unmap"}' \
+-blockdev '{"node-name":"libvirt-2-format","read-only":false,"driver":"raw",\
+"file":"libvirt-2-storage"}' \
+-device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x6,drive=libvirt-2-format,\
id=virtio-disk4 \
--drive 'file=rbd:pool/image:auth_supported=none:mon_host=[\:\:1]\:\
-6321\;example.org\:6789\;[ffff\:1234\:567\:abc\:\:0f]\:6322\;[2001\:db8\:\:\
-ff00\:42\:8329]\:6322,format=raw,if=none,id=drive-virtio-disk5' \
--device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x7,drive=drive-virtio-disk5,\
+-blockdev '{"driver":"rbd","pool":"pool","image":"image",\
+"server":[{"host":"::1","port":"6321"},{"host":"example.org","port":"6789"},\
+{"host":"ffff:1234:567:abc::0f","port":"6322"},\
+{"host":"2001:db8::ff00:42:8329","port":"6322"}],\
+"node-name":"libvirt-1-storage","auto-read-only":true,"discard":"unmap"}' \
+-blockdev '{"node-name":"libvirt-1-format","read-only":false,"driver":"raw",\
+"file":"libvirt-1-storage"}' \
+-device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x7,drive=libvirt-1-format,\
id=virtio-disk5 \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,\
resourcecontrol=deny \
diff --git a/tests/qemuxml2argvdata/disk-network-sheepdog.x86_64-latest.args b/tests/qemuxml2argvdata/disk-network-sheepdog.x86_64-latest.args
index 011c02ba883321fee1fa8b82cd01d6f50dd5c2fa..c2b1156f0c94f4207e5fba2f2762328eadf786b3 100644
--- a/tests/qemuxml2argvdata/disk-network-sheepdog.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/disk-network-sheepdog.x86_64-latest.args
@@ -27,11 +27,17 @@ file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \
-no-acpi \
-boot strict=on \
-device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 \
--drive file=/dev/HostVG/QEMU,,Guest,,,,1,format=raw,if=none,id=drive-ide0-0-0 \
--device ide-hd,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=1 \
--drive file=sheepdog:example.org:6000:image,,with,,commas,format=raw,if=none,\
-id=drive-virtio-disk0 \
--device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x2,drive=drive-virtio-disk0,\
+-blockdev '{"driver":"host_device","filename":"/dev/HostVG/QEMU,Guest,,1",\
+"node-name":"libvirt-2-storage","auto-read-only":true,"discard":"unmap"}' \
+-blockdev '{"node-name":"libvirt-2-format","read-only":false,"driver":"raw",\
+"file":"libvirt-2-storage"}' \
+-device ide-hd,bus=ide.0,unit=0,drive=libvirt-2-format,id=ide0-0-0,bootindex=1 \
+-blockdev '{"driver":"sheepdog","server":{"type":"inet","host":"example.org",\
+"port":"6000"},"vdi":"image,with,commas","node-name":"libvirt-1-storage",\
+"auto-read-only":true,"discard":"unmap"}' \
+-blockdev '{"node-name":"libvirt-1-format","read-only":false,"driver":"raw",\
+"file":"libvirt-1-storage"}' \
+-device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x2,drive=libvirt-1-format,\
id=virtio-disk0 \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,\
resourcecontrol=deny \
diff --git a/tests/qemuxml2argvdata/disk-network-source-auth.x86_64-latest.args b/tests/qemuxml2argvdata/disk-network-source-auth.x86_64-latest.args
index 9bc67a1c40aee2aa13de2c2c7505e90445c0ded3..357a277c46d1700b69bdc3f1cada181dbe84a879 100644
--- a/tests/qemuxml2argvdata/disk-network-source-auth.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/disk-network-source-auth.x86_64-latest.args
@@ -27,23 +27,29 @@ file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \
-no-acpi \
-boot strict=on \
-device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 \
--object secret,id=virtio-disk0-secret0,\
+-object secret,id=libvirt-2-storage-secret0,\
data=9eao5F8qtkGt+seB1HYivWIxbtwUu6MQtg1zpj/oDtUsPr1q8wBYM91uEHCn6j/1,\
keyid=masterKey0,iv=AAECAwQFBgcICQoLDA0ODw==,format=base64 \
--drive file.driver=iscsi,file.portal=example.org:6000,\
-file.target=iqn.1992-01.com.example:storage,file.lun=1,file.transport=tcp,\
-file.user=myname,file.password-secret=virtio-disk0-secret0,format=raw,if=none,\
-id=drive-virtio-disk0 \
--device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x2,drive=drive-virtio-disk0,\
+-blockdev '{"driver":"iscsi","portal":"example.org:6000",\
+"target":"iqn.1992-01.com.example:storage","lun":1,"transport":"tcp",\
+"user":"myname","password-secret":"libvirt-2-storage-secret0",\
+"node-name":"libvirt-2-storage","auto-read-only":true,"discard":"unmap"}' \
+-blockdev '{"node-name":"libvirt-2-format","read-only":false,"driver":"raw",\
+"file":"libvirt-2-storage"}' \
+-device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x2,drive=libvirt-2-format,\
id=virtio-disk0,bootindex=1 \
--object secret,id=virtio-disk1-secret0,\
+-object secret,id=libvirt-1-storage-secret0,\
data=9eao5F8qtkGt+seB1HYivWIxbtwUu6MQtg1zpj/oDtUsPr1q8wBYM91uEHCn6j/1,\
keyid=masterKey0,iv=AAECAwQFBgcICQoLDA0ODw==,format=base64 \
--drive 'file=rbd:pool/image:id=myname:auth_supported=cephx\;none:\
-mon_host=mon1.example.org\:6321\;mon2.example.org\:6322\;mon3.example.org\:\
-6322,file.password-secret=virtio-disk1-secret0,format=raw,if=none,\
-id=drive-virtio-disk1' \
--device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x3,drive=drive-virtio-disk1,\
+-blockdev '{"driver":"rbd","pool":"pool","image":"image",\
+"server":[{"host":"mon1.example.org","port":"6321"},{"host":"mon2.example.org",\
+"port":"6322"},{"host":"mon3.example.org","port":"6322"}],"user":"myname",\
+"auth-client-required":["cephx","none"],\
+"key-secret":"libvirt-1-storage-secret0","node-name":"libvirt-1-storage",\
+"auto-read-only":true,"discard":"unmap"}' \
+-blockdev '{"node-name":"libvirt-1-format","read-only":false,"driver":"raw",\
+"file":"libvirt-1-storage"}' \
+-device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x3,drive=libvirt-1-format,\
id=virtio-disk1 \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,\
resourcecontrol=deny \
diff --git a/tests/qemuxml2argvdata/disk-network-tlsx509.x86_64-latest.args b/tests/qemuxml2argvdata/disk-network-tlsx509.x86_64-latest.args
index c043de80d88866773230ab3852d2c41ebec41c74..fa729cb6e8db45df0b35abb20cf1e3a27e65b261 100644
--- a/tests/qemuxml2argvdata/disk-network-tlsx509.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/disk-network-tlsx509.x86_64-latest.args
@@ -28,34 +28,50 @@ file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \
-no-acpi \
-boot strict=on \
-device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 \
--object tls-creds-x509,id=objvirtio-disk0_tls0,dir=/etc/pki/libvirt-vxhs/dummy,\
-,path,endpoint=client,verify-peer=yes \
--drive file.driver=vxhs,file.tls-creds=objvirtio-disk0_tls0,\
-file.vdisk-id=eb90327c-8302-4725-9e1b-4e85ed4dc251,\
-file.server.host=192.168.0.1,file.server.port=9999,format=raw,if=none,\
-id=drive-virtio-disk0,cache=none \
--device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x4,drive=drive-virtio-disk0,\
+-object tls-creds-x509,id=objlibvirt-4-storage_tls0,\
+dir=/etc/pki/libvirt-vxhs/dummy,,path,endpoint=client,verify-peer=yes \
+-blockdev '{"driver":"vxhs","tls-creds":"objlibvirt-4-storage_tls0",\
+"vdisk-id":"eb90327c-8302-4725-9e1b-4e85ed4dc251",\
+"server":{"host":"192.168.0.1","port":"9999"},"node-name":"libvirt-4-storage",\
+"cache":{"direct":true,"no-flush":false},"auto-read-only":true,\
+"discard":"unmap"}' \
+-blockdev '{"node-name":"libvirt-4-format","read-only":false,\
+"cache":{"direct":true,"no-flush":false},"driver":"raw",\
+"file":"libvirt-4-storage"}' \
+-device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x4,drive=libvirt-4-format,\
id=virtio-disk0,bootindex=1,write-cache=on,\
serial=eb90327c-8302-4725-9e1b-4e85ed4dc251 \
--object tls-creds-x509,id=objvirtio-disk1_tls0,dir=/etc/pki/libvirt-vxhs/dummy,\
-,path,endpoint=client,verify-peer=yes \
--drive file.driver=vxhs,file.tls-creds=objvirtio-disk1_tls0,\
-file.vdisk-id=eb90327c-8302-4725-9e1b-4e85ed4dc252,\
-file.server.host=192.168.0.2,file.server.port=9999,format=raw,if=none,\
-id=drive-virtio-disk1,cache=none \
--device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x5,drive=drive-virtio-disk1,\
+-object tls-creds-x509,id=objlibvirt-3-storage_tls0,\
+dir=/etc/pki/libvirt-vxhs/dummy,,path,endpoint=client,verify-peer=yes \
+-blockdev '{"driver":"vxhs","tls-creds":"objlibvirt-3-storage_tls0",\
+"vdisk-id":"eb90327c-8302-4725-9e1b-4e85ed4dc252",\
+"server":{"host":"192.168.0.2","port":"9999"},"node-name":"libvirt-3-storage",\
+"cache":{"direct":true,"no-flush":false},"auto-read-only":true,\
+"discard":"unmap"}' \
+-blockdev '{"node-name":"libvirt-3-format","read-only":false,\
+"cache":{"direct":true,"no-flush":false},"driver":"raw",\
+"file":"libvirt-3-storage"}' \
+-device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x5,drive=libvirt-3-format,\
id=virtio-disk1,write-cache=on,serial=eb90327c-8302-4725-9e1b-4e85ed4dc252 \
--drive file.driver=vxhs,file.vdisk-id=eb90327c-8302-4725-9e1b-4e85ed4dc253,\
-file.server.host=192.168.0.3,file.server.port=9999,format=raw,if=none,\
-id=drive-virtio-disk2,cache=none \
--device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x6,drive=drive-virtio-disk2,\
+-blockdev '{"driver":"vxhs","vdisk-id":"eb90327c-8302-4725-9e1b-4e85ed4dc253",\
+"server":{"host":"192.168.0.3","port":"9999"},"node-name":"libvirt-2-storage",\
+"cache":{"direct":true,"no-flush":false},"auto-read-only":true,\
+"discard":"unmap"}' \
+-blockdev '{"node-name":"libvirt-2-format","read-only":false,\
+"cache":{"direct":true,"no-flush":false},"driver":"raw",\
+"file":"libvirt-2-storage"}' \
+-device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x6,drive=libvirt-2-format,\
id=virtio-disk2,write-cache=on,serial=eb90327c-8302-4725-9e1b-4e85ed4dc252 \
--object tls-creds-x509,id=objvirtio-disk3_tls0,dir=/etc/pki/libvirt-nbd/dummy,,\
-path,endpoint=client,verify-peer=yes \
--drive file.driver=nbd,file.server.type=inet,file.server.host=example.com,\
-file.server.port=1234,file.tls-creds=objvirtio-disk3_tls0,format=raw,if=none,\
-id=drive-virtio-disk3,cache=none \
--device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x7,drive=drive-virtio-disk3,\
+-object tls-creds-x509,id=objlibvirt-1-storage_tls0,\
+dir=/etc/pki/libvirt-nbd/dummy,,path,endpoint=client,verify-peer=yes \
+-blockdev '{"driver":"nbd","server":{"type":"inet","host":"example.com",\
+"port":"1234"},"tls-creds":"objlibvirt-1-storage_tls0",\
+"node-name":"libvirt-1-storage","cache":{"direct":true,"no-flush":false},\
+"auto-read-only":true,"discard":"unmap"}' \
+-blockdev '{"node-name":"libvirt-1-format","read-only":false,\
+"cache":{"direct":true,"no-flush":false},"driver":"raw",\
+"file":"libvirt-1-storage"}' \
+-device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x7,drive=libvirt-1-format,\
id=virtio-disk3,write-cache=on \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,\
resourcecontrol=deny \
diff --git a/tests/qemuxml2argvdata/disk-readonly-disk.x86_64-latest.args b/tests/qemuxml2argvdata/disk-readonly-disk.x86_64-latest.args
index c325c6fe766584877c09f8c9b361f568b53a81d8..5ca36c08716cf3eee7151bc2402a01ac3fc2aabe 100644
--- a/tests/qemuxml2argvdata/disk-readonly-disk.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/disk-readonly-disk.x86_64-latest.args
@@ -27,10 +27,16 @@ file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \
-no-acpi \
-boot strict=on \
-device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 \
--drive file=/dev/HostVG/QEMUGuest1,format=raw,if=none,id=drive-ide0-0-0 \
--device ide-hd,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=1 \
--drive file=/dev/sr0,format=raw,if=none,id=drive-ide0-1-0,readonly=on \
--device ide-cd,bus=ide.1,unit=0,drive=drive-ide0-1-0,id=ide0-1-0 \
+-blockdev '{"driver":"host_device","filename":"/dev/HostVG/QEMUGuest1",\
+"node-name":"libvirt-2-storage","auto-read-only":true,"discard":"unmap"}' \
+-blockdev '{"node-name":"libvirt-2-format","read-only":false,"driver":"raw",\
+"file":"libvirt-2-storage"}' \
+-device ide-hd,bus=ide.0,unit=0,drive=libvirt-2-format,id=ide0-0-0,bootindex=1 \
+-blockdev '{"driver":"host_device","filename":"/dev/sr0",\
+"node-name":"libvirt-1-storage","auto-read-only":true,"discard":"unmap"}' \
+-blockdev '{"node-name":"libvirt-1-format","read-only":true,"driver":"raw",\
+"file":"libvirt-1-storage"}' \
+-device ide-cd,bus=ide.1,unit=0,drive=libvirt-1-format,id=ide0-1-0 \
-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x2 \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,\
resourcecontrol=deny \
diff --git a/tests/qemuxml2argvdata/disk-scsi-device-auto.x86_64-latest.args b/tests/qemuxml2argvdata/disk-scsi-device-auto.x86_64-latest.args
index 9661115009ca04b142204f8cb6f113b7e26ee1ab..7cff9c94b646a6456a10d13d5b0b71a4c617c6ab 100644
--- a/tests/qemuxml2argvdata/disk-scsi-device-auto.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/disk-scsi-device-auto.x86_64-latest.args
@@ -28,11 +28,17 @@ file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \
-boot strict=on \
-device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 \
-device lsi,id=scsi0,bus=pci.0,addr=0x2 \
--drive file=/dev/HostVG/QEMUGuest1,format=raw,if=none,id=drive-ide0-0-0 \
--device ide-hd,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=1 \
--drive file=/tmp/scsidisk.img,format=raw,if=none,id=drive-scsi0-0-0 \
+-blockdev '{"driver":"host_device","filename":"/dev/HostVG/QEMUGuest1",\
+"node-name":"libvirt-2-storage","auto-read-only":true,"discard":"unmap"}' \
+-blockdev '{"node-name":"libvirt-2-format","read-only":false,"driver":"raw",\
+"file":"libvirt-2-storage"}' \
+-device ide-hd,bus=ide.0,unit=0,drive=libvirt-2-format,id=ide0-0-0,bootindex=1 \
+-blockdev '{"driver":"file","filename":"/tmp/scsidisk.img",\
+"node-name":"libvirt-1-storage","auto-read-only":true,"discard":"unmap"}' \
+-blockdev '{"node-name":"libvirt-1-format","read-only":false,"driver":"raw",\
+"file":"libvirt-1-storage"}' \
-device scsi-hd,bus=scsi0.0,scsi-id=0,device_id=drive-scsi0-0-0,\
-drive=drive-scsi0-0-0,id=scsi0-0-0 \
+drive=libvirt-1-format,id=scsi0-0-0 \
-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3 \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,\
resourcecontrol=deny \
diff --git a/tests/qemuxml2argvdata/disk-scsi.x86_64-latest.args b/tests/qemuxml2argvdata/disk-scsi.x86_64-latest.args
index 7bf011fd5f5b58da1e764f27059c384cd74ef830..ad07d206d66c779741797ef316c3dd0545206cd4 100644
--- a/tests/qemuxml2argvdata/disk-scsi.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/disk-scsi.x86_64-latest.args
@@ -31,21 +31,36 @@ file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \
-device megasas,id=scsi1,bus=pci.0,addr=0x3 \
-device mptsas1068,id=scsi2,bus=pci.0,addr=0x4 \
-device spapr-vscsi,id=scsi3,reg=0x00002000 \
--drive file=/dev/HostVG/QEMUGuest1,format=raw,if=none,id=drive-ide0-0-0 \
--device ide-hd,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=1 \
--drive file=/tmp/scsidisk.img,format=raw,if=none,id=drive-scsi0-0-0 \
+-blockdev '{"driver":"host_device","filename":"/dev/HostVG/QEMUGuest1",\
+"node-name":"libvirt-5-storage","auto-read-only":true,"discard":"unmap"}' \
+-blockdev '{"node-name":"libvirt-5-format","read-only":false,"driver":"raw",\
+"file":"libvirt-5-storage"}' \
+-device ide-hd,bus=ide.0,unit=0,drive=libvirt-5-format,id=ide0-0-0,bootindex=1 \
+-blockdev '{"driver":"file","filename":"/tmp/scsidisk.img",\
+"node-name":"libvirt-4-storage","auto-read-only":true,"discard":"unmap"}' \
+-blockdev '{"node-name":"libvirt-4-format","read-only":false,"driver":"raw",\
+"file":"libvirt-4-storage"}' \
-device scsi-hd,bus=scsi0.0,scsi-id=0,device_id=drive-scsi0-0-0,\
-drive=drive-scsi0-0-0,id=scsi0-0-0 \
--drive file=/tmp/scsidisk2.img,format=raw,if=none,id=drive-scsi1-0-0-0 \
+drive=libvirt-4-format,id=scsi0-0-0 \
+-blockdev '{"driver":"file","filename":"/tmp/scsidisk2.img",\
+"node-name":"libvirt-3-storage","auto-read-only":true,"discard":"unmap"}' \
+-blockdev '{"node-name":"libvirt-3-format","read-only":false,"driver":"raw",\
+"file":"libvirt-3-storage"}' \
-device scsi-hd,bus=scsi1.0,channel=0,scsi-id=0,lun=0,device_id=abcdefghijklmn,\
-drive=drive-scsi1-0-0-0,id=scsi1-0-0-0,serial=abcdefghijklmn \
--drive file=/tmp/scsidisk3.img,format=raw,if=none,id=drive-scsi2-0-0-0 \
+drive=libvirt-3-format,id=scsi1-0-0-0,serial=abcdefghijklmn \
+-blockdev '{"driver":"file","filename":"/tmp/scsidisk3.img",\
+"node-name":"libvirt-2-storage","auto-read-only":true,"discard":"unmap"}' \
+-blockdev '{"node-name":"libvirt-2-format","read-only":false,"driver":"raw",\
+"file":"libvirt-2-storage"}' \
-device scsi-hd,bus=scsi2.0,channel=0,scsi-id=0,lun=0,\
-device_id=drive-scsi2-0-0-0,drive=drive-scsi2-0-0-0,id=scsi2-0-0-0,\
+device_id=drive-scsi2-0-0-0,drive=libvirt-2-format,id=scsi2-0-0-0,\
wwn=0x5000c50015ea71ac \
--drive file=/tmp/scsidisk4.img,format=raw,if=none,id=drive-scsi3-0-0-0 \
+-blockdev '{"driver":"file","filename":"/tmp/scsidisk4.img",\
+"node-name":"libvirt-1-storage","auto-read-only":true,"discard":"unmap"}' \
+-blockdev '{"node-name":"libvirt-1-format","read-only":false,"driver":"raw",\
+"file":"libvirt-1-storage"}' \
-device scsi-hd,bus=scsi3.0,channel=0,scsi-id=0,lun=0,\
-device_id=drive-scsi3-0-0-0,drive=drive-scsi3-0-0-0,id=scsi3-0-0-0 \
+device_id=drive-scsi3-0-0-0,drive=libvirt-1-format,id=scsi3-0-0-0 \
-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x5 \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,\
resourcecontrol=deny \
diff --git a/tests/qemuxml2argvdata/disk-shared.x86_64-latest.args b/tests/qemuxml2argvdata/disk-shared.x86_64-latest.args
index afc25494423e4c9163d11211b72f915abdac9091..375e2de5608175aa4674dd7488732a210a84f0c3 100644
--- a/tests/qemuxml2argvdata/disk-shared.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/disk-shared.x86_64-latest.args
@@ -28,20 +28,36 @@ file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \
-boot strict=on \
-device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 \
-device virtio-scsi-pci,id=scsi0,bus=pci.0,addr=0x2 \
--drive file=/dev/HostVG/QEMUGuest1,format=raw,if=none,id=drive-ide0-0-0,\
-cache=none \
--device ide-hd,bus=ide.0,unit=0,share-rw=on,drive=drive-ide0-0-0,id=ide0-0-0,\
+-blockdev '{"driver":"host_device","filename":"/dev/HostVG/QEMUGuest1",\
+"node-name":"libvirt-4-storage","cache":{"direct":true,"no-flush":false},\
+"auto-read-only":true,"discard":"unmap"}' \
+-blockdev '{"node-name":"libvirt-4-format","read-only":false,\
+"cache":{"direct":true,"no-flush":false},"driver":"raw",\
+"file":"libvirt-4-storage"}' \
+-device ide-hd,bus=ide.0,unit=0,share-rw=on,drive=libvirt-4-format,id=ide0-0-0,\
bootindex=1,write-cache=on,serial=XYZXYZXYZYXXYZYZYXYZY \
--drive file=/dev/HostVG/QEMUGuest2,format=raw,if=none,id=drive-ide0-1-0,\
-readonly=on \
--device ide-cd,bus=ide.1,unit=0,drive=drive-ide0-1-0,id=ide0-1-0 \
--drive file=/dev/scsi,format=raw,if=none,id=drive-scsi0-0-0-0,cache=none \
+-blockdev '{"driver":"host_device","filename":"/dev/HostVG/QEMUGuest2",\
+"node-name":"libvirt-3-storage","auto-read-only":true,"discard":"unmap"}' \
+-blockdev '{"node-name":"libvirt-3-format","read-only":true,"driver":"raw",\
+"file":"libvirt-3-storage"}' \
+-device ide-cd,bus=ide.1,unit=0,drive=libvirt-3-format,id=ide0-1-0 \
+-blockdev '{"driver":"host_device","filename":"/dev/scsi",\
+"node-name":"libvirt-2-storage","cache":{"direct":true,"no-flush":false},\
+"auto-read-only":true,"discard":"unmap"}' \
+-blockdev '{"node-name":"libvirt-2-format","read-only":false,\
+"cache":{"direct":true,"no-flush":false},"driver":"raw",\
+"file":"libvirt-2-storage"}' \
-device scsi-hd,bus=scsi0.0,channel=0,scsi-id=0,lun=0,\
-device_id=drive-scsi0-0-0-0,share-rw=on,drive=drive-scsi0-0-0-0,id=scsi0-0-0-0,\
+device_id=drive-scsi0-0-0-0,share-rw=on,drive=libvirt-2-format,id=scsi0-0-0-0,\
write-cache=on \
--drive file=/dev/virtio,format=raw,if=none,id=drive-virtio-disk0,cache=none \
+-blockdev '{"driver":"host_device","filename":"/dev/virtio",\
+"node-name":"libvirt-1-storage","cache":{"direct":true,"no-flush":false},\
+"auto-read-only":true,"discard":"unmap"}' \
+-blockdev '{"node-name":"libvirt-1-format","read-only":false,\
+"cache":{"direct":true,"no-flush":false},"driver":"raw",\
+"file":"libvirt-1-storage"}' \
-device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x3,share-rw=on,\
-drive=drive-virtio-disk0,id=virtio-disk0,write-cache=on \
+drive=libvirt-1-format,id=virtio-disk0,write-cache=on \
-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x4 \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,\
resourcecontrol=deny \
diff --git a/tests/qemuxml2argvdata/disk-virtio-scsi-reservations.x86_64-latest.args b/tests/qemuxml2argvdata/disk-virtio-scsi-reservations.x86_64-latest.args
index 746dbdedfe4a9c69b6749a8179f6a56a8ede4f63..bd07929eec1a395e7b3423b400acdab0a18ba97d 100644
--- a/tests/qemuxml2argvdata/disk-virtio-scsi-reservations.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/disk-virtio-scsi-reservations.x86_64-latest.args
@@ -30,16 +30,22 @@ path=/tmp/lib/domain--1-QEMUGuest1/pr-helper0.sock \
-boot strict=on \
-device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 \
-device virtio-scsi-pci,id=scsi0,num_queues=8,bus=pci.0,addr=0x3 \
--drive file=/dev/HostVG/QEMUGuest1,file.pr-manager=pr-helper0,format=raw,\
-if=none,id=drive-scsi0-0-0-0 \
+-blockdev '{"driver":"host_device","filename":"/dev/HostVG/QEMUGuest1",\
+"pr-manager":"pr-helper0","node-name":"libvirt-2-storage",\
+"auto-read-only":true,"discard":"unmap"}' \
+-blockdev '{"node-name":"libvirt-2-format","read-only":false,"driver":"raw",\
+"file":"libvirt-2-storage"}' \
-device scsi-block,bus=scsi0.0,channel=0,scsi-id=0,lun=0,\
-drive=drive-scsi0-0-0-0,id=scsi0-0-0-0,bootindex=1 \
--object pr-manager-helper,id=pr-helper-scsi0-0-0-1,\
+drive=libvirt-2-format,id=scsi0-0-0-0,bootindex=1 \
+-object pr-manager-helper,id=pr-helper-libvirt-1-storage,\
path=/path/to/qemu-pr-helper.sock \
--drive file=/dev/HostVG/QEMUGuest2,file.pr-manager=pr-helper-scsi0-0-0-1,\
-format=raw,if=none,id=drive-scsi0-0-0-1 \
+-blockdev '{"driver":"host_device","filename":"/dev/HostVG/QEMUGuest2",\
+"pr-manager":"pr-helper-libvirt-1-storage","node-name":"libvirt-1-storage",\
+"auto-read-only":true,"discard":"unmap"}' \
+-blockdev '{"node-name":"libvirt-1-format","read-only":false,"driver":"raw",\
+"file":"libvirt-1-storage"}' \
-device scsi-block,bus=scsi0.0,channel=0,scsi-id=0,lun=1,\
-drive=drive-scsi0-0-0-1,id=scsi0-0-0-1 \
+drive=libvirt-1-format,id=scsi0-0-0-1 \
-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x4 \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,\
resourcecontrol=deny \
diff --git a/tests/qemuxml2argvdata/floppy-drive-fat.x86_64-latest.args b/tests/qemuxml2argvdata/floppy-drive-fat.x86_64-latest.args
index 2e6f893fad30774924aff8508d9c2b4230830eea..1bf202659ed92b5b422be7b240bc968a40d144d5 100644
--- a/tests/qemuxml2argvdata/floppy-drive-fat.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/floppy-drive-fat.x86_64-latest.args
@@ -27,9 +27,12 @@ file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \
-no-acpi \
-boot strict=on \
-device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 \
--drive file=fat:floppy:/var/somefiles,if=none,id=drive-fdc0-0-0,readonly=on \
--global isa-fdc.driveA=drive-fdc0-0-0 \
-global isa-fdc.bootindexA=1 \
+-blockdev '{"driver":"vvfat","dir":"/var/somefiles","floppy":true,"rw":false,\
+"node-name":"libvirt-1-storage","auto-read-only":true,"discard":"unmap"}' \
+-blockdev '{"node-name":"libvirt-1-format","read-only":true,"driver":"raw",\
+"file":"libvirt-1-storage"}' \
+-device floppy,unit=0,drive=libvirt-1-format,id=fdc0-0-0 \
-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x2 \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,\
resourcecontrol=deny \
diff --git a/tests/qemuxml2argvdata/graphics-egl-headless-rendernode.x86_64-latest.args b/tests/qemuxml2argvdata/graphics-egl-headless-rendernode.x86_64-latest.args
index c78272eadc4d93be5bd4b85fb54038261bb66697..d7b86e627052b12349874e7f393c0a5f9ea17d24 100644
--- a/tests/qemuxml2argvdata/graphics-egl-headless-rendernode.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/graphics-egl-headless-rendernode.x86_64-latest.args
@@ -25,8 +25,11 @@ file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \
-no-acpi \
-boot strict=on \
-device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 \
--drive file=/dev/HostVG/QEMUGuest1,format=raw,if=none,id=drive-ide0-0-0 \
--device ide-hd,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=1 \
+-blockdev '{"driver":"host_device","filename":"/dev/HostVG/QEMUGuest1",\
+"node-name":"libvirt-1-storage","auto-read-only":true,"discard":"unmap"}' \
+-blockdev '{"node-name":"libvirt-1-format","read-only":false,"driver":"raw",\
+"file":"libvirt-1-storage"}' \
+-device ide-hd,bus=ide.0,unit=0,drive=libvirt-1-format,id=ide0-0-0,bootindex=1 \
-display egl-headless,rendernode=/dev/dri/foo \
-device cirrus-vga,id=video0,bus=pci.0,addr=0x2 \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,\
diff --git a/tests/qemuxml2argvdata/graphics-egl-headless.x86_64-latest.args b/tests/qemuxml2argvdata/graphics-egl-headless.x86_64-latest.args
index c78272eadc4d93be5bd4b85fb54038261bb66697..d7b86e627052b12349874e7f393c0a5f9ea17d24 100644
--- a/tests/qemuxml2argvdata/graphics-egl-headless.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/graphics-egl-headless.x86_64-latest.args
@@ -25,8 +25,11 @@ file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \
-no-acpi \
-boot strict=on \
-device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 \
--drive file=/dev/HostVG/QEMUGuest1,format=raw,if=none,id=drive-ide0-0-0 \
--device ide-hd,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=1 \
+-blockdev '{"driver":"host_device","filename":"/dev/HostVG/QEMUGuest1",\
+"node-name":"libvirt-1-storage","auto-read-only":true,"discard":"unmap"}' \
+-blockdev '{"node-name":"libvirt-1-format","read-only":false,"driver":"raw",\
+"file":"libvirt-1-storage"}' \
+-device ide-hd,bus=ide.0,unit=0,drive=libvirt-1-format,id=ide0-0-0,bootindex=1 \
-display egl-headless,rendernode=/dev/dri/foo \
-device cirrus-vga,id=video0,bus=pci.0,addr=0x2 \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,\
diff --git a/tests/qemuxml2argvdata/iothreads-virtio-scsi-pci.x86_64-latest.args b/tests/qemuxml2argvdata/iothreads-virtio-scsi-pci.x86_64-latest.args
index bc66de1f76e8bca93f08b1373c3682f50814e41d..df4c565a17bef83d4c987a7c19a8c3201ef2280c 100644
--- a/tests/qemuxml2argvdata/iothreads-virtio-scsi-pci.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/iothreads-virtio-scsi-pci.x86_64-latest.args
@@ -30,16 +30,25 @@ file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \
-boot strict=on \
-device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 \
-device virtio-scsi-pci,iothread=iothread2,id=scsi0,bus=pci.0,addr=0xb \
--drive file=/dev/HostVG/QEMUGuest1,format=raw,if=none,id=drive-ide0-0-0 \
--device ide-hd,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=1 \
--drive file=/var/lib/libvirt/images/iothrtest1.img,format=raw,if=none,\
-id=drive-virtio-disk1 \
+-blockdev '{"driver":"host_device","filename":"/dev/HostVG/QEMUGuest1",\
+"node-name":"libvirt-3-storage","auto-read-only":true,"discard":"unmap"}' \
+-blockdev '{"node-name":"libvirt-3-format","read-only":false,"driver":"raw",\
+"file":"libvirt-3-storage"}' \
+-device ide-hd,bus=ide.0,unit=0,drive=libvirt-3-format,id=ide0-0-0,bootindex=1 \
+-blockdev '{"driver":"file",\
+"filename":"/var/lib/libvirt/images/iothrtest1.img",\
+"node-name":"libvirt-2-storage","auto-read-only":true,"discard":"unmap"}' \
+-blockdev '{"node-name":"libvirt-2-format","read-only":false,"driver":"raw",\
+"file":"libvirt-2-storage"}' \
-device virtio-blk-pci,iothread=iothread1,scsi=off,bus=pci.0,addr=0x4,\
-drive=drive-virtio-disk1,id=virtio-disk1 \
--drive file=/var/lib/libvirt/images/iothrtest2.img,format=raw,if=none,\
-id=drive-scsi0-0-0-3 \
+drive=libvirt-2-format,id=virtio-disk1 \
+-blockdev '{"driver":"file",\
+"filename":"/var/lib/libvirt/images/iothrtest2.img",\
+"node-name":"libvirt-1-storage","auto-read-only":true,"discard":"unmap"}' \
+-blockdev '{"node-name":"libvirt-1-format","read-only":false,"driver":"raw",\
+"file":"libvirt-1-storage"}' \
-device scsi-hd,bus=scsi0.0,channel=0,scsi-id=0,lun=3,\
-device_id=drive-scsi0-0-0-3,drive=drive-scsi0-0-0-3,id=scsi0-0-0-3 \
+device_id=drive-scsi0-0-0-3,drive=libvirt-1-format,id=scsi0-0-0-3 \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,\
resourcecontrol=deny \
-msg timestamp=on
diff --git a/tests/qemuxml2argvdata/memory-hotplug-nvdimm-access.x86_64-latest.args b/tests/qemuxml2argvdata/memory-hotplug-nvdimm-access.x86_64-latest.args
index e694496b841e87c14fbada437150890bd6239366..ee860097e8550830a1c286076bbf221a50e2d766 100644
--- a/tests/qemuxml2argvdata/memory-hotplug-nvdimm-access.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/memory-hotplug-nvdimm-access.x86_64-latest.args
@@ -31,8 +31,11 @@ share=no,size=536870912 \
-no-acpi \
-boot strict=on \
-device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 \
--drive file=/dev/HostVG/QEMUGuest1,format=raw,if=none,id=drive-ide0-0-0 \
--device ide-hd,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=1 \
+-blockdev '{"driver":"host_device","filename":"/dev/HostVG/QEMUGuest1",\
+"node-name":"libvirt-1-storage","auto-read-only":true,"discard":"unmap"}' \
+-blockdev '{"node-name":"libvirt-1-format","read-only":false,"driver":"raw",\
+"file":"libvirt-1-storage"}' \
+-device ide-hd,bus=ide.0,unit=0,drive=libvirt-1-format,id=ide0-0-0,bootindex=1 \
-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3 \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,\
resourcecontrol=deny \
diff --git a/tests/qemuxml2argvdata/memory-hotplug-nvdimm-align.x86_64-latest.args b/tests/qemuxml2argvdata/memory-hotplug-nvdimm-align.x86_64-latest.args
index 3eef32b3248d757b7d32e53a8ff4ea5776893b2d..9705dcd1374b29b8ba2a22d36aa8f47877d59714 100644
--- a/tests/qemuxml2argvdata/memory-hotplug-nvdimm-align.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/memory-hotplug-nvdimm-align.x86_64-latest.args
@@ -31,8 +31,11 @@ share=no,size=536870912,align=2097152 \
-no-acpi \
-boot strict=on \
-device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 \
--drive file=/dev/HostVG/QEMUGuest1,format=raw,if=none,id=drive-ide0-0-0 \
--device ide-hd,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=1 \
+-blockdev '{"driver":"host_device","filename":"/dev/HostVG/QEMUGuest1",\
+"node-name":"libvirt-1-storage","auto-read-only":true,"discard":"unmap"}' \
+-blockdev '{"node-name":"libvirt-1-format","read-only":false,"driver":"raw",\
+"file":"libvirt-1-storage"}' \
+-device ide-hd,bus=ide.0,unit=0,drive=libvirt-1-format,id=ide0-0-0,bootindex=1 \
-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3 \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,\
resourcecontrol=deny \
diff --git a/tests/qemuxml2argvdata/memory-hotplug-nvdimm-label.x86_64-latest.args b/tests/qemuxml2argvdata/memory-hotplug-nvdimm-label.x86_64-latest.args
index 6217a27ad1fae06628a76b1035c640dee78f1ed8..b3f750456c2f19f6f3a3ddc44993cf9024a41b95 100644
--- a/tests/qemuxml2argvdata/memory-hotplug-nvdimm-label.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/memory-hotplug-nvdimm-label.x86_64-latest.args
@@ -31,8 +31,11 @@ share=no,size=536870912 \
-no-acpi \
-boot strict=on \
-device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 \
--drive file=/dev/HostVG/QEMUGuest1,format=raw,if=none,id=drive-ide0-0-0 \
--device ide-hd,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=1 \
+-blockdev '{"driver":"host_device","filename":"/dev/HostVG/QEMUGuest1",\
+"node-name":"libvirt-1-storage","auto-read-only":true,"discard":"unmap"}' \
+-blockdev '{"node-name":"libvirt-1-format","read-only":false,"driver":"raw",\
+"file":"libvirt-1-storage"}' \
+-device ide-hd,bus=ide.0,unit=0,drive=libvirt-1-format,id=ide0-0-0,bootindex=1 \
-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3 \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,\
resourcecontrol=deny \
diff --git a/tests/qemuxml2argvdata/memory-hotplug-nvdimm-pmem.x86_64-latest.args b/tests/qemuxml2argvdata/memory-hotplug-nvdimm-pmem.x86_64-latest.args
index b2987205f3019e2695ce2047075b4f5302a71bf6..07ec6b68fa5b17daecf389c857fc0b7bdd24d371 100644
--- a/tests/qemuxml2argvdata/memory-hotplug-nvdimm-pmem.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/memory-hotplug-nvdimm-pmem.x86_64-latest.args
@@ -31,8 +31,11 @@ share=no,size=536870912,pmem=on \
-no-acpi \
-boot strict=on \
-device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 \
--drive file=/dev/HostVG/QEMUGuest1,format=raw,if=none,id=drive-ide0-0-0 \
--device ide-hd,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=1 \
+-blockdev '{"driver":"host_device","filename":"/dev/HostVG/QEMUGuest1",\
+"node-name":"libvirt-1-storage","auto-read-only":true,"discard":"unmap"}' \
+-blockdev '{"node-name":"libvirt-1-format","read-only":false,"driver":"raw",\
+"file":"libvirt-1-storage"}' \
+-device ide-hd,bus=ide.0,unit=0,drive=libvirt-1-format,id=ide0-0-0,bootindex=1 \
-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3 \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,\
resourcecontrol=deny \
diff --git a/tests/qemuxml2argvdata/memory-hotplug-nvdimm-readonly.x86_64-latest.args b/tests/qemuxml2argvdata/memory-hotplug-nvdimm-readonly.x86_64-latest.args
index 498c13c50fc0793741c8f9faa0f74e10cd379dfc..0b7a3799146b9d2f1f302392be287aa258e19f63 100644
--- a/tests/qemuxml2argvdata/memory-hotplug-nvdimm-readonly.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/memory-hotplug-nvdimm-readonly.x86_64-latest.args
@@ -31,8 +31,11 @@ share=no,size=536870912 \
-no-acpi \
-boot strict=on \
-device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 \
--drive file=/dev/HostVG/QEMUGuest1,format=raw,if=none,id=drive-ide0-0-0 \
--device ide-hd,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=1 \
+-blockdev '{"driver":"host_device","filename":"/dev/HostVG/QEMUGuest1",\
+"node-name":"libvirt-1-storage","auto-read-only":true,"discard":"unmap"}' \
+-blockdev '{"node-name":"libvirt-1-format","read-only":false,"driver":"raw",\
+"file":"libvirt-1-storage"}' \
+-device ide-hd,bus=ide.0,unit=0,drive=libvirt-1-format,id=ide0-0-0,bootindex=1 \
-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3 \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,\
resourcecontrol=deny \
diff --git a/tests/qemuxml2argvdata/memory-hotplug-nvdimm.x86_64-latest.args b/tests/qemuxml2argvdata/memory-hotplug-nvdimm.x86_64-latest.args
index 87c928a540aadaad3edc939e44438165647c90f7..2d7cdedcf40b5a2e75949378abb0e82a752d9950 100644
--- a/tests/qemuxml2argvdata/memory-hotplug-nvdimm.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/memory-hotplug-nvdimm.x86_64-latest.args
@@ -31,8 +31,11 @@ size=536870912 \
-no-acpi \
-boot strict=on \
-device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 \
--drive file=/dev/HostVG/QEMUGuest1,format=raw,if=none,id=drive-ide0-0-0 \
--device ide-hd,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=1 \
+-blockdev '{"driver":"host_device","filename":"/dev/HostVG/QEMUGuest1",\
+"node-name":"libvirt-1-storage","auto-read-only":true,"discard":"unmap"}' \
+-blockdev '{"node-name":"libvirt-1-format","read-only":false,"driver":"raw",\
+"file":"libvirt-1-storage"}' \
+-device ide-hd,bus=ide.0,unit=0,drive=libvirt-1-format,id=ide0-0-0,bootindex=1 \
-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3 \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,\
resourcecontrol=deny \
diff --git a/tests/qemuxml2argvdata/os-firmware-efi-secboot.x86_64-latest.args b/tests/qemuxml2argvdata/os-firmware-efi-secboot.x86_64-latest.args
index 4de135beb8c699f92e307e3d2b14e5c559e71d15..f8af2100eaf88378c0abd0bafae905292087f272 100644
--- a/tests/qemuxml2argvdata/os-firmware-efi-secboot.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/os-firmware-efi-secboot.x86_64-latest.args
@@ -12,13 +12,21 @@ QEMU_AUDIO_DRV=none \
-S \
-object secret,id=masterKey0,format=raw,\
file=/tmp/lib/domain--1-fedora/master-key.aes \
--machine pc-q35-4.0,accel=kvm,usb=off,smm=on,dump-guest-core=off \
+-blockdev '{"driver":"file","filename":"/usr/share/OVMF/OVMF_CODE.secboot.fd",\
+"node-name":"libvirt-pflash0-storage","auto-read-only":true,\
+"discard":"unmap"}' \
+-blockdev '{"node-name":"libvirt-pflash0-format","read-only":true,\
+"driver":"raw","file":"libvirt-pflash0-storage"}' \
+-blockdev '{"driver":"file",\
+"filename":"/var/lib/libvirt/qemu/nvram/fedora_VARS.fd",\
+"node-name":"libvirt-pflash1-storage","auto-read-only":true,\
+"discard":"unmap"}' \
+-blockdev '{"node-name":"libvirt-pflash1-format","read-only":false,\
+"driver":"raw","file":"libvirt-pflash1-storage"}' \
+-machine pc-q35-4.0,accel=kvm,usb=off,smm=on,dump-guest-core=off,\
+pflash0=libvirt-pflash0-format,pflash1=libvirt-pflash1-format \
-cpu qemu64 \
-global driver=cfi.pflash01,property=secure,value=on \
--drive file=/usr/share/OVMF/OVMF_CODE.secboot.fd,if=pflash,format=raw,unit=0,\
-readonly=on \
--drive file=/var/lib/libvirt/qemu/nvram/fedora_VARS.fd,if=pflash,format=raw,\
-unit=1 \
-m 8 \
-overcommit mem-lock=off \
-smp 1,sockets=1,cores=1,threads=1 \
diff --git a/tests/qemuxml2argvdata/os-firmware-efi.x86_64-latest.args b/tests/qemuxml2argvdata/os-firmware-efi.x86_64-latest.args
index 7eba20e443ac34eedd65152816702228fa4951db..a06213eb198b3f439eed2afb960fa484e86cf858 100644
--- a/tests/qemuxml2argvdata/os-firmware-efi.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/os-firmware-efi.x86_64-latest.args
@@ -12,12 +12,20 @@ QEMU_AUDIO_DRV=none \
-S \
-object secret,id=masterKey0,format=raw,\
file=/tmp/lib/domain--1-fedora/master-key.aes \
--machine pc-q35-4.0,accel=kvm,usb=off,smm=on,dump-guest-core=off \
+-blockdev '{"driver":"file","filename":"/usr/share/OVMF/OVMF_CODE.secboot.fd",\
+"node-name":"libvirt-pflash0-storage","auto-read-only":true,\
+"discard":"unmap"}' \
+-blockdev '{"node-name":"libvirt-pflash0-format","read-only":true,\
+"driver":"raw","file":"libvirt-pflash0-storage"}' \
+-blockdev '{"driver":"file",\
+"filename":"/var/lib/libvirt/qemu/nvram/fedora_VARS.fd",\
+"node-name":"libvirt-pflash1-storage","auto-read-only":true,\
+"discard":"unmap"}' \
+-blockdev '{"node-name":"libvirt-pflash1-format","read-only":false,\
+"driver":"raw","file":"libvirt-pflash1-storage"}' \
+-machine pc-q35-4.0,accel=kvm,usb=off,smm=on,dump-guest-core=off,\
+pflash0=libvirt-pflash0-format,pflash1=libvirt-pflash1-format \
-cpu qemu64 \
--drive file=/usr/share/OVMF/OVMF_CODE.secboot.fd,if=pflash,format=raw,unit=0,\
-readonly=on \
--drive file=/var/lib/libvirt/qemu/nvram/fedora_VARS.fd,if=pflash,format=raw,\
-unit=1 \
-m 8 \
-overcommit mem-lock=off \
-smp 1,sockets=1,cores=1,threads=1 \
diff --git a/tests/qemuxml2argvdata/vhost-user-gpu-secondary.x86_64-latest.args b/tests/qemuxml2argvdata/vhost-user-gpu-secondary.x86_64-latest.args
index 77643d31c07d1da0965d94f3179a012f39c81b14..46c53c45fa56e6c75e84a1fd95d73a244b1c400f 100644
--- a/tests/qemuxml2argvdata/vhost-user-gpu-secondary.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/vhost-user-gpu-secondary.x86_64-latest.args
@@ -29,8 +29,11 @@ file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \
-no-acpi \
-boot strict=on \
-device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 \
--drive file=/dev/HostVG/QEMUGuest1,format=raw,if=none,id=drive-ide0-0-0 \
--device ide-hd,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=1 \
+-blockdev '{"driver":"host_device","filename":"/dev/HostVG/QEMUGuest1",\
+"node-name":"libvirt-1-storage","auto-read-only":true,"discard":"unmap"}' \
+-blockdev '{"node-name":"libvirt-1-format","read-only":false,"driver":"raw",\
+"file":"libvirt-1-storage"}' \
+-device ide-hd,bus=ide.0,unit=0,drive=libvirt-1-format,id=ide0-0-0,bootindex=1 \
-chardev socket,id=chr-vu-video0,fd=1729 \
-chardev socket,id=chr-vu-video1,fd=1729 \
-device vhost-user-vga,id=video0,max_outputs=1,chardev=chr-vu-video0,bus=pci.0,\
diff --git a/tests/qemuxml2argvdata/vhost-user-vga.x86_64-latest.args b/tests/qemuxml2argvdata/vhost-user-vga.x86_64-latest.args
index dd5f9800d922d0b2af7eccd158aece0126f58013..0b67b34797f9c47a17529ceffdd454d8810d2d3a 100644
--- a/tests/qemuxml2argvdata/vhost-user-vga.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/vhost-user-vga.x86_64-latest.args
@@ -29,8 +29,11 @@ file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \
-no-acpi \
-boot strict=on \
-device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 \
--drive file=/dev/HostVG/QEMUGuest1,format=raw,if=none,id=drive-ide0-0-0 \
--device ide-hd,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=1 \
+-blockdev '{"driver":"host_device","filename":"/dev/HostVG/QEMUGuest1",\
+"node-name":"libvirt-1-storage","auto-read-only":true,"discard":"unmap"}' \
+-blockdev '{"node-name":"libvirt-1-format","read-only":false,"driver":"raw",\
+"file":"libvirt-1-storage"}' \
+-device ide-hd,bus=ide.0,unit=0,drive=libvirt-1-format,id=ide0-0-0,bootindex=1 \
-chardev socket,id=chr-vu-video0,fd=1729 \
-device vhost-user-vga,id=video0,max_outputs=1,chardev=chr-vu-video0,bus=pci.0,\
addr=0x2 \
diff --git a/tests/qemuxml2argvdata/video-bochs-display-device.x86_64-latest.args b/tests/qemuxml2argvdata/video-bochs-display-device.x86_64-latest.args
index d1a25d5c626c52ea6842e727e36d0701a6bcf3e4..2112c105764d5f52298bd50352dea002d11c8e33 100644
--- a/tests/qemuxml2argvdata/video-bochs-display-device.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/video-bochs-display-device.x86_64-latest.args
@@ -27,9 +27,13 @@ file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \
-no-acpi \
-boot strict=on \
-device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 \
--drive file=/var/lib/libvirt/images/QEMUGuest1,format=qcow2,if=none,\
-id=drive-ide0-0-0,cache=none \
--device ide-hd,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=1,\
+-blockdev '{"driver":"file","filename":"/var/lib/libvirt/images/QEMUGuest1",\
+"node-name":"libvirt-1-storage","cache":{"direct":true,"no-flush":false},\
+"auto-read-only":true,"discard":"unmap"}' \
+-blockdev '{"node-name":"libvirt-1-format","read-only":false,\
+"cache":{"direct":true,"no-flush":false},"driver":"qcow2",\
+"file":"libvirt-1-storage"}' \
+-device ide-hd,bus=ide.0,unit=0,drive=libvirt-1-format,id=ide0-0-0,bootindex=1,\
write-cache=on \
-device bochs-display,id=video0,vgamem=16384k,bus=pci.0,addr=0x2 \
-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3 \
diff --git a/tests/qemuxml2argvdata/video-ramfb-display-device.x86_64-latest.args b/tests/qemuxml2argvdata/video-ramfb-display-device.x86_64-latest.args
index b26db5d5469ecc06c7f7b6b9d15e55b8c583be16..98983a1e2616adaa43cc307b3b79c133eef3ac4e 100644
--- a/tests/qemuxml2argvdata/video-ramfb-display-device.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/video-ramfb-display-device.x86_64-latest.args
@@ -27,9 +27,13 @@ file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \
-no-acpi \
-boot strict=on \
-device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 \
--drive file=/var/lib/libvirt/images/QEMUGuest1,format=qcow2,if=none,\
-id=drive-ide0-0-0,cache=none \
--device ide-hd,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=1,\
+-blockdev '{"driver":"file","filename":"/var/lib/libvirt/images/QEMUGuest1",\
+"node-name":"libvirt-1-storage","cache":{"direct":true,"no-flush":false},\
+"auto-read-only":true,"discard":"unmap"}' \
+-blockdev '{"node-name":"libvirt-1-format","read-only":false,\
+"cache":{"direct":true,"no-flush":false},"driver":"qcow2",\
+"file":"libvirt-1-storage"}' \
+-device ide-hd,bus=ide.0,unit=0,drive=libvirt-1-format,id=ide0-0-0,bootindex=1,\
write-cache=on \
-device ramfb,id=video0 \
-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x2 \
diff --git a/tests/qemuxml2argvdata/virtio-non-transitional.x86_64-latest.args b/tests/qemuxml2argvdata/virtio-non-transitional.x86_64-latest.args
index 36887090920948b6cc093fa9c9771ab0e075a19a..7fa2c6ed5f8cfd6710151415497f485122b5e914 100644
--- a/tests/qemuxml2argvdata/virtio-non-transitional.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/virtio-non-transitional.x86_64-latest.args
@@ -42,9 +42,12 @@ multifunction=on,addr=0x2 \
-device virtio-scsi-pci-non-transitional,id=scsi0,bus=pci.4,addr=0x0 \
-device virtio-serial-pci-non-transitional,id=virtio-serial0,bus=pci.3,\
addr=0x0 \
--drive file=/dev/HostVG/QEMUGuest1,format=raw,if=none,id=drive-virtio-disk0 \
+-blockdev '{"driver":"host_device","filename":"/dev/HostVG/QEMUGuest1",\
+"node-name":"libvirt-1-storage","auto-read-only":true,"discard":"unmap"}' \
+-blockdev '{"node-name":"libvirt-1-format","read-only":false,"driver":"raw",\
+"file":"libvirt-1-storage"}' \
-device virtio-blk-pci-non-transitional,scsi=off,bus=pci.5,addr=0x0,\
-drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1 \
+drive=libvirt-1-format,id=virtio-disk0,bootindex=1 \
-fsdev local,security_model=passthrough,id=fsdev-fs0,path=/export/fs1 \
-device virtio-9p-pci-non-transitional,id=fs0,fsdev=fsdev-fs0,mount_tag=fs1,\
bus=pci.1,addr=0x0 \
diff --git a/tests/qemuxml2argvdata/virtio-transitional.x86_64-latest.args b/tests/qemuxml2argvdata/virtio-transitional.x86_64-latest.args
index 9d4ec5f922b7cd4534f8fd530bd51e7232cffe8c..dea7e0d3f3bfc2b18f4c6ce9f381e0dfe1c426f4 100644
--- a/tests/qemuxml2argvdata/virtio-transitional.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/virtio-transitional.x86_64-latest.args
@@ -32,9 +32,12 @@ addr=0x1 \
-device pcie-root-port,port=0x9,chassis=3,id=pci.3,bus=pcie.0,addr=0x1.0x1 \
-device virtio-scsi-pci-transitional,id=scsi0,bus=pci.2,addr=0x4 \
-device virtio-serial-pci-transitional,id=virtio-serial0,bus=pci.2,addr=0x3 \
--drive file=/dev/HostVG/QEMUGuest1,format=raw,if=none,id=drive-virtio-disk0 \
+-blockdev '{"driver":"host_device","filename":"/dev/HostVG/QEMUGuest1",\
+"node-name":"libvirt-1-storage","auto-read-only":true,"discard":"unmap"}' \
+-blockdev '{"node-name":"libvirt-1-format","read-only":false,"driver":"raw",\
+"file":"libvirt-1-storage"}' \
-device virtio-blk-pci-transitional,scsi=off,bus=pci.2,addr=0x5,\
-drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1 \
+drive=libvirt-1-format,id=virtio-disk0,bootindex=1 \
-fsdev local,security_model=passthrough,id=fsdev-fs0,path=/export/fs1 \
-device virtio-9p-pci-transitional,id=fs0,fsdev=fsdev-fs0,mount_tag=fs1,\
bus=pci.2,addr=0x1 \
diff --git a/tests/qemuxml2argvdata/x86_64-default-cpu-kvm-pc-4.2.x86_64-latest.args b/tests/qemuxml2argvdata/x86_64-default-cpu-kvm-pc-4.2.x86_64-latest.args
index 7a335bc0c47a9d526fd8209064af766ef39b093f..74715f9517dc757b827040a0462c49924ccbec4e 100644
--- a/tests/qemuxml2argvdata/x86_64-default-cpu-kvm-pc-4.2.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/x86_64-default-cpu-kvm-pc-4.2.x86_64-latest.args
@@ -27,9 +27,11 @@ file=/tmp/lib/domain--1-guest/master-key.aes \
-no-shutdown \
-boot strict=on \
-device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 \
--drive file=/var/lib/libvirt/images/guest.qcow2,format=qcow2,if=none,\
-id=drive-virtio-disk0 \
--device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x2,drive=drive-virtio-disk0,\
+-blockdev '{"driver":"file","filename":"/var/lib/libvirt/images/guest.qcow2",\
+"node-name":"libvirt-1-storage","auto-read-only":true,"discard":"unmap"}' \
+-blockdev '{"node-name":"libvirt-1-format","read-only":false,"driver":"qcow2",\
+"file":"libvirt-1-storage"}' \
+-device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x2,drive=libvirt-1-format,\
id=virtio-disk0,bootindex=1 \
-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3 \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,\
diff --git a/tests/qemuxml2argvdata/x86_64-default-cpu-kvm-q35-4.2.x86_64-latest.args b/tests/qemuxml2argvdata/x86_64-default-cpu-kvm-q35-4.2.x86_64-latest.args
index 88a634fc6898f7ecdf1077d6dada6e64515f2214..145864b896733473094382b9553c61f67da6fd89 100644
--- a/tests/qemuxml2argvdata/x86_64-default-cpu-kvm-q35-4.2.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/x86_64-default-cpu-kvm-q35-4.2.x86_64-latest.args
@@ -32,9 +32,11 @@ addr=0x1 \
-device pcie-root-port,port=0xa,chassis=3,id=pci.3,bus=pcie.0,addr=0x1.0x2 \
-device pcie-root-port,port=0xb,chassis=4,id=pci.4,bus=pcie.0,addr=0x1.0x3 \
-device qemu-xhci,id=usb,bus=pci.1,addr=0x0 \
--drive file=/var/lib/libvirt/images/guest.qcow2,format=qcow2,if=none,\
-id=drive-virtio-disk0 \
--device virtio-blk-pci,scsi=off,bus=pci.2,addr=0x0,drive=drive-virtio-disk0,\
+-blockdev '{"driver":"file","filename":"/var/lib/libvirt/images/guest.qcow2",\
+"node-name":"libvirt-1-storage","auto-read-only":true,"discard":"unmap"}' \
+-blockdev '{"node-name":"libvirt-1-format","read-only":false,"driver":"qcow2",\
+"file":"libvirt-1-storage"}' \
+-device virtio-blk-pci,scsi=off,bus=pci.2,addr=0x0,drive=libvirt-1-format,\
id=virtio-disk0,bootindex=1 \
-device virtio-balloon-pci,id=balloon0,bus=pci.3,addr=0x0 \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,\
diff --git a/tests/qemuxml2argvdata/x86_64-default-cpu-tcg-pc-4.2.x86_64-latest.args b/tests/qemuxml2argvdata/x86_64-default-cpu-tcg-pc-4.2.x86_64-latest.args
index 5f11a07a197ccc145b03a834cdf68bce37d97599..21d5b358bcb82820e79dff792fc20fac707485d1 100644
--- a/tests/qemuxml2argvdata/x86_64-default-cpu-tcg-pc-4.2.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/x86_64-default-cpu-tcg-pc-4.2.x86_64-latest.args
@@ -27,9 +27,11 @@ file=/tmp/lib/domain--1-guest/master-key.aes \
-no-shutdown \
-boot strict=on \
-device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 \
--drive file=/var/lib/libvirt/images/guest.qcow2,format=qcow2,if=none,\
-id=drive-virtio-disk0 \
--device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x2,drive=drive-virtio-disk0,\
+-blockdev '{"driver":"file","filename":"/var/lib/libvirt/images/guest.qcow2",\
+"node-name":"libvirt-1-storage","auto-read-only":true,"discard":"unmap"}' \
+-blockdev '{"node-name":"libvirt-1-format","read-only":false,"driver":"qcow2",\
+"file":"libvirt-1-storage"}' \
+-device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x2,drive=libvirt-1-format,\
id=virtio-disk0,bootindex=1 \
-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3 \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,\
diff --git a/tests/qemuxml2argvdata/x86_64-default-cpu-tcg-q35-4.2.x86_64-latest.args b/tests/qemuxml2argvdata/x86_64-default-cpu-tcg-q35-4.2.x86_64-latest.args
index 1c9330f720520b0da96c4dcf8a5cd843d621b76d..9afac1778b1bea16b6f21b0e8ebe1c0dcfaf6a9a 100644
--- a/tests/qemuxml2argvdata/x86_64-default-cpu-tcg-q35-4.2.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/x86_64-default-cpu-tcg-q35-4.2.x86_64-latest.args
@@ -32,9 +32,11 @@ addr=0x1 \
-device pcie-root-port,port=0xa,chassis=3,id=pci.3,bus=pcie.0,addr=0x1.0x2 \
-device pcie-root-port,port=0xb,chassis=4,id=pci.4,bus=pcie.0,addr=0x1.0x3 \
-device qemu-xhci,id=usb,bus=pci.1,addr=0x0 \
--drive file=/var/lib/libvirt/images/guest.qcow2,format=qcow2,if=none,\
-id=drive-virtio-disk0 \
--device virtio-blk-pci,scsi=off,bus=pci.2,addr=0x0,drive=drive-virtio-disk0,\
+-blockdev '{"driver":"file","filename":"/var/lib/libvirt/images/guest.qcow2",\
+"node-name":"libvirt-1-storage","auto-read-only":true,"discard":"unmap"}' \
+-blockdev '{"node-name":"libvirt-1-format","read-only":false,"driver":"qcow2",\
+"file":"libvirt-1-storage"}' \
+-device virtio-blk-pci,scsi=off,bus=pci.2,addr=0x0,drive=libvirt-1-format,\
id=virtio-disk0,bootindex=1 \
-device virtio-balloon-pci,id=balloon0,bus=pci.3,addr=0x0 \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,\
diff --git a/tests/qemuxml2argvdata/x86_64-pc-graphics.x86_64-latest.args b/tests/qemuxml2argvdata/x86_64-pc-graphics.x86_64-latest.args
index 4875a8799e34d695d888106f67d78f9fb557012e..7c9c5a0bc65349d42138af022431aa791df267d9 100644
--- a/tests/qemuxml2argvdata/x86_64-pc-graphics.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/x86_64-pc-graphics.x86_64-latest.args
@@ -30,9 +30,11 @@ file=/tmp/lib/domain--1-guest/master-key.aes \
-boot strict=on \
-device qemu-xhci,p2=15,p3=15,id=usb,bus=pci.0,addr=0x4 \
-device virtio-serial-pci,id=virtio-serial0,bus=pci.0,addr=0x5 \
--drive file=/var/lib/libvirt/images/guest.qcow2,format=qcow2,if=none,\
-id=drive-virtio-disk0 \
--device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x6,drive=drive-virtio-disk0,\
+-blockdev '{"driver":"file","filename":"/var/lib/libvirt/images/guest.qcow2",\
+"node-name":"libvirt-1-storage","auto-read-only":true,"discard":"unmap"}' \
+-blockdev '{"node-name":"libvirt-1-format","read-only":false,"driver":"qcow2",\
+"file":"libvirt-1-storage"}' \
+-device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x6,drive=libvirt-1-format,\
id=virtio-disk0,bootindex=1 \
-netdev user,id=hostnet0 \
-device virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:4c:e3:86,bus=pci.0,\
diff --git a/tests/qemuxml2argvdata/x86_64-pc-headless.x86_64-latest.args b/tests/qemuxml2argvdata/x86_64-pc-headless.x86_64-latest.args
index cc33248272c25b35ee356590ce902231be9e9fb7..7f825462aa55bd394f77e56cbdb003174627adfe 100644
--- a/tests/qemuxml2argvdata/x86_64-pc-headless.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/x86_64-pc-headless.x86_64-latest.args
@@ -31,9 +31,11 @@ file=/tmp/lib/domain--1-guest/master-key.aes \
-boot strict=on \
-device qemu-xhci,p2=15,p3=15,id=usb,bus=pci.0,addr=0x3 \
-device virtio-serial-pci,id=virtio-serial0,bus=pci.0,addr=0x4 \
--drive file=/var/lib/libvirt/images/guest.qcow2,format=qcow2,if=none,\
-id=drive-virtio-disk0 \
--device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x5,drive=drive-virtio-disk0,\
+-blockdev '{"driver":"file","filename":"/var/lib/libvirt/images/guest.qcow2",\
+"node-name":"libvirt-1-storage","auto-read-only":true,"discard":"unmap"}' \
+-blockdev '{"node-name":"libvirt-1-format","read-only":false,"driver":"qcow2",\
+"file":"libvirt-1-storage"}' \
+-device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x5,drive=libvirt-1-format,\
id=virtio-disk0,bootindex=1 \
-netdev user,id=hostnet0 \
-device virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:09:a4:37,bus=pci.0,\
diff --git a/tests/qemuxml2argvdata/x86_64-q35-graphics.x86_64-latest.args b/tests/qemuxml2argvdata/x86_64-q35-graphics.x86_64-latest.args
index 8e1f1cc86545493fbda46d79178625426ebfa77e..52fa25898d8e03c57098881a5104b194b2557a26 100644
--- a/tests/qemuxml2argvdata/x86_64-q35-graphics.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/x86_64-q35-graphics.x86_64-latest.args
@@ -38,9 +38,11 @@ multifunction=on,addr=0x2 \
-device pcie-root-port,port=0x16,chassis=7,id=pci.7,bus=pcie.0,addr=0x2.0x6 \
-device qemu-xhci,p2=15,p3=15,id=usb,bus=pci.2,addr=0x0 \
-device virtio-serial-pci,id=virtio-serial0,bus=pci.3,addr=0x0 \
--drive file=/var/lib/libvirt/images/guest.qcow2,format=qcow2,if=none,\
-id=drive-virtio-disk0 \
--device virtio-blk-pci,scsi=off,bus=pci.4,addr=0x0,drive=drive-virtio-disk0,\
+-blockdev '{"driver":"file","filename":"/var/lib/libvirt/images/guest.qcow2",\
+"node-name":"libvirt-1-storage","auto-read-only":true,"discard":"unmap"}' \
+-blockdev '{"node-name":"libvirt-1-format","read-only":false,"driver":"qcow2",\
+"file":"libvirt-1-storage"}' \
+-device virtio-blk-pci,scsi=off,bus=pci.4,addr=0x0,drive=libvirt-1-format,\
id=virtio-disk0,bootindex=1 \
-netdev user,id=hostnet0 \
-device virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:d2:70:0b,bus=pci.1,\
diff --git a/tests/qemuxml2argvdata/x86_64-q35-headless.x86_64-latest.args b/tests/qemuxml2argvdata/x86_64-q35-headless.x86_64-latest.args
index b3fb8d8340d3a3228d5159a271dddeb14feeb766..0cda5c32278ffa1c2f18259ea23b0c7c33042e3c 100644
--- a/tests/qemuxml2argvdata/x86_64-q35-headless.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/x86_64-q35-headless.x86_64-latest.args
@@ -39,9 +39,11 @@ addr=0x1 \
-device pcie-root-port,port=0xe,chassis=7,id=pci.7,bus=pcie.0,addr=0x1.0x6 \
-device qemu-xhci,p2=15,p3=15,id=usb,bus=pci.2,addr=0x0 \
-device virtio-serial-pci,id=virtio-serial0,bus=pci.3,addr=0x0 \
--drive file=/var/lib/libvirt/images/guest.qcow2,format=qcow2,if=none,\
-id=drive-virtio-disk0 \
--device virtio-blk-pci,scsi=off,bus=pci.4,addr=0x0,drive=drive-virtio-disk0,\
+-blockdev '{"driver":"file","filename":"/var/lib/libvirt/images/guest.qcow2",\
+"node-name":"libvirt-1-storage","auto-read-only":true,"discard":"unmap"}' \
+-blockdev '{"node-name":"libvirt-1-format","read-only":false,"driver":"qcow2",\
+"file":"libvirt-1-storage"}' \
+-device virtio-blk-pci,scsi=off,bus=pci.4,addr=0x0,drive=libvirt-1-format,\
id=virtio-disk0,bootindex=1 \
-netdev user,id=hostnet0 \
-device virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:09:a4:37,bus=pci.1,\