all lists on lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [RFC storage 00/26+10+3] unify vtype and content-type and
@ 2025-07-29 11:15 Wolfgang Bumiller
  2025-07-29 11:15 ` [pve-devel] [PATCH storage 01/26] btrfs: remove unnecessary mkpath call Wolfgang Bumiller
                   ` (39 more replies)
  0 siblings, 40 replies; 74+ messages in thread
From: Wolfgang Bumiller @ 2025-07-29 11:15 UTC (permalink / raw)
  To: pve-devel

This series is a first attempt at updating the storage API so that
- vtype == content type
- VM volumes have type "vm-vol"
- Container volumes have type "ct-vol"
- "images" is a generic "legacy" term which means "unknown OR vm-vol or
  ct-vol"
- remaining openvz-related 'rootdir' parts are removed
- rootdir is now intended to mean "unknown or ct-vol"

There are several reasons for adding 2 new types, rather than making the
old ones more strict:
- The "rootdir" vs "images" distinction in `list_volumes` only happened
  if our code to check the actually existing guest type was used. This
  could not be enforced for external storage plugins and is a weird and
  surprising API quirk.
- The "rootdir" *vtype* was otherwise *never* used as it referred to old
  openvz 'private/' subdirectories.
- The container code allocated "images", not "rootdirs".
- Since containers were allocated as type "images", the `content-dir`
  option for "rootdir" never had any effect. (You can now set
  content-dirs for types 'vm-vol' and 'ct-vol' which will be honored for
  any new disks allocated from the update pve-container and qemu-server
  code.)

API Notes:
  - vtype parameters are added to several API methods - but they are
    optional
  - list_images now also includes a `vtype` in its return value, but
    only if it is NOT `images` (so legacy volumes are returned unchanged
    via the API).
  - old plugins should still function as they did previously but keep
    using the legacy "images" vtype/content-type

Storage notes:

  Storages now need to be able to tell vm/ct volumes apart from
  "images", for which this not only introduced separate directories, but
  also adapts the volume id naming scheme. In order to *somewhat* void
  running into rogue `/^vm-/` regexes affecting new style volumes, the
  new prefixes are the reverse of the type names: `vol-vm-` and
  `vol-ct-`. For base images, the entire name is prefixed with `base-`
  instead of, like previously, doing `s/vm-/base-/`.

Patch notes:

  Initially I did the vtype separately from the content type, but the
  series became a bit of a back & forth. This version is mostly split by
  functionality as it seemed nicer for reviews and might sort of work
  for external plugin writers as a guide. Therefore patches add vtype
  parameters without adapting all the callers. (This *should* mostly be
  fine since they are optional, though...) And Tests are only changed as
  a whole at the end.

  For qemu-server, most of the tests were updated via `sed`.


_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] 74+ messages in thread

* [pve-devel] [PATCH storage 01/26] btrfs: remove unnecessary mkpath call
  2025-07-29 11:15 [pve-devel] [RFC storage 00/26+10+3] unify vtype and content-type and Wolfgang Bumiller
@ 2025-07-29 11:15 ` Wolfgang Bumiller
  2025-07-29 11:15 ` [pve-devel] [PATCH storage 02/26] parse_volname: remove openvz 'rootdir' case Wolfgang Bumiller
                   ` (38 subsequent siblings)
  39 siblings, 0 replies; 74+ messages in thread
From: Wolfgang Bumiller @ 2025-07-29 11:15 UTC (permalink / raw)
  To: pve-devel

The existence of the original volume should imply the existence of its
parent directory, after all... And with the new typed subdirectories
this was wrong.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
---
 src/PVE/Storage/BTRFSPlugin.pm | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/src/PVE/Storage/BTRFSPlugin.pm b/src/PVE/Storage/BTRFSPlugin.pm
index 26eef2b..bd2c0bf 100644
--- a/src/PVE/Storage/BTRFSPlugin.pm
+++ b/src/PVE/Storage/BTRFSPlugin.pm
@@ -529,9 +529,6 @@ sub volume_snapshot {
         $snap_path = raw_file_to_subvol($snap_path);
     }
 
-    my $snapshot_dir = $class->get_subdir($scfg, 'images') . "/$vmid";
-    mkpath $snapshot_dir;
-
     $class->btrfs_cmd(['subvolume', 'snapshot', '-r', '--', $path, $snap_path]);
     return undef;
 }
-- 
2.47.2



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] 74+ messages in thread

* [pve-devel] [PATCH storage 02/26] parse_volname: remove openvz 'rootdir' case
  2025-07-29 11:15 [pve-devel] [RFC storage 00/26+10+3] unify vtype and content-type and Wolfgang Bumiller
  2025-07-29 11:15 ` [pve-devel] [PATCH storage 01/26] btrfs: remove unnecessary mkpath call Wolfgang Bumiller
@ 2025-07-29 11:15 ` Wolfgang Bumiller
  2025-07-29 11:15 ` [pve-devel] [PATCH storage 03/26] drop rootdir case in path_to_volume_id Wolfgang Bumiller
                   ` (37 subsequent siblings)
  39 siblings, 0 replies; 74+ messages in thread
From: Wolfgang Bumiller @ 2025-07-29 11:15 UTC (permalink / raw)
  To: pve-devel

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
---
 src/PVE/Storage/Plugin.pm | 2 --
 1 file changed, 2 deletions(-)

diff --git a/src/PVE/Storage/Plugin.pm b/src/PVE/Storage/Plugin.pm
index 2bd05bd..0107976 100644
--- a/src/PVE/Storage/Plugin.pm
+++ b/src/PVE/Storage/Plugin.pm
@@ -746,8 +746,6 @@ sub parse_volname {
         return ('iso', $1, undef, undef, undef, undef, 'raw');
     } elsif ($volname =~ m!^vztmpl/([^/]+$PVE::Storage::VZTMPL_EXT_RE_1)$!) {
         return ('vztmpl', $1, undef, undef, undef, undef, 'raw');
-    } elsif ($volname =~ m!^rootdir/(\d+)$!) {
-        return ('rootdir', $1, $1);
     } elsif ($volname =~ m!^backup/([^/]+$PVE::Storage::BACKUP_EXT_RE_2)$!) {
         my $fn = $1;
         if ($fn =~ m/^vzdump-(openvz|lxc|qemu)-(\d+)-.+/) {
-- 
2.47.2



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] 74+ messages in thread

* [pve-devel] [PATCH storage 03/26] drop rootdir case in path_to_volume_id
  2025-07-29 11:15 [pve-devel] [RFC storage 00/26+10+3] unify vtype and content-type and Wolfgang Bumiller
  2025-07-29 11:15 ` [pve-devel] [PATCH storage 01/26] btrfs: remove unnecessary mkpath call Wolfgang Bumiller
  2025-07-29 11:15 ` [pve-devel] [PATCH storage 02/26] parse_volname: remove openvz 'rootdir' case Wolfgang Bumiller
@ 2025-07-29 11:15 ` Wolfgang Bumiller
  2025-07-29 11:15 ` [pve-devel] [PATCH storage 04/26] escape dirs in path_to_volume_id regexes Wolfgang Bumiller
                   ` (36 subsequent siblings)
  39 siblings, 0 replies; 74+ messages in thread
From: Wolfgang Bumiller @ 2025-07-29 11:15 UTC (permalink / raw)
  To: pve-devel

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
---
 src/PVE/Storage.pm | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/src/PVE/Storage.pm b/src/PVE/Storage.pm
index e2e6742..4e5d991 100755
--- a/src/PVE/Storage.pm
+++ b/src/PVE/Storage.pm
@@ -740,7 +740,6 @@ sub path_to_volume_id {
         my $isodir = $plugin->get_subdir($scfg, 'iso');
         my $tmpldir = $plugin->get_subdir($scfg, 'vztmpl');
         my $backupdir = $plugin->get_subdir($scfg, 'backup');
-        my $privatedir = $plugin->get_subdir($scfg, 'rootdir');
         my $snippetsdir = $plugin->get_subdir($scfg, 'snippets');
         my $importdir = $plugin->get_subdir($scfg, 'import');
 
@@ -762,9 +761,6 @@ sub path_to_volume_id {
         } elsif ($path =~ m!^$tmpldir/([^/]+$VZTMPL_EXT_RE_1)$!) {
             my $name = $1;
             return ('vztmpl', "$sid:vztmpl/$name");
-        } elsif ($path =~ m!^$privatedir/(\d+)$!) {
-            my $vmid = $1;
-            return ('rootdir', "$sid:rootdir/$vmid");
         } elsif ($path =~ m!^$backupdir/([^/]+$BACKUP_EXT_RE_2)$!) {
             my $name = $1;
             return ('backup', "$sid:backup/$name");
-- 
2.47.2



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] 74+ messages in thread

* [pve-devel] [PATCH storage 04/26] escape dirs in path_to_volume_id regexes
  2025-07-29 11:15 [pve-devel] [RFC storage 00/26+10+3] unify vtype and content-type and Wolfgang Bumiller
                   ` (2 preceding siblings ...)
  2025-07-29 11:15 ` [pve-devel] [PATCH storage 03/26] drop rootdir case in path_to_volume_id Wolfgang Bumiller
@ 2025-07-29 11:15 ` Wolfgang Bumiller
  2025-07-29 11:15 ` [pve-devel] [PATCH storage 05/26] tests: drop rootdir/ tests Wolfgang Bumiller
                   ` (35 subsequent siblings)
  39 siblings, 0 replies; 74+ messages in thread
From: Wolfgang Bumiller @ 2025-07-29 11:15 UTC (permalink / raw)
  To: pve-devel

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
---
 src/PVE/Storage.pm | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/PVE/Storage.pm b/src/PVE/Storage.pm
index 4e5d991..da53beb 100755
--- a/src/PVE/Storage.pm
+++ b/src/PVE/Storage.pm
@@ -743,7 +743,7 @@ sub path_to_volume_id {
         my $snippetsdir = $plugin->get_subdir($scfg, 'snippets');
         my $importdir = $plugin->get_subdir($scfg, 'import');
 
-        if ($path =~ m!^$imagedir/(\d+)/([^/\s]+)$!) {
+        if ($path =~ m!^\Q$imagedir\E/(\d+)/([^/\s]+)$!) {
             my $vmid = $1;
             my $name = $2;
 
@@ -755,19 +755,19 @@ sub path_to_volume_id {
                     return ('images', $info->{volid});
                 }
             }
-        } elsif ($path =~ m!^$isodir/([^/]+$ISO_EXT_RE_0)$!) {
+        } elsif ($path =~ m!^\Q$isodir\E/([^/]+$ISO_EXT_RE_0)$!) {
             my $name = $1;
             return ('iso', "$sid:iso/$name");
-        } elsif ($path =~ m!^$tmpldir/([^/]+$VZTMPL_EXT_RE_1)$!) {
+        } elsif ($path =~ m!^\Q$tmpldir\E/([^/]+$VZTMPL_EXT_RE_1)$!) {
             my $name = $1;
             return ('vztmpl', "$sid:vztmpl/$name");
-        } elsif ($path =~ m!^$backupdir/([^/]+$BACKUP_EXT_RE_2)$!) {
+        } elsif ($path =~ m!^\Q$backupdir\E/([^/]+$BACKUP_EXT_RE_2)$!) {
             my $name = $1;
             return ('backup', "$sid:backup/$name");
-        } elsif ($path =~ m!^$snippetsdir/([^/]+)$!) {
+        } elsif ($path =~ m!^\Q$snippetsdir\E/([^/]+)$!) {
             my $name = $1;
             return ('snippets', "$sid:snippets/$name");
-        } elsif ($path =~ m!^$importdir/(${SAFE_CHAR_CLASS_RE}+${IMPORT_EXT_RE_1})$!) {
+        } elsif ($path =~ m!^\Q$importdir\E/(${SAFE_CHAR_CLASS_RE}+${IMPORT_EXT_RE_1})$!) {
             my $name = $1;
             return ('import', "$sid:import/$name");
         }
-- 
2.47.2



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] 74+ messages in thread

* [pve-devel] [PATCH storage 05/26] tests: drop rootdir/ tests
  2025-07-29 11:15 [pve-devel] [RFC storage 00/26+10+3] unify vtype and content-type and Wolfgang Bumiller
                   ` (3 preceding siblings ...)
  2025-07-29 11:15 ` [pve-devel] [PATCH storage 04/26] escape dirs in path_to_volume_id regexes Wolfgang Bumiller
@ 2025-07-29 11:15 ` Wolfgang Bumiller
  2025-07-29 11:15 ` [pve-devel] [PATCH storage 06/26] common: use v5.36 Wolfgang Bumiller
                   ` (34 subsequent siblings)
  39 siblings, 0 replies; 74+ messages in thread
From: Wolfgang Bumiller @ 2025-07-29 11:15 UTC (permalink / raw)
  To: pve-devel

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
---
 src/test/parse_volname_test.pm     | 10 ----------
 src/test/path_to_volume_id_test.pm | 11 +++--------
 2 files changed, 3 insertions(+), 18 deletions(-)

diff --git a/src/test/parse_volname_test.pm b/src/test/parse_volname_test.pm
index 9e96842..0d077a9 100644
--- a/src/test/parse_volname_test.pm
+++ b/src/test/parse_volname_test.pm
@@ -90,11 +90,6 @@ my $tests = [
     #
     # container rootdir
     #
-    {
-        description => 'Container rootdir, sub directory',
-        volname => "rootdir/$vmid",
-        expected => ['rootdir', "$vmid", "$vmid"],
-    },
     {
         description => 'Container rootdir, subvol',
         volname => "$vmid/subvol-$vmid-disk-0.subvol",
@@ -182,11 +177,6 @@ my $tests = [
         expected =>
             "unable to parse directory volume name 'vztmpl/debian-10.0-standard_10.0-1_amd64.zip.gz'\n",
     },
-    {
-        description => 'Failed match: Container rootdir, subvol',
-        volname => "rootdir/subvol-$vmid-disk-0",
-        expected => "unable to parse directory volume name 'rootdir/subvol-$vmid-disk-0'\n",
-    },
     {
         description => 'Failed match: VM disk image, linked, vhdx',
         volname => "$vmid/base-$vmid-disk-0.vhdx/$vmid/vm-$vmid-disk-0.vhdx",
diff --git a/src/test/path_to_volume_id_test.pm b/src/test/path_to_volume_id_test.pm
index 9a5ecbb..ab7e276 100644
--- a/src/test/path_to_volume_id_test.pm
+++ b/src/test/path_to_volume_id_test.pm
@@ -138,10 +138,10 @@ my @tests = (
     },
 
     {
-        description => 'Rootdir',
-        volname => "$storage_dir/private/1234/", # fileparse needs / at the end
+        description => 'Rootdir, folder subvol, legacy naming',
+        volname => "$storage_dir/images/1234/subvol-1234-disk-0.subvol/", # fileparse needs / at the end
         expected => [
-            'rootdir', 'local:rootdir/1234',
+            'ct-vol', 'local:1234/subvol-1234-disk-0.subvol',
         ],
     },
     {
@@ -203,11 +203,6 @@ my @tests = (
         volname => "$storage_dir/template/cache/debian-10.0-standard_10.0-1_amd64.zip.gz",
         expected => [''],
     },
-    {
-        description => 'Rootdir as subvol, wrong path',
-        volname => "$storage_dir/private/subvol-19254-disk-0/",
-        expected => [''],
-    },
     {
         description => 'Backup, wrong format, openvz, zip.gz',
         volname => "$storage_dir/dump/vzdump-openvz-16112-2020_03_30-21_39_30.zip.gz",
-- 
2.47.2



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] 74+ messages in thread

* [pve-devel] [PATCH storage 06/26] common: use v5.36
  2025-07-29 11:15 [pve-devel] [RFC storage 00/26+10+3] unify vtype and content-type and Wolfgang Bumiller
                   ` (4 preceding siblings ...)
  2025-07-29 11:15 ` [pve-devel] [PATCH storage 05/26] tests: drop rootdir/ tests Wolfgang Bumiller
@ 2025-07-29 11:15 ` Wolfgang Bumiller
  2025-07-29 13:59   ` Fiona Ebner
  2025-07-29 11:15 ` [pve-devel] [PATCH storage 07/26] common: add pve-storage-vtype standard option with new types Wolfgang Bumiller
                   ` (33 subsequent siblings)
  39 siblings, 1 reply; 74+ messages in thread
From: Wolfgang Bumiller @ 2025-07-29 11:15 UTC (permalink / raw)
  To: pve-devel

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
---
 src/PVE/Storage/Common.pm | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/PVE/Storage/Common.pm b/src/PVE/Storage/Common.pm
index 746a262..222dc76 100644
--- a/src/PVE/Storage/Common.pm
+++ b/src/PVE/Storage/Common.pm
@@ -1,7 +1,6 @@
 package PVE::Storage::Common;
 
-use strict;
-use warnings;
+use v5.36;
 
 use PVE::JSONSchema;
 use PVE::Syscall;
-- 
2.47.2



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] 74+ messages in thread

* [pve-devel] [PATCH storage 07/26] common: add pve-storage-vtype standard option with new types
  2025-07-29 11:15 [pve-devel] [RFC storage 00/26+10+3] unify vtype and content-type and Wolfgang Bumiller
                   ` (5 preceding siblings ...)
  2025-07-29 11:15 ` [pve-devel] [PATCH storage 06/26] common: use v5.36 Wolfgang Bumiller
@ 2025-07-29 11:15 ` Wolfgang Bumiller
  2025-07-29 13:50   ` Fiona Ebner
  2025-07-29 11:15 ` [pve-devel] [PATCH storage 08/26] prepare for vm-vol and ct-vol content and vtypes Wolfgang Bumiller
                   ` (32 subsequent siblings)
  39 siblings, 1 reply; 74+ messages in thread
From: Wolfgang Bumiller @ 2025-07-29 11:15 UTC (permalink / raw)
  To: pve-devel

This adds the vm-vol and ct-vol vtypes introduced in the upcoming
commits.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
---
 src/PVE/Storage/Common.pm | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/src/PVE/Storage/Common.pm b/src/PVE/Storage/Common.pm
index 222dc76..b2ebd50 100644
--- a/src/PVE/Storage/Common.pm
+++ b/src/PVE/Storage/Common.pm
@@ -59,6 +59,23 @@ PVE::JSONSchema::register_standard_option(
     },
 );
 
+=head3 pve-storage-vtype
+
+Possible vtypes a guest image can have.
+
+=cut
+
+PVE::JSONSchema::register_standard_option(
+    'pve-storage-vtype',
+    {
+        type => 'string',
+        enum => [qw(vm-vol ct-vol images rootdir)],
+        description =>
+            "The volume type indicates whether the volume is meant for VMs or containers."
+            . " The 'images' and 'rootdir' types are for legacy support and should be avoided.",
+    },
+);
+
 =pod
 
 =head1 FUNCTIONS
-- 
2.47.2



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] 74+ messages in thread

* [pve-devel] [PATCH storage 08/26] prepare for vm-vol and ct-vol content and vtypes
  2025-07-29 11:15 [pve-devel] [RFC storage 00/26+10+3] unify vtype and content-type and Wolfgang Bumiller
                   ` (6 preceding siblings ...)
  2025-07-29 11:15 ` [pve-devel] [PATCH storage 07/26] common: add pve-storage-vtype standard option with new types Wolfgang Bumiller
@ 2025-07-29 11:15 ` Wolfgang Bumiller
  2025-07-30  8:38   ` Fabian Grünbichler
  2025-07-30  9:14   ` Fabian Grünbichler
  2025-07-29 11:15 ` [pve-devel] [PATCH storage 09/26] plugins: add new content types to all plugindata Wolfgang Bumiller
                   ` (31 subsequent siblings)
  39 siblings, 2 replies; 74+ messages in thread
From: Wolfgang Bumiller @ 2025-07-29 11:15 UTC (permalink / raw)
  To: pve-devel

Prepares the stoplevel PVE::Storage API updates as well as adding the
new vtype subdirs to the base plugin's vtype subdir hash.

The new types are "vm-vol" and "ct-vol". They represent VM and
container volumes, respectively. The "images" and "rootdir" types are
considered legacy/deprecated, as the "rootdir" type was not properly
used, and container volumes were technically of type "images", with
the "rootdir" case "hacked in" by checking the existing VMs.

To more easily transition, the "images" type is now also a "supertype"
of "vm-vol", and the "rootdir" type a "supertype" of "ct-vol".

- `get_images_dir()` is replaced by `get_vm_volume_dir()`
- `get_private_dir()` is dropped as it is an openvz leftover
- `get_ct_volume_dir()` is added its stead

We now also unify the vtypes and content types. As such,
`content-dirs` can now include separate dirs for `vm-vol` and
`ct-vol`.
This is now also taken into account in `path_to_volume_id()` which
tries to match file system paths to a storage and content type.

The following subs also get a $vtype parameter:
- `vdisk_alloc()`
- `vdisk_clone()`
- `volume_import()`

`volume_list()`'s `$content` parameter allows `vm-vol` and
`ct-vol` as type.

New helpers are added:
- is_content_type_covered($content_hash, $content_type)
  Check if the contents listed in the hash(set) allows the provided
  $content_type.
  Meaning the content type is in the set *or* as supertype is in the
  set (see above).
- storage_check_type_allowed($cfg, $storeid, $type [, $noerr])
  Access to the above in our usual public storag API signature.

Finally: the content type completion also gets the new content types.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
---
 src/PVE/GuestImport.pm    |   2 +-
 src/PVE/Storage.pm        | 113 ++++++++++++++++++++++++++++++--------
 src/PVE/Storage/Plugin.pm |   4 +-
 3 files changed, 95 insertions(+), 24 deletions(-)

diff --git a/src/PVE/GuestImport.pm b/src/PVE/GuestImport.pm
index 3d59dcd..ec2f09d 100644
--- a/src/PVE/GuestImport.pm
+++ b/src/PVE/GuestImport.pm
@@ -40,7 +40,7 @@ sub extract_disk_from_import_file {
 
     my $ova_path = PVE::Storage::path($cfg, $archive_volid);
 
-    my $tmpdir = PVE::Storage::get_image_dir($cfg, $target_storeid, $vmid);
+    my $tmpdir = PVE::Storage::get_vm_volume_dir($cfg, $target_storeid, $vmid);
     my $pid = $$;
     $tmpdir .= "/tmp_${pid}_${vmid}";
     mkpath $tmpdir;
diff --git a/src/PVE/Storage.pm b/src/PVE/Storage.pm
index da53beb..91a0278 100755
--- a/src/PVE/Storage.pm
+++ b/src/PVE/Storage.pm
@@ -547,24 +547,24 @@ sub volume_snapshot_info {
     return $plugin->volume_snapshot_info($scfg, $storeid, $volname);
 }
 
-sub get_image_dir {
+sub get_vm_volume_dir {
     my ($cfg, $storeid, $vmid) = @_;
 
     my $scfg = storage_config($cfg, $storeid);
     my $plugin = PVE::Storage::Plugin->lookup($scfg->{type});
 
-    my $path = $plugin->get_subdir($scfg, 'images');
+    my $path = $plugin->get_subdir($scfg, 'vm-vol');
 
     return $vmid ? "$path/$vmid" : $path;
 }
 
-sub get_private_dir {
+sub get_ct_volume_dir {
     my ($cfg, $storeid, $vmid) = @_;
 
     my $scfg = storage_config($cfg, $storeid);
     my $plugin = PVE::Storage::Plugin->lookup($scfg->{type});
 
-    my $path = $plugin->get_subdir($scfg, 'rootdir');
+    my $path = $plugin->get_subdir($scfg, 'ct-vol');
 
     return $vmid ? "$path/$vmid" : $path;
 }
@@ -737,22 +737,26 @@ sub path_to_volume_id {
         next if !$scfg->{path};
         my $plugin = PVE::Storage::Plugin->lookup($scfg->{type});
         my $imagedir = $plugin->get_subdir($scfg, 'images');
+        my $vmdir = $plugin->get_subdir($scfg, 'vm-vol');
+        my $ctdir = $plugin->get_subdir($scfg, 'ct-vol');
         my $isodir = $plugin->get_subdir($scfg, 'iso');
         my $tmpldir = $plugin->get_subdir($scfg, 'vztmpl');
         my $backupdir = $plugin->get_subdir($scfg, 'backup');
         my $snippetsdir = $plugin->get_subdir($scfg, 'snippets');
         my $importdir = $plugin->get_subdir($scfg, 'import');
 
-        if ($path =~ m!^\Q$imagedir\E/(\d+)/([^/\s]+)$!) {
-            my $vmid = $1;
-            my $name = $2;
+        if ($path =~ m!^(\Q$imagedir\E|\Q$vmdir\E|\Q$ctdir\E)/(\d+)/([^/\s]+)$!) {
+            my $subdir = $1;
+            my $vmid = $2;
+            my $name = $3;
 
             my $vollist = $plugin->list_images($sid, $scfg, $vmid);
             foreach my $info (@$vollist) {
                 my ($storeid, $volname) = parse_volume_id($info->{volid});
+                my ($vtype) = parse_volname($cfg, $info->{volid});
                 my $volpath = $plugin->path($scfg, $volname, $storeid);
                 if ($volpath eq $path) {
-                    return ('images', $info->{volid});
+                    return ($vtype, $info->{volid});
                 }
             }
         } elsif ($path =~ m!^\Q$isodir\E/([^/]+$ISO_EXT_RE_0)$!) {
@@ -822,7 +826,7 @@ sub qemu_blockdev_options {
 
     my ($vtype) = $plugin->parse_volname($volname);
     die "cannot use volume of type '$vtype' as a QEMU blockdevice\n"
-        if $vtype ne 'images' && $vtype ne 'iso' && $vtype ne 'import';
+        if $vtype ne 'vm-vol' && $vtype ne 'images' && $vtype ne 'iso' && $vtype ne 'import';
 
     my $blockdev =
         $plugin->qemu_blockdev_options($scfg, $storeid, $volname, $machine_version, $options);
@@ -884,6 +888,7 @@ my $volume_import_prepare = sub {
     my $with_snapshots = $opts->{with_snapshots} ? 1 : 0;
     my $migration_snapshot = $opts->{migration_snapshot} ? 1 : 0;
     my $allow_rename = $opts->{allow_rename} ? 1 : 0;
+    my $vtype = $opts->{vtype};
 
     my $recv = ['pvesm', 'import', $volid, $format, $path, '-with-snapshots', $with_snapshots];
     if (defined($snapshot)) {
@@ -892,6 +897,9 @@ my $volume_import_prepare = sub {
     if ($migration_snapshot) {
         push @$recv, '-delete-snapshot', $snapshot;
     }
+    if ($vtype) {
+        push @$recv, '-vtype', $vtype;
+    }
     push @$recv, '-allow-rename', $allow_rename;
 
     if (defined($base_snapshot)) {
@@ -1099,7 +1107,7 @@ sub storage_migrate {
 }
 
 sub vdisk_clone {
-    my ($cfg, $volid, $vmid, $snap) = @_;
+    my ($cfg, $volid, $vmid, $snap, $vtype) = @_;
 
     my ($storeid, $volname) = parse_volume_id($volid);
 
@@ -1115,7 +1123,7 @@ sub vdisk_clone {
         $scfg->{shared},
         undef,
         sub {
-            my $volname = $plugin->clone_image($scfg, $storeid, $volname, $vmid, $snap);
+            my $volname = $plugin->clone_image($scfg, $storeid, $volname, $vmid, $snap, $vtype);
             return "$storeid:$volname";
         },
     );
@@ -1168,8 +1176,52 @@ sub unmap_volume {
     return $plugin->unmap_volume($storeid, $scfg, $volname, $snapname);
 }
 
+=head3 is_content_type_covered($content_hash, $content_type)
+
+Check if the C<$content_hash> allows content of type C<$content_type>.
+
+Note that the legacy types C<images> and C<rootdir> will allow content of type C<vm-vol> and
+C<ct-vol> respectively, but not the other way round.
+
+For anything else this just checks whether C<$content_hash->{$content_type}> is set.
+
+=cut
+
+my sub is_content_type_covered : prototype($$) {
+    my ($content_hash, $content_type) = @_;
+
+    return
+        $content_hash->{$content_type}
+        || ($content_type eq 'vm-vol' && $content_hash->{images})
+        || ($content_type eq 'ct-vol' && $content_hash->{rootdir});
+}
+
+=head3 storage_check_type_allowed($cfg, $storeid, $type [, $noerr])
+
+Check if a storage allows content of type C<$type>.
+
+Note that the legacy types C<images> and C<rootdir> will allow content of type C<vm-vol> and
+C<ct-vol> respectively, but not the other way round.
+
+If C<$noerr> is true, returns true if the type is allowed, false otherwise.
+If C<$noerr> is false, dies if the type is not allowed, returns true otherwise.
+
+=cut
+
+sub storage_check_type_allowed : prototype($$$;$) {
+    my ($cfg, $storeid, $content_type, $noerr) = @_;
+
+    my $scfg = storage_config($cfg, $storeid);
+
+    return !!1 if is_content_type_covered($scfg->{content}, $content_type);
+    return !!0 if $noerr;
+    die "storage '$storeid' doees not allow content of type '$content_type'\n";
+}
+
 sub vdisk_alloc {
-    my ($cfg, $storeid, $vmid, $fmt, $name, $size) = @_;
+    my ($cfg, $storeid, $vmid, $fmt, $name, $size, $vtype) = @_;
+
+    die "vdisk_alloc without vtype not allowed anymore\n" if !defined($vtype);
 
     die "no storage ID specified\n" if !$storeid;
 
@@ -1187,6 +1239,8 @@ sub vdisk_alloc {
 
     activate_storage($cfg, $storeid);
 
+    storage_check_type_allowed($cfg, $storeid, $vtype);
+
     # lock shared storage
     return $plugin->cluster_lock_storage(
         $storeid,
@@ -1195,7 +1249,7 @@ sub vdisk_alloc {
         sub {
             my $old_umask = umask(umask | 0037);
             my $volname =
-                eval { $plugin->alloc_image($storeid, $scfg, $vmid, $fmt, $name, $size) };
+                eval { $plugin->alloc_image($storeid, $scfg, $vmid, $fmt, $name, $size, $vtype) };
             my $err = $@;
             umask $old_umask;
             die $err if $err;
@@ -1263,8 +1317,10 @@ sub vdisk_list {
             next if $storeid && $storeid ne $sid;
             next if !storage_check_enabled($cfg, $sid, undef, 1);
             my $content = $ids->{$sid}->{content};
-            next if defined($ctype) && !$content->{$ctype};
-            next if !($content->{rootdir} || $content->{images});
+            next if defined($ctype) && !is_content_type_covered($content, $ctype);
+            next
+                if !(is_content_type_covered($content, 'vm-vol')
+                    || is_content_type_covered($content, 'ct-vol'));
             push @$storage_list, $sid;
         }
     }
@@ -1278,7 +1334,7 @@ sub vdisk_list {
 
         my $scfg = $ids->{$sid};
         my $plugin = PVE::Storage::Plugin->lookup($scfg->{type});
-        $res->{$sid} = $plugin->list_images($sid, $scfg, $vmid, $vollist, $cache);
+        $res->{$sid} = $plugin->list_images($sid, $scfg, $vmid, $vollist, $cache, $ctype);
         @{ $res->{$sid} } = sort { lc($a->{volid}) cmp lc($b->{volid}) } @{ $res->{$sid} }
             if $res->{$sid};
     }
@@ -1318,13 +1374,15 @@ sub template_list {
 sub volume_list {
     my ($cfg, $storeid, $vmid, $content) = @_;
 
+    # We don't need to extend this by 'vm-vol' and 'ct-vol' as they are included by 'images' and
+    # 'rootdir'.
     my @ctypes = qw(rootdir images vztmpl iso backup snippets import);
 
     my $cts = $content ? [$content] : [@ctypes];
 
     my $scfg = PVE::Storage::storage_config($cfg, $storeid);
 
-    $cts = [grep { defined($scfg->{content}->{$_}) } @$cts];
+    $cts = [grep { is_content_type_covered($scfg->{content}, $_) } @$cts];
 
     my $plugin = PVE::Storage::Plugin->lookup($scfg->{type});
 
@@ -2121,8 +2179,18 @@ sub volume_export : prototype($$$$$$$) {
     );
 }
 
-sub volume_import : prototype($$$$$$$$) {
-    my ($cfg, $fh, $volid, $format, $snapshot, $base_snapshot, $with_snapshots, $allow_rename) = @_;
+sub volume_import : prototype($$$$$$$$$) {
+    my (
+        $cfg,
+        $fh,
+        $volid,
+        $format,
+        $snapshot,
+        $base_snapshot,
+        $with_snapshots,
+        $allow_rename,
+        $import_vtype,
+    ) = @_;
 
     my ($storeid, $volname) = parse_volume_id($volid, 1);
     die "cannot import into volume '$volid'\n" if !$storeid;
@@ -2138,6 +2206,7 @@ sub volume_import : prototype($$$$$$$$) {
         $base_snapshot,
         $with_snapshots,
         $allow_rename,
+        $import_vtype,
     ) // $volid;
 }
 
@@ -2288,7 +2357,7 @@ sub complete_storage_enabled {
 sub complete_content_type {
     my ($cmdname, $pname, $cvalue) = @_;
 
-    return [qw(rootdir images vztmpl iso backup snippets)];
+    return [qw(vm-vol ct-vol rootdir images vztmpl iso backup snippets)];
 }
 
 sub complete_volume {
@@ -2326,7 +2395,7 @@ sub complete_volume {
 }
 
 sub rename_volume {
-    my ($cfg, $source_volid, $target_vmid, $target_volname) = @_;
+    my ($cfg, $source_volid, $target_vmid, $target_volname, $vtype) = @_;
 
     die "no source volid provided\n" if !$source_volid;
     die "no target VMID or target volname provided\n" if !$target_vmid && !$target_volname;
@@ -2346,7 +2415,7 @@ sub rename_volume {
         undef,
         sub {
             return $plugin->rename_volume(
-                $scfg, $storeid, $source_volname, $target_vmid, $target_volname,
+                $scfg, $storeid, $source_volname, $target_vmid, $target_volname, $vtype,
             );
         },
     );
diff --git a/src/PVE/Storage/Plugin.pm b/src/PVE/Storage/Plugin.pm
index 0107976..ae9d673 100644
--- a/src/PVE/Storage/Plugin.pm
+++ b/src/PVE/Storage/Plugin.pm
@@ -771,7 +771,9 @@ sub parse_volname {
 
 my $vtype_subdirs = {
     images => 'images',
-    rootdir => 'private',
+    rootdir => 'images',
+    'vm-vol' => 'vms',
+    'ct-vol' => 'cts',
     iso => 'template/iso',
     vztmpl => 'template/cache',
     backup => 'dump',
-- 
2.47.2



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] 74+ messages in thread

* [pve-devel] [PATCH storage 09/26] plugins: add new content types to all plugindata
  2025-07-29 11:15 [pve-devel] [RFC storage 00/26+10+3] unify vtype and content-type and Wolfgang Bumiller
                   ` (7 preceding siblings ...)
  2025-07-29 11:15 ` [pve-devel] [PATCH storage 08/26] prepare for vm-vol and ct-vol content and vtypes Wolfgang Bumiller
@ 2025-07-29 11:15 ` Wolfgang Bumiller
  2025-07-30  8:38   ` Fabian Grünbichler
  2025-07-29 11:15 ` [pve-devel] [PATCH storage 10/26] plugins: update volname parsing for new naming convention Wolfgang Bumiller
                   ` (30 subsequent siblings)
  39 siblings, 1 reply; 74+ messages in thread
From: Wolfgang Bumiller @ 2025-07-29 11:15 UTC (permalink / raw)
  To: pve-devel

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
---
 src/PVE/Storage/BTRFSPlugin.pm       |  4 +++-
 src/PVE/Storage/CIFSPlugin.pm        |  4 +++-
 src/PVE/Storage/DirPlugin.pm         |  4 +++-
 src/PVE/Storage/ISCSIDirectPlugin.pm |  2 +-
 src/PVE/Storage/ISCSIPlugin.pm       |  2 +-
 src/PVE/Storage/LVMPlugin.pm         | 10 +++++++++-
 src/PVE/Storage/LvmThinPlugin.pm     | 15 ++++++++++++++-
 src/PVE/Storage/NFSPlugin.pm         |  4 +++-
 src/PVE/Storage/RBDPlugin.pm         | 10 +++++++++-
 src/PVE/Storage/ZFSPlugin.pm         |  2 +-
 src/PVE/Storage/ZFSPoolPlugin.pm     | 15 ++++++++++++++-
 11 files changed, 61 insertions(+), 11 deletions(-)

diff --git a/src/PVE/Storage/BTRFSPlugin.pm b/src/PVE/Storage/BTRFSPlugin.pm
index bd2c0bf..d1c0cf9 100644
--- a/src/PVE/Storage/BTRFSPlugin.pm
+++ b/src/PVE/Storage/BTRFSPlugin.pm
@@ -35,6 +35,8 @@ sub plugindata {
             {
                 images => 1,
                 rootdir => 1,
+                'vm-vol' => 1,
+                'ct-vol' => 1,
                 vztmpl => 1,
                 iso => 1,
                 backup => 1,
@@ -42,7 +44,7 @@ sub plugindata {
                 none => 1,
                 import => 1,
             },
-            { images => 1, rootdir => 1 },
+            { 'vm-vol' => 1, 'ct-vol' => 1, images => 1, rootdir => 1 },
         ],
         format => [{ raw => 1, subvol => 1 }, 'raw'],
         'sensitive-properties' => {},
diff --git a/src/PVE/Storage/CIFSPlugin.pm b/src/PVE/Storage/CIFSPlugin.pm
index 75d89c1..5d59c7c 100644
--- a/src/PVE/Storage/CIFSPlugin.pm
+++ b/src/PVE/Storage/CIFSPlugin.pm
@@ -102,13 +102,15 @@ sub plugindata {
             {
                 images => 1,
                 rootdir => 1,
+                'vm-vol' => 1,
+                'ct-vol' => 1,
                 vztmpl => 1,
                 iso => 1,
                 backup => 1,
                 snippets => 1,
                 import => 1,
             },
-            { images => 1 },
+            { 'vm-vol' => 1, images => 1 },
         ],
         format => [{ raw => 1, qcow2 => 1, vmdk => 1 }, 'raw'],
         'sensitive-properties' => { password => 1 },
diff --git a/src/PVE/Storage/DirPlugin.pm b/src/PVE/Storage/DirPlugin.pm
index 9d15f33..53aded3 100644
--- a/src/PVE/Storage/DirPlugin.pm
+++ b/src/PVE/Storage/DirPlugin.pm
@@ -28,6 +28,8 @@ sub plugindata {
             {
                 images => 1,
                 rootdir => 1,
+                'vm-vol' => 1,
+                'ct-vol' => 1,
                 vztmpl => 1,
                 iso => 1,
                 backup => 1,
@@ -35,7 +37,7 @@ sub plugindata {
                 none => 1,
                 import => 1,
             },
-            { images => 1, rootdir => 1 },
+            { 'vm-vol' => 1, 'ct-vol' => 1, images => 1, rootdir => 1 },
         ],
         format => [{ raw => 1, qcow2 => 1, vmdk => 1, subvol => 1 }, 'raw'],
         'sensitive-properties' => {},
diff --git a/src/PVE/Storage/ISCSIDirectPlugin.pm b/src/PVE/Storage/ISCSIDirectPlugin.pm
index 62e9026..069a41f 100644
--- a/src/PVE/Storage/ISCSIDirectPlugin.pm
+++ b/src/PVE/Storage/ISCSIDirectPlugin.pm
@@ -64,7 +64,7 @@ sub type {
 
 sub plugindata {
     return {
-        content => [{ images => 1, none => 1 }, { images => 1 }],
+        content => [{ 'vm-vol' => 1, images => 1, none => 1 }, { 'vm-vol' => 1, images => 1 }],
         select_existing => 1,
         'sensitive-properties' => {},
     };
diff --git a/src/PVE/Storage/ISCSIPlugin.pm b/src/PVE/Storage/ISCSIPlugin.pm
index 7691ec6..7b30955 100644
--- a/src/PVE/Storage/ISCSIPlugin.pm
+++ b/src/PVE/Storage/ISCSIPlugin.pm
@@ -334,7 +334,7 @@ sub type {
 
 sub plugindata {
     return {
-        content => [{ images => 1, none => 1 }, { images => 1 }],
+        content => [{ 'vm-vol' => 1, images => 1, none => 1 }, { 'vm-vol' => 1, images => 1 }],
         select_existing => 1,
         'sensitive-properties' => {},
     };
diff --git a/src/PVE/Storage/LVMPlugin.pm b/src/PVE/Storage/LVMPlugin.pm
index c1f5474..6694cf2 100644
--- a/src/PVE/Storage/LVMPlugin.pm
+++ b/src/PVE/Storage/LVMPlugin.pm
@@ -354,7 +354,15 @@ sub type {
 
 sub plugindata {
     return {
-        content => [{ images => 1, rootdir => 1 }, { images => 1 }],
+        content => [
+            {
+                'vm-vol' => 1,
+                'ct-vol' => 1,
+                images => 1,
+                rootdir => 1,
+            },
+            { 'vm-vol' => 1, images => 1 },
+        ],
         format => [{ raw => 1, qcow2 => 1 }, 'raw'],
         'sensitive-properties' => {},
     };
diff --git a/src/PVE/Storage/LvmThinPlugin.pm b/src/PVE/Storage/LvmThinPlugin.pm
index ccefd0e..cdf0fd0 100644
--- a/src/PVE/Storage/LvmThinPlugin.pm
+++ b/src/PVE/Storage/LvmThinPlugin.pm
@@ -30,7 +30,20 @@ sub type {
 
 sub plugindata {
     return {
-        content => [{ images => 1, rootdir => 1 }, { images => 1, rootdir => 1 }],
+        content => [
+            {
+                'vm-vol' => 1,
+                'ct-vol' => 1,
+                images => 1,
+                rootdir => 1,
+            },
+            {
+                'vm-vol' => 1,
+                'ct-vol' => 1,
+                images => 1,
+                rootdir => 1,
+            },
+        ],
         'sensitive-properties' => {},
     };
 }
diff --git a/src/PVE/Storage/NFSPlugin.pm b/src/PVE/Storage/NFSPlugin.pm
index a8339ef..4c23cd5 100644
--- a/src/PVE/Storage/NFSPlugin.pm
+++ b/src/PVE/Storage/NFSPlugin.pm
@@ -57,13 +57,15 @@ sub plugindata {
             {
                 images => 1,
                 rootdir => 1,
+                'vm-vol' => 1,
+                'ct-vol' => 1,
                 vztmpl => 1,
                 iso => 1,
                 backup => 1,
                 snippets => 1,
                 import => 1,
             },
-            { images => 1 },
+            { 'vm-vol' => 1, images => 1 },
         ],
         format => [{ raw => 1, qcow2 => 1, vmdk => 1 }, 'raw'],
         'sensitive-properties' => {},
diff --git a/src/PVE/Storage/RBDPlugin.pm b/src/PVE/Storage/RBDPlugin.pm
index cf371c7..9f95c73 100644
--- a/src/PVE/Storage/RBDPlugin.pm
+++ b/src/PVE/Storage/RBDPlugin.pm
@@ -392,7 +392,15 @@ sub type {
 
 sub plugindata {
     return {
-        content => [{ images => 1, rootdir => 1 }, { images => 1 }],
+        content => [
+            {
+                'vm-vol' => 1,
+                'ct-vol' => 1,
+                images => 1,
+                rootdir => 1,
+            },
+            { 'vm-vol' => 1, images => 1 },
+        ],
         'sensitive-properties' => { keyring => 1 },
     };
 }
diff --git a/src/PVE/Storage/ZFSPlugin.pm b/src/PVE/Storage/ZFSPlugin.pm
index 99d8c8f..a05f521 100644
--- a/src/PVE/Storage/ZFSPlugin.pm
+++ b/src/PVE/Storage/ZFSPlugin.pm
@@ -175,7 +175,7 @@ sub type {
 
 sub plugindata {
     return {
-        content => [{ images => 1 }, { images => 1 }],
+        content => [{ 'vm-vol' => 1, images => 1 }, { 'vm-vol' => 1, images => 1 }],
         'sensitive-properties' => {},
     };
 }
diff --git a/src/PVE/Storage/ZFSPoolPlugin.pm b/src/PVE/Storage/ZFSPoolPlugin.pm
index cdf5868..0152c89 100644
--- a/src/PVE/Storage/ZFSPoolPlugin.pm
+++ b/src/PVE/Storage/ZFSPoolPlugin.pm
@@ -20,7 +20,20 @@ sub type {
 
 sub plugindata {
     return {
-        content => [{ images => 1, rootdir => 1 }, { images => 1, rootdir => 1 }],
+        content => [
+            {
+                'vm-vol' => 1,
+                'ct-vol' => 1,
+                images => 1,
+                rootdir => 1,
+            },
+            {
+                'vm-vol' => 1,
+                'ct-vol' => 1,
+                images => 1,
+                rootdir => 1,
+            },
+        ],
         format => [{ raw => 1, subvol => 1 }, 'raw'],
         'sensitive-properties' => {},
     };
-- 
2.47.2



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] 74+ messages in thread

* [pve-devel] [PATCH storage 10/26] plugins: update volname parsing for new naming convention
  2025-07-29 11:15 [pve-devel] [RFC storage 00/26+10+3] unify vtype and content-type and Wolfgang Bumiller
                   ` (8 preceding siblings ...)
  2025-07-29 11:15 ` [pve-devel] [PATCH storage 09/26] plugins: add new content types to all plugindata Wolfgang Bumiller
@ 2025-07-29 11:15 ` Wolfgang Bumiller
  2025-07-30  8:37   ` Fabian Grünbichler
  2025-07-29 11:15 ` [pve-devel] [PATCH storage 11/26] plugin: add vm/ct-vol to 'local' storage default content types Wolfgang Bumiller
                   ` (29 subsequent siblings)
  39 siblings, 1 reply; 74+ messages in thread
From: Wolfgang Bumiller @ 2025-07-29 11:15 UTC (permalink / raw)
  To: pve-devel

- ESXi, ISCSIDirect, ISCSI:
  Volumes are always vm volumes.
- LVM:
  New volumes use a `vol-vm-` or `vol-ct-` prefix.
- Dir based, LvmThin, RBD:
  Like LVM, but for base images a `base-` prefix is added
  *additionally*, instead of *replacing* the `vm-` portion like we
  used to.
- ZFS:
  VMs: `vol-vm-` prefix.
  Containers: `subvol-ct-` prefix.
  Both also get an optional additional `base-` prefix for base
  volumes.

Note: all new base- prefix come in front of the `(sub)vol-*` prefixes.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
---
 src/PVE/Storage/ESXiPlugin.pm        |  2 +-
 src/PVE/Storage/ISCSIDirectPlugin.pm |  2 +-
 src/PVE/Storage/ISCSIPlugin.pm       |  2 +-
 src/PVE/Storage/LVMPlugin.pm         | 19 ++++++++---
 src/PVE/Storage/LvmThinPlugin.pm     | 13 ++++++++
 src/PVE/Storage/Plugin.pm            | 48 +++++++++++++++++++++-------
 src/PVE/Storage/RBDPlugin.pm         | 45 ++++++++++++++++++++++++--
 src/PVE/Storage/ZFSPoolPlugin.pm     | 34 ++++++++++++++++----
 8 files changed, 138 insertions(+), 27 deletions(-)

diff --git a/src/PVE/Storage/ESXiPlugin.pm b/src/PVE/Storage/ESXiPlugin.pm
index eeb6a48..ea2f8f9 100644
--- a/src/PVE/Storage/ESXiPlugin.pm
+++ b/src/PVE/Storage/ESXiPlugin.pm
@@ -421,7 +421,7 @@ sub parse_volname {
 
     my $format = 'raw';
     $format = 'vmdk' if $volname =~ /\.vmdk$/;
-    return ('images', $volname, 0, undef, undef, undef, $format);
+    return ('vm-vol', $volname, 0, undef, undef, undef, $format);
 }
 
 sub list_images {
diff --git a/src/PVE/Storage/ISCSIDirectPlugin.pm b/src/PVE/Storage/ISCSIDirectPlugin.pm
index 069a41f..f5b466e 100644
--- a/src/PVE/Storage/ISCSIDirectPlugin.pm
+++ b/src/PVE/Storage/ISCSIDirectPlugin.pm
@@ -87,7 +87,7 @@ sub parse_volname {
     my ($class, $volname) = @_;
 
     if ($volname =~ m/^lun(\d+)$/) {
-        return ('images', $1, undef, undef, undef, undef, 'raw');
+        return ('vm-vol', $1, undef, undef, undef, undef, 'raw');
     }
 
     die "unable to parse iscsi volume name '$volname'\n";
diff --git a/src/PVE/Storage/ISCSIPlugin.pm b/src/PVE/Storage/ISCSIPlugin.pm
index 7b30955..4875a1f 100644
--- a/src/PVE/Storage/ISCSIPlugin.pm
+++ b/src/PVE/Storage/ISCSIPlugin.pm
@@ -371,7 +371,7 @@ sub parse_volname {
     my ($class, $volname) = @_;
 
     if ($volname =~ m!^\d+\.\d+\.\d+\.([^/\s]+)$!) {
-        return ('images', $1, undef, undef, undef, undef, 'raw');
+        return ('vm-vol', $1, undef, undef, undef, undef, 'raw');
     }
 
     die "unable to parse iscsi volume name '$volname'\n";
diff --git a/src/PVE/Storage/LVMPlugin.pm b/src/PVE/Storage/LVMPlugin.pm
index 6694cf2..9b88c6a 100644
--- a/src/PVE/Storage/LVMPlugin.pm
+++ b/src/PVE/Storage/LVMPlugin.pm
@@ -452,11 +452,22 @@ sub parse_volname {
 
     PVE::Storage::Plugin::parse_lvm_name($volname);
 
-    if ($volname =~ m/^(vm-(\d+)-\S+)$/) {
-        my $name = $1;
-        my $vmid = $2;
+    if (
+        $volname =~ m!^(?<name>
+        (
+            # New style volumes have a vtype:
+              vol-(?<vtype>vm|ct)
+
+            # Old style:
+            | vm
+        )
+        -(?<vmid>\d+)-\S+
+        )$!xn
+    ) {
+        my ($name, $vmid, $vtype) = @+{qw(name vmid vtype)};
+        $vtype = $vtype ? "$vtype-vol" : 'images';
         my $format = $volname =~ m/\.qcow2$/ ? 'qcow2' : 'raw';
-        return ('images', $name, $vmid, undef, undef, undef, $format);
+        return ($vtype, $name, $vmid, undef, undef, undef, $format);
     }
 
     die "unable to parse lvm volume name '$volname'\n";
diff --git a/src/PVE/Storage/LvmThinPlugin.pm b/src/PVE/Storage/LvmThinPlugin.pm
index cdf0fd0..751bd7b 100644
--- a/src/PVE/Storage/LvmThinPlugin.pm
+++ b/src/PVE/Storage/LvmThinPlugin.pm
@@ -77,6 +77,19 @@ sub parse_volname {
 
     PVE::Storage::Plugin::parse_lvm_name($volname);
 
+    # New naming convention:
+    if (
+        $volname =~ m/^(?<name>
+        (?<isbase>base-)?
+        (?:vol-(?<vtype> vm|ct))-
+        (?<vmid>\d+)-
+        \S+)$/xn
+    ) {
+        my ($name, $vmid, $vtype, $isbase) = @+{qw(name vmid vtype isbase)};
+        return ($vtype . '-vol', $name, $vmid, undef, undef, !!$isbase, 'raw');
+    }
+
+    # Old naming convention:
     if ($volname =~ m/^((vm|base)-(\d+)-\S+)$/) {
         return ('images', $1, $3, undef, undef, $2 eq 'base', 'raw');
     }
diff --git a/src/PVE/Storage/Plugin.pm b/src/PVE/Storage/Plugin.pm
index ae9d673..77bcfc7 100644
--- a/src/PVE/Storage/Plugin.pm
+++ b/src/PVE/Storage/Plugin.pm
@@ -711,19 +711,46 @@ sub cluster_lock_storage {
 my sub parse_snap_name {
     my ($name) = @_;
 
+    if ($name =~ m/^snap-(.*)-vol-(?:vm|ct)(.*)$/) {
+        return $1;
+    }
+
     if ($name =~ m/^snap-(.*)-vm(.*)$/) {
         return $1;
     }
+
+    return;
 }
 
+our $DISK_NAME_REGEX = qr!
+    (?<name>
+        (
+            # New convention: 'base-' prefix, 'vol-vm' and 'subvol-ct'.
+              (?<israw> (?<isbase>base-)? vol-    (?<vtype> vm|ct))
+            | (?<issub> (?<isbase>base-)? subvol- (?<vtype> ct))
+
+            # Old convention: "vm" vs "base" and "subvol" vs "basevol"
+            | (?<israw> vm)
+            | (?<issub> subvol)
+            | (?<israw> (?<isbase>base))
+            | (?<issub> (?<isbase>basevol))
+        )
+        -
+        (?<vmid>\d+)
+        -
+        (?<label>[^/\s]+)
+    )
+!xn;
+
 sub parse_name_dir {
-    my $name = shift;
+    my ($name) = @_;
 
-    if ($name =~ m!^((vm-|base-|subvol-)(\d+)-[^/\s]+\.(raw|qcow2|vmdk|subvol))$!) {
-        my $isbase = $2 eq 'base-' ? $2 : undef;
-        return ($1, $4, $isbase); # (name, format, isBase)
+    if ($name =~ m!^$DISK_NAME_REGEX\.(?<format>raw|qcow2|vmdk|subvol)$!xn) {
+        my ($name, $israw, $issub, $isbase, $vmid, $vtype, $label, $format) =
+            @+{qw(name israw issub isbase vmid vtype label format)};
+        return ($name, $format, !!$isbase, $vtype ? "$vtype-vol" : "images");
     } elsif ($name =~ m!^((base-)?[^/\s]+\.(raw|qcow2|vmdk|subvol))$!) {
-        warn "this volume name `$name` is not supported anymore\n" if !parse_snap_name($name);
+        die "this volume name `$name` is not supported anymore\n";
     }
 
     die "unable to parse volume filename '$name'\n";
@@ -733,15 +760,14 @@ sub parse_volname {
     my ($class, $volname) = @_;
 
     if ($volname =~ m!^(\d+)/(\S+)/(\d+)/(\S+)$!) {
-        my ($basedvmid, $basename) = ($1, $2);
+        my ($basedvmid, $basename, $vmid, $name) = ($1, $2, $3, $4);
         parse_name_dir($basename);
-        my ($vmid, $name) = ($3, $4);
-        my (undef, $format, $isBase) = parse_name_dir($name);
-        return ('images', $name, $vmid, $basename, $basedvmid, $isBase, $format);
+        my (undef, $format, $isBase, $vtype) = parse_name_dir($name);
+        return ($vtype, $name, $vmid, $basename, $basedvmid, $isBase, $format);
     } elsif ($volname =~ m!^(\d+)/(\S+)$!) {
         my ($vmid, $name) = ($1, $2);
-        my (undef, $format, $isBase) = parse_name_dir($name);
-        return ('images', $name, $vmid, undef, undef, $isBase, $format);
+        my (undef, $format, $isBase, $vtype) = parse_name_dir($name);
+        return ($vtype, $name, $vmid, undef, undef, $isBase, $format);
     } elsif ($volname =~ m!^iso/([^/]+$PVE::Storage::ISO_EXT_RE_0)$!) {
         return ('iso', $1, undef, undef, undef, undef, 'raw');
     } elsif ($volname =~ m!^vztmpl/([^/]+$PVE::Storage::VZTMPL_EXT_RE_1)$!) {
diff --git a/src/PVE/Storage/RBDPlugin.pm b/src/PVE/Storage/RBDPlugin.pm
index 9f95c73..4400aeb 100644
--- a/src/PVE/Storage/RBDPlugin.pm
+++ b/src/PVE/Storage/RBDPlugin.pm
@@ -224,15 +224,26 @@ sub rbd_ls {
 
         my $image = $el->{image};
 
-        my ($owner) = $image =~ m/^(?:vm|base)-(\d+)-/;
-        next if !defined($owner);
+        my ($owner, $vtype);
+        if ($image =~ /^(?:base-)?vol-(vm|ct)-(\d+)-/) {
+            $vtype = $1;
+            $owner = $2;
+        } elsif ($image =~ /^(?:vm|base)-(\d+)-/) {
+            $owner = $1;
+        } else {
+            next;
+        }
 
-        $list->{$image} = {
+        my $info = {
             name => $image,
             size => $el->{size},
             parent => $get_parent_image_name->($el->{parent}),
             vmid => $owner,
         };
+
+        $info->{vtype} = $vtype if defined($vtype);
+
+        $list->{$image} = $info;
     }
 
     return $list;
@@ -498,6 +509,34 @@ sub on_delete_hook {
 sub parse_volname {
     my ($class, $volname) = @_;
 
+    # New naming scheme:
+    if (
+        $volname =~ m!^(?<name>
+        (?<hasbase>
+            base-
+            (?<basevmid> \d+ )-
+            (?<basename> \S+ )
+            /
+        )?
+        (?<isbase> base- )?
+        vol-(?<vtype> vm | ct )-
+        (?<vmid> \d+ )-
+        (?<name> \S+ )
+        )$
+        !x
+    ) {
+        return (
+            $+{vtype} . '-vol',
+            $+{name},
+            $+{vmid},
+            $+{basename},
+            $+{basevmid},
+            !!$+{isbase},
+            'raw',
+        );
+    }
+
+    # Old naming scheme:
     if ($volname =~ m/^((base-(\d+)-\S+)\/)?((base)?(vm)?-(\d+)-\S+)$/) {
         return ('images', $4, $7, $2, $3, $5, 'raw');
     }
diff --git a/src/PVE/Storage/ZFSPoolPlugin.pm b/src/PVE/Storage/ZFSPoolPlugin.pm
index 0152c89..8e917b4 100644
--- a/src/PVE/Storage/ZFSPoolPlugin.pm
+++ b/src/PVE/Storage/ZFSPoolPlugin.pm
@@ -91,8 +91,15 @@ sub zfs_parse_zvol_list {
         my $parsed_pool = join('/', @parts);
         next if $parsed_pool ne $pool;
 
-        next unless $name =~ m!^(vm|base|subvol|basevol)-(\d+)-(\S+)$!;
-        $zvol->{owner} = $2;
+        if ($name =~ m!^((base-)?vol-vm)-(?<owner>\d+)-\S+$!n) {
+            $zvol->{owner} = $+{owner};
+        } elsif ($name =~ m!^((base-)?subvol-ct)-(?<owner>\d+)-\S+$!n) {
+            $zvol->{owner} = $+{owner};
+        } elsif ($name =~ m!^(vm|base|subvol|basevol)-(?<owner>\d+)-(\S+)$!n) {
+            $zvol->{owner} = $+{owner};
+        } else {
+            next;
+        }
 
         $zvol->{name} = $name;
         if ($type eq 'filesystem') {
@@ -118,10 +125,25 @@ sub zfs_parse_zvol_list {
 sub parse_volname {
     my ($class, $volname) = @_;
 
-    if ($volname =~ m/^(((base|basevol)-(\d+)-\S+)\/)?((base|basevol|vm|subvol)-(\d+)-\S+)$/) {
-        my $format = ($6 eq 'subvol' || $6 eq 'basevol') ? 'subvol' : 'raw';
-        my $isBase = ($6 eq 'base' || $6 eq 'basevol');
-        return ('images', $5, $7, $2, $4, $isBase, $format);
+    if (
+        $volname =~ m!^
+        ((?<basename>
+            (base-vol-vm | base-subvol-ct | base | basevol)
+            - (?<basevmid>\d+)
+            - \S+)
+        /)?
+        ${PVE::Storage::Plugin::DISK_NAME_REGEX}
+        $!xn
+    ) {
+        my ($basename, $basevmid, $name, $israw, $issub, $isbase, $vmid, $vtype) =
+            @+{qw(basename basevmid name israw issub isbase vmid vtype)};
+        my $format = $issub ? 'subvol' : 'raw';
+        if ($vtype) {
+            $vtype = "${vtype}-vol";
+        } else {
+            $vtype = $issub ? 'ct-vol' : 'vm-vol';
+        }
+        return ($vtype, $name, $vmid, $basename, $basevmid, $isbase, $format);
     }
 
     die "unable to parse zfs volume name '$volname'\n";
-- 
2.47.2



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] 74+ messages in thread

* [pve-devel] [PATCH storage 11/26] plugin: add vm/ct-vol to 'local' storage default content types
  2025-07-29 11:15 [pve-devel] [RFC storage 00/26+10+3] unify vtype and content-type and Wolfgang Bumiller
                   ` (9 preceding siblings ...)
  2025-07-29 11:15 ` [pve-devel] [PATCH storage 10/26] plugins: update volname parsing for new naming convention Wolfgang Bumiller
@ 2025-07-29 11:15 ` Wolfgang Bumiller
  2025-07-29 11:15 ` [pve-devel] [PATCH storage 12/26] plugin: support new vtypes in activate_storage checks Wolfgang Bumiller
                   ` (28 subsequent siblings)
  39 siblings, 0 replies; 74+ messages in thread
From: Wolfgang Bumiller @ 2025-07-29 11:15 UTC (permalink / raw)
  To: pve-devel

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
---
 src/PVE/Storage/Plugin.pm | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/PVE/Storage/Plugin.pm b/src/PVE/Storage/Plugin.pm
index 77bcfc7..98788d1 100644
--- a/src/PVE/Storage/Plugin.pm
+++ b/src/PVE/Storage/Plugin.pm
@@ -565,8 +565,10 @@ sub parse_config {
             content => {
                 backup => 1,
                 images => 1,
-                iso => 1,
+                'vm-vol' => 1,
                 rootdir => 1,
+                'ct-vol' => 1,
+                iso => 1,
                 snippets => 1,
                 vztmpl => 1,
             },
-- 
2.47.2



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] 74+ messages in thread

* [pve-devel] [PATCH storage 12/26] plugin: support new vtypes in activate_storage checks
  2025-07-29 11:15 [pve-devel] [RFC storage 00/26+10+3] unify vtype and content-type and Wolfgang Bumiller
                   ` (10 preceding siblings ...)
  2025-07-29 11:15 ` [pve-devel] [PATCH storage 11/26] plugin: add vm/ct-vol to 'local' storage default content types Wolfgang Bumiller
@ 2025-07-29 11:15 ` Wolfgang Bumiller
  2025-07-30  8:36   ` Fabian Grünbichler
  2025-07-29 11:15 ` [pve-devel] [PATCH storage 13/26] plugin, btrfs: update list_images and list_volumes Wolfgang Bumiller
                   ` (27 subsequent siblings)
  39 siblings, 1 reply; 74+ messages in thread
From: Wolfgang Bumiller @ 2025-07-29 11:15 UTC (permalink / raw)
  To: pve-devel

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
---
 src/PVE/Storage/Plugin.pm | 20 ++++++++++++++++++--
 1 file changed, 18 insertions(+), 2 deletions(-)

diff --git a/src/PVE/Storage/Plugin.pm b/src/PVE/Storage/Plugin.pm
index 98788d1..047b2fc 100644
--- a/src/PVE/Storage/Plugin.pm
+++ b/src/PVE/Storage/Plugin.pm
@@ -1882,15 +1882,31 @@ sub activate_storage {
 
         # check that content dirs are pairwise inequal
         my $resolved_subdirs = {};
-        for my $vtype (sort keys $scfg->{content}->%*) {
+        my %done;
+        my $check = sub {
+            my ($vtype) = @_;
+
+            return if $done{$vtype};
+            $done{$vtype} = 1;
+
             my $subdir = $class->get_subdir($scfg, $vtype);
             my $abs_subdir = abs_path($subdir);
-            next if !defined($abs_subdir);
+            return if !defined($abs_subdir);
 
             die "storage '$storeid' uses directory $abs_subdir for multiple content types\n"
                 if defined($abs_subdir) && defined($resolved_subdirs->{$abs_subdir});
 
             $resolved_subdirs->{$abs_subdir} = 1;
+        };
+        for my $vtype (sort keys $scfg->{content}->%*) {
+            if ($vtype eq 'images') {
+                $check->('vm-vol');
+                $check->('ct-vol');
+            } elsif ($vtype eq 'rootdir') {
+                $check->('ct-vol');
+            } else {
+                $check->($vtype);
+            }
         }
     }
 }
-- 
2.47.2



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] 74+ messages in thread

* [pve-devel] [PATCH storage 13/26] plugin, btrfs: update list_images and list_volumes
  2025-07-29 11:15 [pve-devel] [RFC storage 00/26+10+3] unify vtype and content-type and Wolfgang Bumiller
                   ` (11 preceding siblings ...)
  2025-07-29 11:15 ` [pve-devel] [PATCH storage 12/26] plugin: support new vtypes in activate_storage checks Wolfgang Bumiller
@ 2025-07-29 11:15 ` Wolfgang Bumiller
  2025-07-30  8:36   ` Fabian Grünbichler
  2025-07-29 11:15 ` [pve-devel] [PATCH storage 14/26] plugins: update image/volume listing to support new types Wolfgang Bumiller
                   ` (26 subsequent siblings)
  39 siblings, 1 reply; 74+ messages in thread
From: Wolfgang Bumiller @ 2025-07-29 11:15 UTC (permalink / raw)
  To: pve-devel

`list_images()` now takes a vtype.

If it is not set, we act like we did previously by listing *all*
images. This now includes the vm-vol and ct-vol types ones.

If a new vtype is set (vm-vol or ct-vol), then we list only those.

For "images" we list both 'vm-vol', for "rootdir" we list both
"ct-vol" and the "rootdir" type.

NOTE: Previously the "rootdir" `content-dirs` option did not take
effect, which is why the `list_images()` implementation for `rootdir`
uses the `images` subdir.
This means that `list_images()` in particular lists all/the same
untyped images regardless of whether `images` or `rootdir` is used as
a type. For `list_volumes()`, the previous strategy of using the
existing VMs to decide the volume-type will be used.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
---
 src/PVE/Storage/BTRFSPlugin.pm |  44 ++++++++++-
 src/PVE/Storage/Plugin.pm      | 139 +++++++++++++++++++++++++++++----
 2 files changed, 163 insertions(+), 20 deletions(-)

diff --git a/src/PVE/Storage/BTRFSPlugin.pm b/src/PVE/Storage/BTRFSPlugin.pm
index d1c0cf9..585489c 100644
--- a/src/PVE/Storage/BTRFSPlugin.pm
+++ b/src/PVE/Storage/BTRFSPlugin.pm
@@ -645,13 +645,40 @@ sub volume_has_feature {
 }
 
 sub list_images {
-    my ($class, $storeid, $scfg, $vmid, $vollist, $cache) = @_;
-    my $imagedir = $class->get_subdir($scfg, 'images');
+    my ($class, $storeid, $scfg, $vmid, $vollist, $cache, $content_type) = @_;
+
+    my @image_dirs;
+    if (defined($content_type)) {
+        if ($content_type eq 'images') {
+            @image_dirs = (
+                [undef, $class->get_subdir($scfg, 'images')],
+                ['vm-vol', $class->get_subdir($scfg, 'vm-vol')],
+            );
+        } elsif ($content_type eq 'rootdir') {
+            # In the legacy case, the 'rootdir' `content-dir` option did not take
+            # effect, so use the 'images' dir for it, as that is what it used to return!
+            @image_dirs = (
+                [undef, $class->get_subdir($scfg, 'images')],
+                ['ct-vol', $class->get_subdir($scfg, 'ct-vol')],
+            );
+        } else {
+            @image_dirs = [$content_type, $class->get_subdir($scfg, $content_type)];
+        }
+    } else {
+        @image_dirs = (
+            [undef, $class->get_subdir($scfg, 'images')],
+            ['vm-vol', $class->get_subdir($scfg, 'vm-vol')],
+            ['ct-vol', $class->get_subdir($scfg, 'ct-vol')],
+        );
+    }
 
     my $res = [];
 
     # Copied from Plugin.pm, with file_size_info calls adapted:
-    foreach my $fn (<$imagedir/[0-9][0-9]*/*>) {
+    my $current_type;
+    my $code = sub {
+        my ($fn) = @_;
+
         # different to in Plugin.pm the regex below also excludes '@' as valid file name
         next if $fn !~ m@^(/.+/(\d+)/([^/\@.]+(?:\.(qcow2|vmdk|subvol))?))$@;
         $fn = $1; # untaint
@@ -701,9 +728,20 @@ sub list_images {
             parent => $parent,
         };
 
+        # Only add vtype if it is not 'images'...
+        $info->{vtype} = $current_type if defined($current_type);
+
         $info->{ctime} = $ctime if $ctime;
 
         push @$res, $info;
+    };
+
+    my %dedup;
+    for my $dir_entry (@image_dirs) {
+        ($current_type, my $dir) = @$dir_entry;
+        next if $dedup{$dir};
+        $dedup{$dir} = 1;
+        PVE::Storage::Plugin::foreach_guest_file($dir, $code);
     }
 
     return $res;
diff --git a/src/PVE/Storage/Plugin.pm b/src/PVE/Storage/Plugin.pm
index 047b2fc..660045d 100644
--- a/src/PVE/Storage/Plugin.pm
+++ b/src/PVE/Storage/Plugin.pm
@@ -10,8 +10,9 @@ use File::chdir;
 use File::Path;
 use File::Basename;
 use File::stat qw();
+use IO::Dir;
 
-use PVE::Tools qw(run_command);
+use PVE::Tools qw(dir_glob_foreach run_command);
 use PVE::JSONSchema qw(get_standard_option register_standard_option);
 use PVE::Cluster qw(cfs_register_file);
 
@@ -1567,36 +1568,91 @@ sub volume_has_feature {
 
     return undef;
 }
+#
+# Given an volume directory, this iterates over vmid directories and recurses
+# once to the files inside.
+#
+# In other words, this is `glob($dir/[0-9][0-9]*/*)`.
+my $MAX_VMID;
+
+sub foreach_guest_file : prototype($$) {
+    my ($dir, $code) = @_;
+
+    $MAX_VMID = get_standard_option("pve-vmid")->{maximum} if !defined($MAX_VMID);
+
+    dir_glob_foreach(
+        $dir,
+        qr/\d+/,
+        sub {
+            my ($vmid) = @_;
+            $vmid = int($vmid);
+            return if $vmid < 100 || $vmid > $MAX_VMID;
+            my $dir = "$dir/$vmid";
+            my $dh = IO::Dir->new($dir) or return;
+            while (defined(my $entry = $dh->read)) {
+                next if $entry eq '.' || $entry eq '..';
+                $code->("$dir/$entry");
+            }
+            close $dh;
+        },
+    );
+}
 
 sub list_images {
-    my ($class, $storeid, $scfg, $vmid, $vollist, $cache) = @_;
-
-    my $imagedir = $class->get_subdir($scfg, 'images');
+    my ($class, $storeid, $scfg, $vmid, $vollist, $cache, $content_type) = @_;
+
+    my @image_dirs;
+    if (defined($content_type)) {
+        if ($content_type eq 'images') {
+            @image_dirs = (
+                [undef, $class->get_subdir($scfg, 'images')],
+                ['vm-vol', $class->get_subdir($scfg, 'vm-vol')],
+            );
+        } elsif ($content_type eq 'rootdir') {
+            # In the legacy case, the 'rootdir' `content-dir` option did not take
+            # effect, so use the 'images' dir for it, as that is what it used to return!
+            @image_dirs = (
+                [undef, $class->get_subdir($scfg, 'images')],
+                ['ct-vol', $class->get_subdir($scfg, 'ct-vol')],
+            );
+        } else {
+            @image_dirs = [$content_type, $class->get_subdir($scfg, $content_type)];
+        }
+    } else {
+        @image_dirs = (
+            [undef, $class->get_subdir($scfg, 'images')],
+            ['vm-vol', $class->get_subdir($scfg, 'vm-vol')],
+            ['ct-vol', $class->get_subdir($scfg, 'ct-vol')],
+        );
+    }
 
     my $format_info = $class->get_formats($scfg, $storeid);
     my $fmts = join('|', sort keys $format_info->{valid}->%*);
 
     my $res = [];
 
-    foreach my $fn (<$imagedir/[0-9][0-9]*/*>) {
+    my $current_type;
+    my $code = sub {
+        my ($fn) = @_;
 
-        next if $fn !~ m!^(/.+/(\d+)/([^/]+\.($fmts)))$!;
+        return if $fn !~ m!^(/.+/(\d+)/([^/]+\.($fmts)))$!;
         $fn = $1; # untaint
 
         my $owner = $2;
         my $name = $3;
         my $format = $4;
 
-        next if !$vollist && defined($vmid) && ($owner ne $vmid);
+        return if !$vollist && defined($vmid) && ($owner ne $vmid);
 
-        my ($size, undef, $used, $parent, $ctime) = eval { file_size_info($fn, undef, $format); };
+        my ($size, undef, $used, $parent, $ctime) =
+            eval { file_size_info($fn, undef, $format); };
         if (my $err = $@) {
             die $err if $err !~ m/Image is not in \S+ format$/;
             warn "image '$fn' is not in expected format '$format', querying as raw\n";
             ($size, undef, $used, $parent, $ctime) = file_size_info($fn, undef, 'raw');
             $format = 'invalid';
         }
-        next if !defined($size);
+        return if !defined($size);
 
         my $volid;
         if ($parent && $parent =~ m!^../(\d+)/([^/]+\.($fmts))$!) {
@@ -1608,7 +1664,7 @@ sub list_images {
 
         if ($vollist) {
             my $found = grep { $_ eq $volid } @$vollist;
-            next if !$found;
+            return if !$found;
         }
 
         my $info = {
@@ -1620,9 +1676,19 @@ sub list_images {
             parent => $parent,
         };
 
+        # Only add vtype if it is not 'images'...
+        $info->{vtype} = $current_type if defined($current_type);
         $info->{ctime} = $ctime if $ctime;
 
         push @$res, $info;
+    };
+
+    my %dedup;
+    for my $dir_entry (@image_dirs) {
+        ($current_type, my $dir) = @$dir_entry;
+        next if $dedup{$dir};
+        $dedup{$dir} = 1;
+        foreach_guest_file($dir, $code);
     }
 
     return $res;
@@ -1709,12 +1775,29 @@ sub list_volumes {
 
     my $res = [];
     my $vmlist = PVE::Cluster::get_vmlist();
+
+    my $guest_dirs = 0;
+    my $DIRS_IMAGES = 1 << 0;
+    my $DIRS_VMS = 1 << 1;
+    my $DIRS_CTS = 1 << 2;
+    my $DIRS_ALL = $DIRS_IMAGES | $DIRS_VMS | $DIRS_CTS;
     foreach my $type (@$content_types) {
         my $data;
+        if ($type eq 'images') {
+            $guest_dirs |= $DIRS_IMAGES | $DIRS_VMS;
+            next;
+        } elsif ($type eq 'rootdir') {
+            $guest_dirs |= $DIRS_IMAGES | $DIRS_CTS;
+            next;
+        } elsif ($type eq 'vm-vol') {
+            $guest_dirs |= $DIRS_VMS;
+            next;
+        } elsif ($type eq 'ct-vol') {
+            $guest_dirs |= $DIRS_CTS;
+            next;
+        }
 
-        if ($type eq 'images' || $type eq 'rootdir') {
-            $data = $class->list_images($storeid, $scfg, $vmid);
-        } elsif ($scfg->{path}) {
+        if ($scfg->{path}) {
             my $path = $class->get_subdir($scfg, $type);
 
             if ($type eq 'iso' && !defined($vmid)) {
@@ -1733,7 +1816,32 @@ sub list_volumes {
         next if !$data;
 
         foreach my $item (@$data) {
-            if ($type eq 'images' || $type eq 'rootdir') {
+            $item->{content} = $type;
+            push @$res, $item;
+        }
+    }
+
+    if ($guest_dirs) {
+        my $data;
+
+        if ($guest_dirs == $DIRS_ALL) {
+            $data = $class->list_images($storeid, $scfg, $vmid, undef, undef, undef);
+        } elsif ($guest_dirs == ($DIRS_IMAGES | $DIRS_VMS)) {
+            $data = $class->list_images($storeid, $scfg, $vmid, undef, undef, 'images');
+        } elsif ($guest_dirs == ($DIRS_IMAGES | $DIRS_CTS)) {
+            $data = $class->list_images($storeid, $scfg, $vmid, undef, undef, 'rootdir');
+        } elsif ($guest_dirs == $DIRS_VMS) {
+            $data = $class->list_images($storeid, $scfg, $vmid, undef, undef, 'vm-vol');
+        } elsif ($guest_dirs == $DIRS_CTS) {
+            $data = $class->list_images($storeid, $scfg, $vmid, undef, undef, 'ct-vol');
+        } else {
+            die "unexpected request to list only untyped images\n";
+        }
+
+        for my $item (@$data) {
+            if (defined(my $vtype = $item->{vtype})) {
+                $item->{content} = $vtype;
+            } else {
                 my $vminfo = $vmlist->{ids}->{ $item->{vmid} };
                 my $vmtype;
                 if (defined($vminfo)) {
@@ -1744,9 +1852,6 @@ sub list_volumes {
                 } else {
                     $item->{content} = 'images';
                 }
-                next if $type ne $item->{content};
-            } else {
-                $item->{content} = $type;
             }
 
             push @$res, $item;
-- 
2.47.2



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] 74+ messages in thread

* [pve-devel] [PATCH storage 14/26] plugins: update image/volume listing to support new types
  2025-07-29 11:15 [pve-devel] [RFC storage 00/26+10+3] unify vtype and content-type and Wolfgang Bumiller
                   ` (12 preceding siblings ...)
  2025-07-29 11:15 ` [pve-devel] [PATCH storage 13/26] plugin, btrfs: update list_images and list_volumes Wolfgang Bumiller
@ 2025-07-29 11:15 ` Wolfgang Bumiller
  2025-07-30  8:36   ` Fabian Grünbichler
  2025-07-29 11:15 ` [pve-devel] [PATCH storage 15/26] common: add is_volume_type and is_type_change_allowed helpers Wolfgang Bumiller
                   ` (25 subsequent siblings)
  39 siblings, 1 reply; 74+ messages in thread
From: Wolfgang Bumiller @ 2025-07-29 11:15 UTC (permalink / raw)
  To: pve-devel

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
---
 src/PVE/Storage/Common.pm            | 31 ++++++++++++++++++++++++++
 src/PVE/Storage/ISCSIDirectPlugin.pm |  5 ++++-
 src/PVE/Storage/ISCSIPlugin.pm       |  7 ++++--
 src/PVE/Storage/LVMPlugin.pm         | 28 +++++++++++++----------
 src/PVE/Storage/LvmThinPlugin.pm     | 33 ++++++++++++++++++----------
 src/PVE/Storage/PBSPlugin.pm         |  2 +-
 src/PVE/Storage/RBDPlugin.pm         |  9 ++++++--
 src/PVE/Storage/ZFSPoolPlugin.pm     | 16 +++++++++++++-
 8 files changed, 102 insertions(+), 29 deletions(-)

diff --git a/src/PVE/Storage/Common.pm b/src/PVE/Storage/Common.pm
index b2ebd50..bab1260 100644
--- a/src/PVE/Storage/Common.pm
+++ b/src/PVE/Storage/Common.pm
@@ -282,4 +282,35 @@ sub qemu_img_resize {
     run_command($cmd, timeout => $timeout);
 }
 
+=head3 should_list_images($expected_content_type, $volume_type)
+
+Returns whether a volume of type C<$volume_type> should be listed in C<list_images> if the expected
+content type is C<$expcted_content_type>.
+
+This effectively checks if C<$expected_content_type> is a "supertype" of C<$volume_type>.
+
+=cut
+
+sub should_list_images : prototype($$) ($expected_content_type, $volume_type) {
+    # If we have no expected type, everything should be listed.
+    return 1 if !defined($expected_content_type);
+
+    if (!$volume_type) {
+        # For 'images' and 'rootdir', an unknown volume type should also be listed.
+        return 1
+            if $expected_content_type eq 'images' || $expected_content_type eq 'rootdir';
+        # Otherwise unknown volume types are unexpected.
+        return 0;
+    }
+
+    # Images should also include vm-vol.
+    return 1 if $expected_content_type eq 'images' && $volume_type eq 'vm-vol';
+
+    # Rootdir should also include ct-vol.
+    return 1 if $expected_content_type eq 'rootdir' && $volume_type eq 'ct-vol';
+
+    # Otherwise they must be equal.
+    return $expected_content_type eq $volume_type;
+}
+
 1;
diff --git a/src/PVE/Storage/ISCSIDirectPlugin.pm b/src/PVE/Storage/ISCSIDirectPlugin.pm
index f5b466e..98a3391 100644
--- a/src/PVE/Storage/ISCSIDirectPlugin.pm
+++ b/src/PVE/Storage/ISCSIDirectPlugin.pm
@@ -152,10 +152,12 @@ sub free_image {
 }
 
 sub list_images {
-    my ($class, $storeid, $scfg, $vmid, $vollist, $cache) = @_;
+    my ($class, $storeid, $scfg, $vmid, $vollist, $cache, $content_type) = @_;
 
     my $res = [];
 
+    return $res if $content_type && $content_type ne 'images' && $content_type ne 'vm-vol';
+
     # we have no owner for iscsi devices
 
     my $dat = iscsi_ls($scfg);
@@ -172,6 +174,7 @@ sub list_images {
 
         my $info = $dat->{$volname};
         $info->{volid} = $volid;
+        $info->{vtype} = 'vm-vol';
 
         push @$res, $info;
     }
diff --git a/src/PVE/Storage/ISCSIPlugin.pm b/src/PVE/Storage/ISCSIPlugin.pm
index 4875a1f..77a9173 100644
--- a/src/PVE/Storage/ISCSIPlugin.pm
+++ b/src/PVE/Storage/ISCSIPlugin.pm
@@ -421,17 +421,19 @@ sub list_volumes {
     my $res = $class->list_images($storeid, $scfg, $vmid);
 
     for my $item (@$res) {
-        $item->{content} = 'images'; # we only have images
+        $item->{content} = 'vm-vol'; # we only have VM images
     }
 
     return $res;
 }
 
 sub list_images {
-    my ($class, $storeid, $scfg, $vmid, $vollist, $cache) = @_;
+    my ($class, $storeid, $scfg, $vmid, $vollist, $cache, $content_type) = @_;
 
     my $res = [];
 
+    return $res if $content_type && $content_type ne 'images' && $content_type ne 'vm-vol';
+
     $cache->{iscsi_devices} = iscsi_device_list() if !$cache->{iscsi_devices};
 
     # we have no owner for iscsi devices
@@ -454,6 +456,7 @@ sub list_images {
 
             my $info = $dat->{$volname};
             $info->{volid} = $volid;
+            $info->{vtype} = 'vm-vol';
 
             push @$res, $info;
         }
diff --git a/src/PVE/Storage/LVMPlugin.pm b/src/PVE/Storage/LVMPlugin.pm
index 9b88c6a..55c4578 100644
--- a/src/PVE/Storage/LVMPlugin.pm
+++ b/src/PVE/Storage/LVMPlugin.pm
@@ -750,7 +750,7 @@ my $check_tags = sub {
 };
 
 sub list_images {
-    my ($class, $storeid, $scfg, $vmid, $vollist, $cache) = @_;
+    my ($class, $storeid, $scfg, $vmid, $vollist, $cache, $content_type) = @_;
 
     my $vgname = $scfg->{vgname};
 
@@ -762,8 +762,11 @@ sub list_images {
 
         foreach my $volname (keys %$dat) {
 
-            next if $volname !~ m/^vm-(\d+)-/;
-            my $owner = $1;
+            next if $volname !~ m/^(?:vol-(?<vtype>vm|ct)-|vm)-(?<owner>\d+)-/xn;
+            my $owner = $+{owner};
+            my $vtype = $+{vtype} ? $+{vtype} . '-vol' : undef;
+
+            next if !PVE::Storage::Common::should_list_images($content_type, $vtype);
 
             my $info = $dat->{$volname};
 
@@ -787,14 +790,17 @@ sub list_images {
                 ? $class->volume_size_info($scfg, $storeid, $volname)
                 : $info->{lv_size};
 
-            push @$res,
-                {
-                    volid => $volid,
-                    format => $format,
-                    size => $size,
-                    vmid => $owner,
-                    ctime => $info->{ctime},
-                };
+            my $entry = {
+                volid => $volid,
+                format => $format,
+                size => $size,
+                vmid => $owner,
+                ctime => $info->{ctime},
+            };
+
+            $entry->{vtype} = $vtype if defined($vtype);
+
+            push @$res, $entry;
         }
     }
 
diff --git a/src/PVE/Storage/LvmThinPlugin.pm b/src/PVE/Storage/LvmThinPlugin.pm
index 751bd7b..f6615d9 100644
--- a/src/PVE/Storage/LvmThinPlugin.pm
+++ b/src/PVE/Storage/LvmThinPlugin.pm
@@ -182,7 +182,7 @@ sub free_image {
 }
 
 sub list_images {
-    my ($class, $storeid, $scfg, $vmid, $vollist, $cache) = @_;
+    my ($class, $storeid, $scfg, $vmid, $vollist, $cache, $content_type) = @_;
 
     my $vgname = $scfg->{vgname};
 
@@ -193,9 +193,17 @@ sub list_images {
     if (my $dat = $cache->{lvs}->{$vgname}) {
 
         foreach my $volname (keys %$dat) {
+            my ($owner, $vtype);
+            if ($volname =~ m/^(?:base-)?vol-(ct|vm)-(\d+)-/) {
+                $vtype = "$1-vol";
+                $owner = $2;
+            } elsif ($volname =~ m/^(?:vm|base)-(\d+)-/) {
+                $owner = $1;
+            } else {
+                next;
+            }
 
-            next if $volname !~ m/^(vm|base)-(\d+)-/;
-            my $owner = $2;
+            next if !PVE::Storage::Common::should_list_images($content_type, $vtype);
 
             my $info = $dat->{$volname};
 
@@ -212,14 +220,17 @@ sub list_images {
                 next if defined($vmid) && ($owner ne $vmid);
             }
 
-            push @$res,
-                {
-                    volid => $volid,
-                    format => 'raw',
-                    size => $info->{lv_size},
-                    vmid => $owner,
-                    ctime => $info->{ctime},
-                };
+            my $entry = {
+                volid => $volid,
+                format => 'raw',
+                size => $info->{lv_size},
+                vmid => $owner,
+                ctime => $info->{ctime},
+            };
+
+            $entry->{vtype} = $vtype if defined($vtype);
+
+            push @$res, $entry;
         }
     }
 
diff --git a/src/PVE/Storage/PBSPlugin.pm b/src/PVE/Storage/PBSPlugin.pm
index 00170f5..bab026b 100644
--- a/src/PVE/Storage/PBSPlugin.pm
+++ b/src/PVE/Storage/PBSPlugin.pm
@@ -674,7 +674,7 @@ sub free_image {
 }
 
 sub list_images {
-    my ($class, $storeid, $scfg, $vmid, $vollist, $cache) = @_;
+    my ($class, $storeid, $scfg, $vmid, $vollist, $cache, $content_type) = @_;
 
     my $res = [];
 
diff --git a/src/PVE/Storage/RBDPlugin.pm b/src/PVE/Storage/RBDPlugin.pm
index 4400aeb..2ef1280 100644
--- a/src/PVE/Storage/RBDPlugin.pm
+++ b/src/PVE/Storage/RBDPlugin.pm
@@ -773,7 +773,7 @@ sub free_image {
 }
 
 sub list_images {
-    my ($class, $storeid, $scfg, $vmid, $vollist, $cache) = @_;
+    my ($class, $storeid, $scfg, $vmid, $vollist, $cache, $content_type) = @_;
 
     my $dat = rbd_ls($scfg, $storeid);
     return [] if !$dat; # nothing found
@@ -783,12 +783,17 @@ sub list_images {
         my $info = $dat->{$image};
         my ($volname, $parent, $owner) = $info->@{ 'name', 'parent', 'vmid' };
 
-        if ($parent && $parent =~ m/^(base-\d+-\S+)\@__base__$/) {
+        my $vtype;
+
+        if ($parent && $parent =~ m/^(base(?:-vol-(?<vtype>vm|ct))?-\d+-\S+)\@__base__$/xn) {
+            $vtype = $+{vtype} ? $+{vtype} . '-vol' : undef;
             $info->{volid} = "$storeid:$1/$volname";
         } else {
             $info->{volid} = "$storeid:$volname";
         }
 
+        next if !PVE::Storage::Common::should_list_images($content_type, $vtype);
+
         if ($vollist) {
             my $found = grep { $_ eq $info->{volid} } @$vollist;
             next if !$found;
diff --git a/src/PVE/Storage/ZFSPoolPlugin.pm b/src/PVE/Storage/ZFSPoolPlugin.pm
index 8e917b4..d65af69 100644
--- a/src/PVE/Storage/ZFSPoolPlugin.pm
+++ b/src/PVE/Storage/ZFSPoolPlugin.pm
@@ -122,6 +122,16 @@ sub zfs_parse_zvol_list {
     return $list;
 }
 
+my sub image_vtype_from_name : prototype($) {
+    my ($name) = @_;
+
+    return 'ct-vol' if $name =~ /^(base-)?subvol(-ct)?-/;
+    return 'ct-vol' if $name =~ /^basevol-/;
+    return 'vm-vol' if $name =~ /^(base-)?vol(-vm)?-/;
+    return 'vm-vol' if $name =~ /^base-/;
+    return 'images';
+}
+
 sub parse_volname {
     my ($class, $volname) = @_;
 
@@ -305,7 +315,7 @@ sub free_image {
 }
 
 sub list_images {
-    my ($class, $storeid, $scfg, $vmid, $vollist, $cache) = @_;
+    my ($class, $storeid, $scfg, $vmid, $vollist, $cache, $content_type) = @_;
 
     my $zfs_list = $class->zfs_list_zvol($scfg);
 
@@ -330,6 +340,10 @@ sub list_images {
             next if defined($vmid) && ($owner ne $vmid);
         }
 
+        my $vtype = volume_type_from_name($volname);
+        next if !PVE::Storage::Common::should_list_images($content_type, $vtype);
+        $info->{vtype} = $vtype if $vtype ne 'images' && $vtype ne 'rootdir';
+
         push @$res, $info;
     }
     return $res;
-- 
2.47.2



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] 74+ messages in thread

* [pve-devel] [PATCH storage 15/26] common: add is_volume_type and is_type_change_allowed helpers
  2025-07-29 11:15 [pve-devel] [RFC storage 00/26+10+3] unify vtype and content-type and Wolfgang Bumiller
                   ` (13 preceding siblings ...)
  2025-07-29 11:15 ` [pve-devel] [PATCH storage 14/26] plugins: update image/volume listing to support new types Wolfgang Bumiller
@ 2025-07-29 11:15 ` Wolfgang Bumiller
  2025-07-30  9:01   ` Fabian Grünbichler
  2025-07-29 11:15 ` [pve-devel] [PATCH storage 16/26] common: add volume_type_from_name convenience helper Wolfgang Bumiller
                   ` (24 subsequent siblings)
  39 siblings, 1 reply; 74+ messages in thread
From: Wolfgang Bumiller @ 2025-07-29 11:15 UTC (permalink / raw)
  To: pve-devel

Generally we want to allow transitioning from 'images' or 'rootdir' to
'vm-vol' or 'ct-vol' respectively, but not the other way round.
Obviously, staying *within* any of the types is also allowed.

The `is_volume_type` helper is just a convenience helper for
functionality such as, for directory based storages, deciding whether
a volume needs a VMID subdirectory.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
---
 src/PVE/Storage/Common.pm | 42 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 42 insertions(+)

diff --git a/src/PVE/Storage/Common.pm b/src/PVE/Storage/Common.pm
index bab1260..7086e1c 100644
--- a/src/PVE/Storage/Common.pm
+++ b/src/PVE/Storage/Common.pm
@@ -313,4 +313,46 @@ sub should_list_images : prototype($$) ($expected_content_type, $volume_type) {
     return $expected_content_type eq $volume_type;
 }
 
+=head3 is_volume_type
+
+    is_volume_type($vtype)
+
+Returns true if C<$vtype> is C<images>, C<rootdir>, C<vm-vol> or C<ct-vol>.
+
+Convenience helper to distinguish volume vtypes and content types from other types.
+
+=cut
+
+my %VOLUME_TYPE = map { $_ => 1 } qw(images vm-vol rootdir ct-vol);
+
+sub is_volume_type : prototype($) ($vtype) {
+    return $VOLUME_TYPE{$vtype};
+}
+
+=head3 is_type_change_allowed
+
+    is_type_change_allowed($source_vtype, $target_vtype)
+
+Returns true if a volume may change from C<$source_vtype> to C<$target_vtype>.
+
+This is generally allowed if the target vtype is equal or "more strict" than the source vtype. That
+is, if the source vtype is not known, is C<"images">, or equal to C<$target_vtype>.
+
+Note that without a target vtype, only generic source vtypes (C<undef> or C<"images">) are allowed.
+
+=cut
+
+sub is_type_change_allowed : prototype($$) ($from, $to) {
+    # If the source is unknown we don't care:
+    return 1 if !defined($from);
+
+    # Likewise, if the source is "images" we don't actually know what it represents.
+    return 1 if $from eq 'images';
+
+    # Otherwise if *both* are defined they must be equal.
+    return 1 if defined($from) && defined($to) && $from eq $to; #
+
+    return undef;
+}
+
 1;
-- 
2.47.2



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] 74+ messages in thread

* [pve-devel] [PATCH storage 16/26] common: add volume_type_from_name convenience helper
  2025-07-29 11:15 [pve-devel] [RFC storage 00/26+10+3] unify vtype and content-type and Wolfgang Bumiller
                   ` (14 preceding siblings ...)
  2025-07-29 11:15 ` [pve-devel] [PATCH storage 15/26] common: add is_volume_type and is_type_change_allowed helpers Wolfgang Bumiller
@ 2025-07-29 11:15 ` Wolfgang Bumiller
  2025-07-30  8:36   ` Fabian Grünbichler
  2025-07-29 11:15 ` [pve-devel] [PATCH storage 17/26] plugins: add vtype parameter to alloc_image Wolfgang Bumiller
                   ` (23 subsequent siblings)
  39 siblings, 1 reply; 74+ messages in thread
From: Wolfgang Bumiller @ 2025-07-29 11:15 UTC (permalink / raw)
  To: pve-devel

For plugins which follow our new naming scheme.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
---
 src/PVE/Storage/Common.pm | 29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)

diff --git a/src/PVE/Storage/Common.pm b/src/PVE/Storage/Common.pm
index 7086e1c..813fba6 100644
--- a/src/PVE/Storage/Common.pm
+++ b/src/PVE/Storage/Common.pm
@@ -313,6 +313,35 @@ sub should_list_images : prototype($$) ($expected_content_type, $volume_type) {
     return $expected_content_type eq $volume_type;
 }
 
+=head3 volume_type_from_name
+
+    volume_type_from_name($name)
+
+This is available for storages which follow our most common naming scheme relating to volume types:
+A "vol-vm-" prefix for the C<vm-vol> vtype, and a "vol-ct-" prefix for the C<ct-vol> vtype.
+
+This function allows (and ignores) an optional "base-" prefix, such that
+"base-vol-ct-100-disk-0.raw" would return C<ct-vol>.
+
+In any other case it returns C<images>.
+
+=cut
+
+sub volume_type_from_name : prototype($) {
+    my ($name) = @_;
+
+    if ($name =~ /^(?:base-)?(?:(?:sub)?vol-(vm|ct))-/) {
+        return "$1-vol";
+    }
+
+    # Note: Despite the legacy `subvol-*` and `basevol-*` dirs always being containers, giving
+    # them the vtype `ct-vol` would break `path_to_volume_id` which would expect their volids to
+    # be in the `cts/` subdir instead of in `images/`...
+    # return 'ct-vol' if $name =~ /^(?:subvol|basevol)-/;
+
+    return 'images';
+}
+
 =head3 is_volume_type
 
     is_volume_type($vtype)
-- 
2.47.2



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] 74+ messages in thread

* [pve-devel] [PATCH storage 17/26] plugins: add vtype parameter to alloc_image
  2025-07-29 11:15 [pve-devel] [RFC storage 00/26+10+3] unify vtype and content-type and Wolfgang Bumiller
                   ` (15 preceding siblings ...)
  2025-07-29 11:15 ` [pve-devel] [PATCH storage 16/26] common: add volume_type_from_name convenience helper Wolfgang Bumiller
@ 2025-07-29 11:15 ` Wolfgang Bumiller
  2025-07-30  9:24   ` Fabian Grünbichler
  2025-07-30 14:00   ` Max R. Carrara
  2025-07-29 11:15 ` [pve-devel] [PATCH storage 18/26] plugins: update create_base methods Wolfgang Bumiller
                   ` (22 subsequent siblings)
  39 siblings, 2 replies; 74+ messages in thread
From: Wolfgang Bumiller @ 2025-07-29 11:15 UTC (permalink / raw)
  To: pve-devel

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
---
 src/PVE/Storage/BTRFSPlugin.pm       | 25 ++++++++----
 src/PVE/Storage/ESXiPlugin.pm        |  2 +-
 src/PVE/Storage/ISCSIDirectPlugin.pm |  2 +-
 src/PVE/Storage/ISCSIPlugin.pm       |  2 +-
 src/PVE/Storage/LVMPlugin.pm         | 35 ++++++++++++-----
 src/PVE/Storage/LvmThinPlugin.pm     | 19 +++++++--
 src/PVE/Storage/Plugin.pm            | 59 +++++++++++++++++-----------
 src/PVE/Storage/RBDPlugin.pm         | 27 +++++++++----
 src/PVE/Storage/ZFSPlugin.pm         | 17 ++++++--
 src/PVE/Storage/ZFSPoolPlugin.pm     | 35 +++++++++++------
 10 files changed, 154 insertions(+), 69 deletions(-)

diff --git a/src/PVE/Storage/BTRFSPlugin.pm b/src/PVE/Storage/BTRFSPlugin.pm
index 585489c..0a42c88 100644
--- a/src/PVE/Storage/BTRFSPlugin.pm
+++ b/src/PVE/Storage/BTRFSPlugin.pm
@@ -13,6 +13,7 @@ use POSIX qw(EEXIST);
 
 use PVE::Tools qw(run_command dir_glob_foreach);
 
+use PVE::Storage::Common;
 use PVE::Storage::DirPlugin;
 
 use constant {
@@ -193,15 +194,16 @@ sub filesystem_path {
 
     my $path = $class->get_subdir($scfg, $vtype);
 
-    $path .= "/$vmid" if $vtype eq 'images';
+    my $is_volume_type = PVE::Storage::Common::is_volume_type($vtype);
+    $path .= "/$vmid" if $is_volume_type;
 
-    if ($vtype eq 'images' && defined($format) && $format eq 'raw') {
+    if ($is_volume_type && defined($format) && $format eq 'raw') {
         my $dir = raw_name_to_dir($name);
         if ($snapname) {
             $dir .= "\@$snapname";
         }
         $path .= "/$dir/disk.raw";
-    } elsif ($vtype eq 'images' && defined($format) && $format eq 'subvol') {
+    } elsif ($is_volume_type && defined($format) && $format eq 'subvol') {
         $path .= "/$name";
         if ($snapname) {
             $path .= "\@$snapname";
@@ -322,19 +324,28 @@ sub clone_image {
 }
 
 sub alloc_image {
-    my ($class, $storeid, $scfg, $vmid, $fmt, $name, $size) = @_;
+    my ($class, $storeid, $scfg, $vmid, $fmt, $name, $size, $vtype) = @_;
 
     if ($fmt ne 'raw' && $fmt ne 'subvol') {
-        return $class->SUPER::alloc_image($storeid, $scfg, $vmid, $fmt, $name, $size);
+        return $class->SUPER::alloc_image($storeid, $scfg, $vmid, $fmt, $name, $size, $vtype);
     }
 
     # From Plugin.pm:
 
-    my $imagedir = $class->get_subdir($scfg, 'images') . "/$vmid";
+    my $imagedir = $class->get_subdir($scfg, $vtype // 'images') . "/$vmid";
 
     mkpath $imagedir;
 
-    $name = $class->find_free_diskname($storeid, $scfg, $vmid, $fmt, 1) if !$name;
+    if ($name) {
+        if (defined($vtype)) {
+            die "illegal name '$name' - should be 'vol-vm-$vmid-*'\n"
+                if $vtype eq 'vm-vol' && $name !~ m/^vol-vm-$vmid-/;
+            die "illegal name '$name' - should be 'vol-ct-$vmid-*'\n"
+                if $vtype eq 'ct-vol' && $name !~ m/^vol-ct-$vmid-/;
+        }
+    } else {
+        $name = $class->find_free_diskname($storeid, $scfg, $vmid, $fmt, 1, $vtype);
+    }
 
     my (undef, $tmpfmt) = PVE::Storage::Plugin::parse_name_dir($name);
 
diff --git a/src/PVE/Storage/ESXiPlugin.pm b/src/PVE/Storage/ESXiPlugin.pm
index ea2f8f9..d10b156 100644
--- a/src/PVE/Storage/ESXiPlugin.pm
+++ b/src/PVE/Storage/ESXiPlugin.pm
@@ -480,7 +480,7 @@ sub path {
 }
 
 sub alloc_image {
-    my ($class, $storeid, $scfg, $vmid, $fmt, $name, $size) = @_;
+    my ($class, $storeid, $scfg, $vmid, $fmt, $name, $size, $vtype) = @_;
 
     die "creating images is not supported for $class\n";
 }
diff --git a/src/PVE/Storage/ISCSIDirectPlugin.pm b/src/PVE/Storage/ISCSIDirectPlugin.pm
index 98a3391..0fee541 100644
--- a/src/PVE/Storage/ISCSIDirectPlugin.pm
+++ b/src/PVE/Storage/ISCSIDirectPlugin.pm
@@ -140,7 +140,7 @@ sub clone_image {
 }
 
 sub alloc_image {
-    my ($class, $storeid, $scfg, $vmid, $fmt, $name, $size) = @_;
+    my ($class, $storeid, $scfg, $vmid, $fmt, $name, $size, $vtype) = @_;
 
     die "can't allocate space in iscsi storage\n";
 }
diff --git a/src/PVE/Storage/ISCSIPlugin.pm b/src/PVE/Storage/ISCSIPlugin.pm
index 77a9173..5118d73 100644
--- a/src/PVE/Storage/ISCSIPlugin.pm
+++ b/src/PVE/Storage/ISCSIPlugin.pm
@@ -402,7 +402,7 @@ sub clone_image {
 }
 
 sub alloc_image {
-    my ($class, $storeid, $scfg, $vmid, $fmt, $name, $size) = @_;
+    my ($class, $storeid, $scfg, $vmid, $fmt, $name, $size, $vtype) = @_;
 
     die "can't allocate space in iscsi storage\n";
 }
diff --git a/src/PVE/Storage/LVMPlugin.pm b/src/PVE/Storage/LVMPlugin.pm
index 55c4578..af789ba 100644
--- a/src/PVE/Storage/LVMPlugin.pm
+++ b/src/PVE/Storage/LVMPlugin.pm
@@ -535,7 +535,7 @@ sub clone_image {
 }
 
 sub find_free_diskname {
-    my ($class, $storeid, $scfg, $vmid, $fmt, $add_fmt_suffix) = @_;
+    my ($class, $storeid, $scfg, $vmid, $fmt, $add_fmt_suffix, $vtype) = @_;
 
     my $vg = $scfg->{vgname};
 
@@ -546,7 +546,7 @@ sub find_free_diskname {
     $add_fmt_suffix = $fmt && $fmt eq 'qcow2' ? 1 : undef;
 
     return PVE::Storage::Plugin::get_next_vm_diskname(
-        $disk_list, $storeid, $vmid, $fmt, $scfg, $add_fmt_suffix,
+        $disk_list, $storeid, $vmid, $fmt, $scfg, $add_fmt_suffix, $vtype,
     );
 }
 
@@ -628,8 +628,8 @@ my sub calculate_lvm_size {
     return $info->{'fully-allocated'} / 1024;
 }
 
-my sub alloc_lvm_image {
-    my ($class, $storeid, $scfg, $vmid, $fmt, $name, $size, $backing_snap) = @_;
+my sub alloc_lvm_image : prototype($$$$$$$$$) {
+    my ($class, $storeid, $scfg, $vmid, $fmt, $name, $size, $backing_snap, $vtype) = @_;
 
     die "unsupported format '$fmt'" if $fmt ne 'raw' && $fmt ne 'qcow2';
 
@@ -637,6 +637,20 @@ my sub alloc_lvm_image {
         if $fmt eq 'qcow2'
         && !$scfg->{'snapshot-as-volume-chain'};
 
+    if ($name) {
+        if (defined($vtype) && $vtype eq 'vm-vol') {
+            die "illegal name '$name' - should be 'vol-vm-$vmid-*'\n"
+                if $name !~ m/^vol-vm-$vmid-/;
+        } elsif (defined($vtype) && $vtype eq 'ct-vol') {
+            die "illegal name '$name' - should be 'vol-ct-$vmid-*'\n"
+                if $name !~ m/^vol-ct-$vmid-/;
+        } else {
+            die "illegal name '$name'"
+                . " - should be 'vm-$vmid-*', 'vol-vm-$vmid-*' or 'vol-ct-$vmid-*'\n"
+                if $name !~ m/^(?:vol-vm|vol-ct|vm)-$vmid-/;
+        }
+    }
+
     $class->parse_volname($name);
 
     my $vgs = lvm_vgs();
@@ -672,20 +686,20 @@ my sub alloc_lvm_image {
 }
 
 sub alloc_image {
-    my ($class, $storeid, $scfg, $vmid, $fmt, $name, $size) = @_;
+    my ($class, $storeid, $scfg, $vmid, $fmt, $name, $size, $vtype) = @_;
 
-    $name = $class->find_free_diskname($storeid, $scfg, $vmid, $fmt)
+    $name = $class->find_free_diskname($storeid, $scfg, $vmid, $fmt, 0, $vtype)
         if !$name;
 
-    alloc_lvm_image($class, $storeid, $scfg, $vmid, $fmt, $name, $size);
+    alloc_lvm_image($class, $storeid, $scfg, $vmid, $fmt, $name, $size, undef, $vtype);
 
     return $name;
 }
 
-my sub alloc_snap_image {
+my sub alloc_snap_image : prototype($$$$$) {
     my ($class, $storeid, $scfg, $volname, $backing_snap) = @_;
 
-    my ($vmid, $format) = ($class->parse_volname($volname))[2, 6];
+    my ($vtype, $vmid, $format) = ($class->parse_volname($volname))[0, 2, 6];
     my $path = $class->path($scfg, $volname, $storeid, $backing_snap);
 
     #we need to use same size than the backing image qcow2 virtual-size
@@ -694,7 +708,8 @@ my sub alloc_snap_image {
 
     $size = $size / 1024; #we use kb in lvcreate
 
-    alloc_lvm_image($class, $storeid, $scfg, $vmid, $format, $volname, $size, $backing_snap);
+    alloc_lvm_image($class, $storeid, $scfg, $vmid, $format, $volname, $size, $backing_snap,
+        $vtype);
 }
 
 my sub free_snap_image {
diff --git a/src/PVE/Storage/LvmThinPlugin.pm b/src/PVE/Storage/LvmThinPlugin.pm
index f6615d9..2071822 100644
--- a/src/PVE/Storage/LvmThinPlugin.pm
+++ b/src/PVE/Storage/LvmThinPlugin.pm
@@ -122,12 +122,23 @@ my $set_lv_autoactivation = sub {
 };
 
 sub alloc_image {
-    my ($class, $storeid, $scfg, $vmid, $fmt, $name, $size) = @_;
+    my ($class, $storeid, $scfg, $vmid, $fmt, $name, $size, $vtype) = @_;
 
     die "unsupported format '$fmt'" if $fmt ne 'raw';
 
-    die "illegal name '$name' - should be 'vm-$vmid-*'\n"
-        if $name && $name !~ m/^vm-$vmid-/;
+    if ($name) {
+        if (defined($vtype) && $vtype eq 'vm-vol') {
+            die "illegal name '$name' - should be 'vol-vm-$vmid-*'\n"
+                if $name !~ m/^vol-vm-$vmid-/;
+        } elsif (defined($vtype) && $vtype eq 'ct-vol') {
+            die "illegal name '$name' - should be 'vol-ct-$vmid-*'\n"
+                if $name !~ m/^vol-ct-$vmid-/;
+        } else {
+            die "illegal name '$name'"
+                . " - should be 'vm-$vmid-*', 'vol-vm-$vmid-*' or 'vol-ct-$vmid-*'\n"
+                if $name !~ m/^(?:vol-vm|vol-ct|vm)-$vmid-/;
+        }
+    }
 
     my $vgs = PVE::Storage::LVMPlugin::lvm_vgs();
 
@@ -135,7 +146,7 @@ sub alloc_image {
 
     die "no such volume group '$vg'\n" if !defined($vgs->{$vg});
 
-    $name = $class->find_free_diskname($storeid, $scfg, $vmid)
+    $name = $class->find_free_diskname($storeid, $scfg, $vmid, undef, 0, $vtype)
         if !$name;
 
     my $cmd = [
diff --git a/src/PVE/Storage/Plugin.pm b/src/PVE/Storage/Plugin.pm
index 660045d..adaca47 100644
--- a/src/PVE/Storage/Plugin.pm
+++ b/src/PVE/Storage/Plugin.pm
@@ -851,7 +851,7 @@ sub filesystem_path {
 
     my $dir = $class->get_subdir($scfg, $vtype);
 
-    $dir .= "/$vmid" if $vtype eq 'images';
+    $dir .= "/$vmid" if PVE::Storage::Common::is_volume_type($vtype);
 
     my $path = "$dir/$name";
 
@@ -912,30 +912,34 @@ sub create_base {
 }
 
 my $get_vm_disk_number = sub {
-    my ($disk_name, $scfg, $vmid, $suffix) = @_;
-
-    my $disk_regex = qr/(vm|base)-$vmid-disk-(\d+)$suffix/;
-
-    my $type = $scfg->{type};
-    my $def = { %{ $defaultData->{plugindata}->{$type} } };
-
-    my $valid = $def->{format}->[0];
-    if ($valid->{subvol}) {
-        $disk_regex = qr/(vm|base|subvol|basevol)-$vmid-disk-(\d+)/;
-    }
-
-    if ($disk_name =~ m/$disk_regex/) {
-        return $2;
+    my ($disk_volid, $scfg, $vmid, $suffix) = @_;
+
+    # Dir storage have a vmid/ subdir, zfs/lvm/rbd/... do not.
+    # Also: LVM storages don't pass the `storeid:` prefix...
+    if ($disk_volid =~ m!^(?:[^:]+:)? (?:\d+/)? $DISK_NAME_REGEX $!xn) {
+        my $label = $+{label};
+        # Dir storages have a format suffix, zfs/lvm/rbd/... do not.
+        if ($label =~ /^disk-(\d+)(?:\..*)?$/) {
+            return int($1);
+        }
     }
 
     return undef;
 };
 
+# note: disk_list is an array of *volids*
 sub get_next_vm_diskname {
-    my ($disk_list, $storeid, $vmid, $fmt, $scfg, $add_fmt_suffix) = @_;
+    my ($disk_list, $storeid, $vmid, $fmt, $scfg, $add_fmt_suffix, $vtype) = @_;
 
     $fmt //= '';
-    my $prefix = ($fmt eq 'subvol') ? 'subvol' : 'vm';
+    my $prefix;
+    if (defined($vtype) && $vtype eq 'vm-vol') {
+        $prefix = 'vol-vm';
+    } elsif (defined($vtype) && $vtype eq 'ct-vol') {
+        $prefix = ($fmt eq 'subvol') ? 'subvol-ct' : 'vol-ct';
+    } else {
+        $prefix = ($fmt eq 'subvol') ? 'subvol' : 'vm';
+    }
     my $suffix = $add_fmt_suffix ? ".$fmt" : '';
 
     my $disk_ids = {};
@@ -954,13 +958,13 @@ sub get_next_vm_diskname {
 }
 
 sub find_free_diskname {
-    my ($class, $storeid, $scfg, $vmid, $fmt, $add_fmt_suffix) = @_;
+    my ($class, $storeid, $scfg, $vmid, $fmt, $add_fmt_suffix, $vtype) = @_;
 
-    my $disks = $class->list_images($storeid, $scfg, $vmid);
+    my $disks = $class->list_images($storeid, $scfg, $vmid, undef, undef, $vtype);
 
     my $disk_list = [map { $_->{volid} } @$disks];
 
-    return get_next_vm_diskname($disk_list, $storeid, $vmid, $fmt, $scfg, $add_fmt_suffix);
+    return get_next_vm_diskname($disk_list, $storeid, $vmid, $fmt, $scfg, $add_fmt_suffix, $vtype);
 }
 
 sub clone_image {
@@ -1011,14 +1015,23 @@ sub clone_image {
 }
 
 sub alloc_image {
-    my ($class, $storeid, $scfg, $vmid, $fmt, $name, $size) = @_;
+    my ($class, $storeid, $scfg, $vmid, $fmt, $name, $size, $vtype) = @_;
 
-    my $imagedir = $class->get_subdir($scfg, 'images');
+    my $imagedir = $class->get_subdir($scfg, $vtype // 'images');
     $imagedir .= "/$vmid";
 
     mkpath $imagedir;
 
-    $name = $class->find_free_diskname($storeid, $scfg, $vmid, $fmt, 1) if !$name;
+    if ($name) {
+        if (defined($vtype)) {
+            die "illegal name '$name' - should be 'vol-vm-$vmid-*'\n"
+                if $vtype eq 'vm-vol' && $name !~ m/^vol-vm-$vmid-/;
+            die "illegal name '$name' - should be 'vol-ct-$vmid-*'\n"
+                if $vtype eq 'ct-vol' && $name !~ m/^vol-ct-$vmid-/;
+        }
+    } else {
+        $name = $class->find_free_diskname($storeid, $scfg, $vmid, $fmt, 1, $vtype);
+    }
 
     my (undef, $tmpfmt) = parse_name_dir($name);
 
diff --git a/src/PVE/Storage/RBDPlugin.pm b/src/PVE/Storage/RBDPlugin.pm
index 2ef1280..839ff73 100644
--- a/src/PVE/Storage/RBDPlugin.pm
+++ b/src/PVE/Storage/RBDPlugin.pm
@@ -620,7 +620,7 @@ sub qemu_blockdev_options {
 }
 
 sub find_free_diskname {
-    my ($class, $storeid, $scfg, $vmid, $fmt, $add_fmt_suffix) = @_;
+    my ($class, $storeid, $scfg, $vmid, $fmt, $add_fmt_suffix, $vtype) = @_;
 
     my $cmd = $rbd_cmd->($scfg, $storeid, 'ls');
 
@@ -640,7 +640,9 @@ sub find_free_diskname {
 
     die $err if $err && $err !~ m/doesn't contain rbd images/;
 
-    return PVE::Storage::Plugin::get_next_vm_diskname($disk_list, $storeid, $vmid, undef, $scfg);
+    return PVE::Storage::Plugin::get_next_vm_diskname(
+        $disk_list, $storeid, $vmid, undef, $scfg, 0, $vtype,
+    );
 }
 
 sub create_base {
@@ -730,12 +732,23 @@ sub clone_image {
 }
 
 sub alloc_image {
-    my ($class, $storeid, $scfg, $vmid, $fmt, $name, $size) = @_;
-
-    die "illegal name '$name' - should be 'vm-$vmid-*'\n"
-        if $name && $name !~ m/^vm-$vmid-/;
+    my ($class, $storeid, $scfg, $vmid, $fmt, $name, $size, $vtype) = @_;
+
+    if ($name) {
+        if (defined($vtype) && $vtype eq 'vm-vol') {
+            die "illegal name '$name' - should be 'vol-vm-$vmid-*'\n"
+                if $name !~ m/^vol-vm-$vmid-/;
+        } elsif (defined($vtype) && $vtype eq 'ct-vol') {
+            die "illegal name '$name' - should be 'vol-ct-$vmid-*'\n"
+                if $name !~ m/^vol-ct-$vmid-/;
+        } else {
+            die "illegal name '$name'"
+                . " - should be 'vm-$vmid-*', 'vol-vm-$vmid-*' or 'vol-ct-$vmid-*'\n"
+                if $name !~ m/^(?:vol-vm|vol-ct|vm)-$vmid-/;
+        }
+    }
 
-    $name = $class->find_free_diskname($storeid, $scfg, $vmid) if !$name;
+    $name = $class->find_free_diskname($storeid, $scfg, $vmid, undef, 0, $vtype) if !$name;
 
     my @options = (
         '--image-format', 2, '--size', int(($size + 1023) / 1024),
diff --git a/src/PVE/Storage/ZFSPlugin.pm b/src/PVE/Storage/ZFSPlugin.pm
index a05f521..259e468 100644
--- a/src/PVE/Storage/ZFSPlugin.pm
+++ b/src/PVE/Storage/ZFSPlugin.pm
@@ -355,16 +355,25 @@ sub clone_image {
 }
 
 sub alloc_image {
-    my ($class, $storeid, $scfg, $vmid, $fmt, $name, $size) = @_;
+    my ($class, $storeid, $scfg, $vmid, $fmt, $name, $size, $vtype) = @_;
 
     die "unsupported format '$fmt'" if $fmt ne 'raw';
 
-    die "illegal name '$name' - should be 'vm-$vmid-*'\n"
-        if $name && $name !~ m/^vm-$vmid-/;
+    if ($name) {
+        if (defined($vtype) && $vtype eq 'vm-vol') {
+            die "illegal name '$name' - should be 'vol-vm-$vmid-*'\n"
+                if $name !~ m/^vol-vm-$vmid-/;
+        } elsif (defined($vtype) && $vtype eq 'ct-vol') {
+            die "non-subvolumes not allowed for containers\n";
+        } else {
+            die "illegal name '$name'" . " - should be 'vm-$vmid-*', 'vol-vm-$vmid-*'\n"
+                if $name !~ m/^(?:vol-vm|vm)-$vmid-/;
+        }
+    }
 
     my $volname = $name;
 
-    $volname = $class->find_free_diskname($storeid, $scfg, $vmid, $fmt) if !$volname;
+    $volname = $class->find_free_diskname($storeid, $scfg, $vmid, $fmt, 0, $vtype) if !$volname;
 
     $class->zfs_create_zvol($scfg, $volname, $size);
 
diff --git a/src/PVE/Storage/ZFSPoolPlugin.pm b/src/PVE/Storage/ZFSPoolPlugin.pm
index d65af69..f972718 100644
--- a/src/PVE/Storage/ZFSPoolPlugin.pm
+++ b/src/PVE/Storage/ZFSPoolPlugin.pm
@@ -271,29 +271,42 @@ sub zfs_wait_for_zvol_link {
 }
 
 sub alloc_image {
-    my ($class, $storeid, $scfg, $vmid, $fmt, $name, $size) = @_;
+    my ($class, $storeid, $scfg, $vmid, $fmt, $name, $size, $vtype) = @_;
 
     my $volname = $name;
 
     if ($fmt eq 'raw') {
-
-        die "illegal name '$volname' - should be 'vm-$vmid-*'\n"
-            if $volname && $volname !~ m/^vm-$vmid-/;
-        $volname = $class->find_free_diskname($storeid, $scfg, $vmid, $fmt)
+        $volname = $class->find_free_diskname($storeid, $scfg, $vmid, $fmt, 0, $vtype)
             if !$volname;
 
+        if ($vtype) {
+            die "'raw' format not allowed for container volumes\n"
+                if $vtype ne 'vm-vol';
+
+            die "illegal name '$volname' - should be 'vol-vm-$vmid-*'\n"
+                if $volname !~ m/^vol-vm-$vmid-/;
+        } else {
+            die "illegal name '$volname' - should be 'vol-vm-$vmid-*' or 'vm-$vmid-*'\n"
+                if $volname !~ m/^(vol-)?vm-$vmid-/;
+        }
+
         $class->zfs_create_zvol($scfg, $volname, $size);
         $class->zfs_wait_for_zvol_link($scfg, $volname);
 
     } elsif ($fmt eq 'subvol') {
-
-        die "illegal name '$volname' - should be 'subvol-$vmid-*'\n"
-            if $volname && $volname !~ m/^subvol-$vmid-/;
-        $volname = $class->find_free_diskname($storeid, $scfg, $vmid, $fmt)
+        $volname = $class->find_free_diskname($storeid, $scfg, $vmid, $fmt, 0, $vtype)
             if !$volname;
 
-        die "illegal name '$volname' - should be 'subvol-$vmid-*'\n"
-            if $volname !~ m/^subvol-$vmid-/;
+        if ($vtype) {
+            die "'subvol' format not allowed for VM volumes\n"
+                if $vtype ne 'ct-vol';
+
+            die "illegal name '$volname' - should be 'subvol-ct-$vmid-*'\n"
+                if $volname !~ m/^subvol-ct-$vmid-/;
+        } else {
+            die "illegal name '$volname' - should be 'subvol-ct-$vmid-*' or 'subvol-$vmid-*'\n"
+                if $volname !~ m/^subvol(-ct)?-$vmid-/;
+        }
 
         $class->zfs_create_subvol($scfg, $volname, $size);
 
-- 
2.47.2



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] 74+ messages in thread

* [pve-devel] [PATCH storage 18/26] plugins: update create_base methods
  2025-07-29 11:15 [pve-devel] [RFC storage 00/26+10+3] unify vtype and content-type and Wolfgang Bumiller
                   ` (16 preceding siblings ...)
  2025-07-29 11:15 ` [pve-devel] [PATCH storage 17/26] plugins: add vtype parameter to alloc_image Wolfgang Bumiller
@ 2025-07-29 11:15 ` Wolfgang Bumiller
  2025-07-29 11:15 ` [pve-devel] [PATCH storage 19/26] plugins: update clone_image methods Wolfgang Bumiller
                   ` (21 subsequent siblings)
  39 siblings, 0 replies; 74+ messages in thread
From: Wolfgang Bumiller @ 2025-07-29 11:15 UTC (permalink / raw)
  To: pve-devel

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
---
 src/PVE/Storage/BTRFSPlugin.pm | 12 ++++++++++--
 src/PVE/Storage/Plugin.pm      |  9 +++++++--
 src/PVE/Storage/RBDPlugin.pm   |  6 +++++-
 src/PVE/Storage/ZFSPlugin.pm   |  6 +++++-
 4 files changed, 27 insertions(+), 6 deletions(-)

diff --git a/src/PVE/Storage/BTRFSPlugin.pm b/src/PVE/Storage/BTRFSPlugin.pm
index 0a42c88..b3a53b0 100644
--- a/src/PVE/Storage/BTRFSPlugin.pm
+++ b/src/PVE/Storage/BTRFSPlugin.pm
@@ -260,7 +260,11 @@ sub create_base {
         $class->parse_volname($volname);
 
     my $newname = $name;
-    $newname =~ s/^vm-/base-/;
+    if ($newname =~ /^vm-/) {
+        $newname =~ s/^vm-/base-/;
+    } else {
+        $newname = "base-$newname";
+    }
 
     # If we're not working with a 'raw' file, which is the only thing that's "different" for btrfs,
     # or a subvolume, we forward to the DirPlugin
@@ -441,7 +445,11 @@ sub free_image {
 
     my ($vtype, undef, $vmid, undef, undef, undef, $format) = $class->parse_volname($volname);
 
-    if (!defined($format) || $vtype ne 'images' || ($format ne 'subvol' && $format ne 'raw')) {
+    if (
+        !defined($format)
+        || !PVE::Storage::Common::is_volume_type($vtype)
+        || ($format ne 'subvol' && $format ne 'raw')
+    ) {
         return $class->SUPER::free_image($storeid, $scfg, $volname, $isBase, $_format);
     }
 
diff --git a/src/PVE/Storage/Plugin.pm b/src/PVE/Storage/Plugin.pm
index adaca47..e4cf392 100644
--- a/src/PVE/Storage/Plugin.pm
+++ b/src/PVE/Storage/Plugin.pm
@@ -873,7 +873,7 @@ sub create_base {
     my ($vtype, $name, $vmid, $basename, $basevmid, $isBase, $format) =
         $class->parse_volname($volname);
 
-    die "create_base on wrong vtype '$vtype'\n" if $vtype ne 'images';
+    die "create_base on wrong vtype '$vtype'\n" if !PVE::Storage::Common::is_volume_type($vtype);
 
     die "create_base not possible with base image\n" if $isBase;
 
@@ -886,7 +886,12 @@ sub create_base {
         if $basename && (!$parent || $parent ne "../$basevmid/$basename");
 
     my $newname = $name;
-    $newname =~ s/^vm-/base-/;
+    if ($newname =~ /^vm-/) {
+        # legacy name
+        $newname =~ s/^vm-/base-/;
+    } else {
+        $newname = "base-$newname";
+    }
 
     my $newvolname =
         $basename
diff --git a/src/PVE/Storage/RBDPlugin.pm b/src/PVE/Storage/RBDPlugin.pm
index 839ff73..11639f0 100644
--- a/src/PVE/Storage/RBDPlugin.pm
+++ b/src/PVE/Storage/RBDPlugin.pm
@@ -663,7 +663,11 @@ sub create_base {
         if $basename && (!$parent || $parent ne $basename . "@" . $snap);
 
     my $newname = $name;
-    $newname =~ s/^vm-/base-/;
+    if ($newname =~ /^vol-/) {
+        $newname = "base-$newname";
+    } else {
+        $newname =~ s/^vm-/base-/;
+    }
 
     my $newvolname = $basename ? "$basename/$newname" : "$newname";
 
diff --git a/src/PVE/Storage/ZFSPlugin.pm b/src/PVE/Storage/ZFSPlugin.pm
index 259e468..fdbe80c 100644
--- a/src/PVE/Storage/ZFSPlugin.pm
+++ b/src/PVE/Storage/ZFSPlugin.pm
@@ -325,7 +325,11 @@ sub create_base {
     die "create_base not possible with base image\n" if $isBase;
 
     my $newname = $name;
-    $newname =~ s/^vm-/base-/;
+    if ($newname =~ /^vm-/) {
+        $newname =~ s/^vm-/base-/;
+    } else {
+        $newname = "base-$newname";
+    }
 
     my $newvolname = $basename ? "$basename/$newname" : "$newname";
 
-- 
2.47.2



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] 74+ messages in thread

* [pve-devel] [PATCH storage 19/26] plugins: update clone_image methods
  2025-07-29 11:15 [pve-devel] [RFC storage 00/26+10+3] unify vtype and content-type and Wolfgang Bumiller
                   ` (17 preceding siblings ...)
  2025-07-29 11:15 ` [pve-devel] [PATCH storage 18/26] plugins: update create_base methods Wolfgang Bumiller
@ 2025-07-29 11:15 ` Wolfgang Bumiller
  2025-07-29 11:15 ` [pve-devel] [PATCH storage 20/26] plugins: update rename_volumes methods Wolfgang Bumiller
                   ` (20 subsequent siblings)
  39 siblings, 0 replies; 74+ messages in thread
From: Wolfgang Bumiller @ 2025-07-29 11:15 UTC (permalink / raw)
  To: pve-devel

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
---
 src/PVE/Storage/BTRFSPlugin.pm       | 12 ++++++++++--
 src/PVE/Storage/ESXiPlugin.pm        |  2 +-
 src/PVE/Storage/ISCSIDirectPlugin.pm |  2 +-
 src/PVE/Storage/ISCSIPlugin.pm       |  2 +-
 src/PVE/Storage/LVMPlugin.pm         |  2 +-
 src/PVE/Storage/LvmThinPlugin.pm     | 14 ++++++++++++--
 src/PVE/Storage/Plugin.pm            | 17 +++++++++++++----
 src/PVE/Storage/RBDPlugin.pm         | 12 ++++++++++--
 src/PVE/Storage/ZFSPlugin.pm         |  4 ++--
 src/PVE/Storage/ZFSPoolPlugin.pm     | 13 +++++++++++--
 10 files changed, 62 insertions(+), 18 deletions(-)

diff --git a/src/PVE/Storage/BTRFSPlugin.pm b/src/PVE/Storage/BTRFSPlugin.pm
index b3a53b0..8417dd6 100644
--- a/src/PVE/Storage/BTRFSPlugin.pm
+++ b/src/PVE/Storage/BTRFSPlugin.pm
@@ -292,11 +292,19 @@ sub create_base {
 }
 
 sub clone_image {
-    my ($class, $scfg, $storeid, $volname, $vmid, $snap) = @_;
+    my ($class, $scfg, $storeid, $volname, $vmid, $snap, $target_vtype) = @_;
 
     my ($vtype, $basename, $basevmid, undef, undef, $isBase, $format) =
         $class->parse_volname($volname);
 
+    if (
+        defined($target_vtype)
+        && !PVE::Storage::Common::is_type_change_allowed($vtype, $target_vtype)
+    ) {
+        die "refusing to clone image as different vtype:"
+            . " (source is '$vtype', target '$target_vtype')\n";
+    }
+
     # If we're not working with a 'raw' file, which is the only thing that's "different" for btrfs,
     # or a subvolume, we forward to the DirPlugin
     if ($format ne 'raw' && $format ne 'subvol') {
@@ -308,7 +316,7 @@ sub clone_image {
     mkpath $imagedir;
 
     my $path = $class->filesystem_path($scfg, $volname);
-    my $newname = $class->find_free_diskname($storeid, $scfg, $vmid, $format, 1);
+    my $newname = $class->find_free_diskname($storeid, $scfg, $vmid, $format, 1, $vtype);
 
     # For btrfs subvolumes we don't actually need the "link":
     #my $newvolname = "$basevmid/$basename/$vmid/$newname";
diff --git a/src/PVE/Storage/ESXiPlugin.pm b/src/PVE/Storage/ESXiPlugin.pm
index d10b156..8cb9193 100644
--- a/src/PVE/Storage/ESXiPlugin.pm
+++ b/src/PVE/Storage/ESXiPlugin.pm
@@ -460,7 +460,7 @@ sub list_volumes {
 }
 
 sub clone_image {
-    my ($class, $scfg, $storeid, $volname, $vmid, $snap) = @_;
+    my ($class, $scfg, $storeid, $volname, $vmid, $snap, $vtype) = @_;
 
     die "cloning images is not supported for $class\n";
 }
diff --git a/src/PVE/Storage/ISCSIDirectPlugin.pm b/src/PVE/Storage/ISCSIDirectPlugin.pm
index 0fee541..4fefb3a 100644
--- a/src/PVE/Storage/ISCSIDirectPlugin.pm
+++ b/src/PVE/Storage/ISCSIDirectPlugin.pm
@@ -134,7 +134,7 @@ sub create_base {
 }
 
 sub clone_image {
-    my ($class, $scfg, $storeid, $volname, $vmid, $snap) = @_;
+    my ($class, $scfg, $storeid, $volname, $vmid, $snap, $target_vtype) = @_;
 
     die "can't clone images in iscsi storage\n";
 }
diff --git a/src/PVE/Storage/ISCSIPlugin.pm b/src/PVE/Storage/ISCSIPlugin.pm
index 5118d73..a7b1920 100644
--- a/src/PVE/Storage/ISCSIPlugin.pm
+++ b/src/PVE/Storage/ISCSIPlugin.pm
@@ -396,7 +396,7 @@ sub create_base {
 }
 
 sub clone_image {
-    my ($class, $scfg, $storeid, $volname, $vmid, $snap) = @_;
+    my ($class, $scfg, $storeid, $volname, $vmid, $snap, $target_vtype) = @_;
 
     die "can't clone images in iscsi storage\n";
 }
diff --git a/src/PVE/Storage/LVMPlugin.pm b/src/PVE/Storage/LVMPlugin.pm
index af789ba..304d411 100644
--- a/src/PVE/Storage/LVMPlugin.pm
+++ b/src/PVE/Storage/LVMPlugin.pm
@@ -529,7 +529,7 @@ sub create_base {
 }
 
 sub clone_image {
-    my ($class, $scfg, $storeid, $volname, $vmid, $snap) = @_;
+    my ($class, $scfg, $storeid, $volname, $vmid, $snap, $target_vtype) = @_;
 
     die "can't clone images in lvm storage\n";
 }
diff --git a/src/PVE/Storage/LvmThinPlugin.pm b/src/PVE/Storage/LvmThinPlugin.pm
index 2071822..6462c22 100644
--- a/src/PVE/Storage/LvmThinPlugin.pm
+++ b/src/PVE/Storage/LvmThinPlugin.pm
@@ -339,7 +339,7 @@ sub deactivate_volume {
 }
 
 sub clone_image {
-    my ($class, $scfg, $storeid, $volname, $vmid, $snap) = @_;
+    my ($class, $scfg, $storeid, $volname, $vmid, $snap, $target_vtype) = @_;
 
     my $vg = $scfg->{vgname};
 
@@ -352,10 +352,20 @@ sub clone_image {
 
         die "clone_image only works on base images\n" if !$isBase;
 
+        if (
+            defined($target_vtype)
+            && !PVE::Storage::Common::is_type_change_allowed($vtype, $target_vtype)
+        ) {
+            die "refusing to clone '$volname':"
+                . " volume has vtype '$vtype', requested vtype is '$target_vtype'\n";
+        } else {
+            $target_vtype = $vtype;
+        }
+
         $lv = "$vg/$volname";
     }
 
-    my $name = $class->find_free_diskname($storeid, $scfg, $vmid);
+    my $name = $class->find_free_diskname($storeid, $scfg, $vmid, undef, 0, $target_vtype);
 
     my $cmd = ['/sbin/lvcreate', '-n', $name, '-prw', '-kn', '-s', $lv];
     run_command($cmd, errmsg => "clone image '$lv' error");
diff --git a/src/PVE/Storage/Plugin.pm b/src/PVE/Storage/Plugin.pm
index e4cf392..1b72a17 100644
--- a/src/PVE/Storage/Plugin.pm
+++ b/src/PVE/Storage/Plugin.pm
@@ -973,7 +973,7 @@ sub find_free_diskname {
 }
 
 sub clone_image {
-    my ($class, $scfg, $storeid, $volname, $vmid, $snap) = @_;
+    my ($class, $scfg, $storeid, $volname, $vmid, $snap, $target_vtype) = @_;
 
     # this only works for file based storage types
     die "storage definition has no path\n" if !$scfg->{path};
@@ -981,7 +981,16 @@ sub clone_image {
     my ($vtype, $basename, $basevmid, undef, undef, $isBase, $format) =
         $class->parse_volname($volname);
 
-    die "clone_image on wrong vtype '$vtype'\n" if $vtype ne 'images';
+    die "clone_image on wrong vtype '$vtype'\n" if !PVE::Storage::Common::is_volume_type($vtype);
+
+    if (
+        defined($target_vtype)
+        && !PVE::Storage::Common::is_type_change_allowed($vtype, $target_vtype)
+    ) {
+        die "refusing to clone image as different vtype:"
+            . " (source is '$vtype', target '$target_vtype')\n";
+    }
+    $target_vtype //= $vtype;
 
     die "this storage type does not support clone_image on snapshot\n" if $snap;
 
@@ -989,12 +998,12 @@ sub clone_image {
 
     die "clone_image only works on base images\n" if !$isBase;
 
-    my $imagedir = $class->get_subdir($scfg, 'images');
+    my $imagedir = $class->get_subdir($scfg, $target_vtype);
     $imagedir .= "/$vmid";
 
     mkpath $imagedir;
 
-    my $name = $class->find_free_diskname($storeid, $scfg, $vmid, "qcow2", 1);
+    my $name = $class->find_free_diskname($storeid, $scfg, $vmid, "qcow2", 1, $target_vtype);
 
     warn "clone $volname: $vtype, $name, $vmid to $name (base=../$basevmid/$basename)\n";
 
diff --git a/src/PVE/Storage/RBDPlugin.pm b/src/PVE/Storage/RBDPlugin.pm
index 11639f0..fb97c94 100644
--- a/src/PVE/Storage/RBDPlugin.pm
+++ b/src/PVE/Storage/RBDPlugin.pm
@@ -697,7 +697,7 @@ sub create_base {
 }
 
 sub clone_image {
-    my ($class, $scfg, $storeid, $volname, $vmid, $snapname) = @_;
+    my ($class, $scfg, $storeid, $volname, $vmid, $snapname, $target_vtype) = @_;
 
     my $snap = '__base__';
     $snap = $snapname if length $snapname;
@@ -707,7 +707,15 @@ sub clone_image {
     die "$volname is not a base image and snapname is not provided\n"
         if !$isBase && !length($snapname);
 
-    my $name = $class->find_free_diskname($storeid, $scfg, $vmid);
+    if (
+        defined($target_vtype)
+        && !PVE::Storage::Common::is_type_change_allowed($vtype, $target_vtype)
+    ) {
+        die "refusing to clone image as different vtype:"
+            . " (source is '$vtype', target '$target_vtype')\n";
+    }
+
+    my $name = $class->find_free_diskname($storeid, $scfg, $vmid, undef, undef $target_vtype);
 
     warn "clone $volname: $basename snapname $snap to $name\n";
 
diff --git a/src/PVE/Storage/ZFSPlugin.pm b/src/PVE/Storage/ZFSPlugin.pm
index fdbe80c..721e39e 100644
--- a/src/PVE/Storage/ZFSPlugin.pm
+++ b/src/PVE/Storage/ZFSPlugin.pm
@@ -345,9 +345,9 @@ sub create_base {
 }
 
 sub clone_image {
-    my ($class, $scfg, $storeid, $volname, $vmid, $snap) = @_;
+    my ($class, $scfg, $storeid, $volname, $vmid, $snap, $target_vtype) = @_;
 
-    my $name = $class->SUPER::clone_image($scfg, $storeid, $volname, $vmid, $snap);
+    my $name = $class->SUPER::clone_image($scfg, $storeid, $volname, $vmid, $snap, $target_vtype);
 
     # get ZFS dataset name from PVE volname
     my (undef, $clonedname) = $class->parse_volname($name);
diff --git a/src/PVE/Storage/ZFSPoolPlugin.pm b/src/PVE/Storage/ZFSPoolPlugin.pm
index f972718..1571310 100644
--- a/src/PVE/Storage/ZFSPoolPlugin.pm
+++ b/src/PVE/Storage/ZFSPoolPlugin.pm
@@ -706,7 +706,7 @@ sub deactivate_volume {
 }
 
 sub clone_image {
-    my ($class, $scfg, $storeid, $volname, $vmid, $snap) = @_;
+    my ($class, $scfg, $storeid, $volname, $vmid, $snap, $target_vtype) = @_;
 
     $snap ||= '__base__';
 
@@ -715,7 +715,16 @@ sub clone_image {
 
     die "clone_image only works on base images\n" if !$isBase;
 
-    my $name = $class->find_free_diskname($storeid, $scfg, $vmid, $format);
+    if (
+        defined($target_vtype)
+        && !PVE::Storage::Common::is_type_change_allowed($vtype, $target_vtype)
+    ) {
+        die "refusing to clone image as different vtype:"
+            . " (source is '$vtype', target '$target_vtype')\n";
+    }
+    $target_vtype //= $vtype;
+
+    my $name = $class->find_free_diskname($storeid, $scfg, $vmid, $format, 0, $target_vtype);
 
     if ($format eq 'subvol') {
         my $size = $class->zfs_request(
-- 
2.47.2



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] 74+ messages in thread

* [pve-devel] [PATCH storage 20/26] plugins: update rename_volumes methods
  2025-07-29 11:15 [pve-devel] [RFC storage 00/26+10+3] unify vtype and content-type and Wolfgang Bumiller
                   ` (18 preceding siblings ...)
  2025-07-29 11:15 ` [pve-devel] [PATCH storage 19/26] plugins: update clone_image methods Wolfgang Bumiller
@ 2025-07-29 11:15 ` Wolfgang Bumiller
  2025-07-29 11:15 ` [pve-devel] [PATCH storage 21/26] plugins: update volume_import methods Wolfgang Bumiller
                   ` (19 subsequent siblings)
  39 siblings, 0 replies; 74+ messages in thread
From: Wolfgang Bumiller @ 2025-07-29 11:15 UTC (permalink / raw)
  To: pve-devel

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
---
 src/PVE/Storage/BTRFSPlugin.pm   | 12 ++++++++++--
 src/PVE/Storage/LVMPlugin.pm     | 11 +++++++++--
 src/PVE/Storage/Plugin.pm        | 26 ++++++++++++++++++++++----
 src/PVE/Storage/RBDPlugin.pm     | 11 +++++++++--
 src/PVE/Storage/ZFSPoolPlugin.pm | 11 +++++++++--
 5 files changed, 59 insertions(+), 12 deletions(-)

diff --git a/src/PVE/Storage/BTRFSPlugin.pm b/src/PVE/Storage/BTRFSPlugin.pm
index 8417dd6..a0145bb 100644
--- a/src/PVE/Storage/BTRFSPlugin.pm
+++ b/src/PVE/Storage/BTRFSPlugin.pm
@@ -1031,7 +1031,7 @@ sub rename_volume {
     my ($class, $scfg, $storeid, $source_volname, $target_vmid, $target_volname) = @_;
     die "no path found\n" if !$scfg->{path};
 
-    my $format = ($class->parse_volname($source_volname))[6];
+    my ($source_vtype, $format) = ($class->parse_volname($source_volname))[0, 6];
 
     if ($format ne 'raw' && $format ne 'subvol') {
         return $class->SUPER::rename_volume(
@@ -1039,8 +1039,16 @@ sub rename_volume {
         );
     }
 
-    $target_volname = $class->find_free_diskname($storeid, $scfg, $target_vmid, $format, 1)
+    $target_volname =
+        $class->find_free_diskname($storeid, $scfg, $target_vmid, $format, 1, $source_vtype)
         if !$target_volname;
+
+    my ($target_vtype) = $class->parse_volname($target_volname);
+    if (!PVE::Storage::Common::is_type_change_allowed($source_vtype, $target_vtype)) {
+        die "refusing to rename volume '$source_volname' to '$target_volname':"
+            . " source has vtype '$source_vtype', target name has vtype '$target_vtype'\n";
+    }
+
     $target_volname = "$target_vmid/$target_volname";
 
     my $basedir = $class->get_subdir($scfg, 'images');
diff --git a/src/PVE/Storage/LVMPlugin.pm b/src/PVE/Storage/LVMPlugin.pm
index 304d411..b578ff4 100644
--- a/src/PVE/Storage/LVMPlugin.pm
+++ b/src/PVE/Storage/LVMPlugin.pm
@@ -1332,7 +1332,7 @@ sub rename_volume {
     my ($class, $scfg, $storeid, $source_volname, $target_vmid, $target_volname) = @_;
 
     my (
-        undef, $source_image, $source_vmid, $base_name, $base_vmid, undef, $format,
+        $source_vtype, $source_image, $source_vmid, $base_name, $base_vmid, undef, $format,
     ) = $class->parse_volname($source_volname);
 
     if ($format eq 'qcow2') {
@@ -1340,9 +1340,16 @@ sub rename_volume {
         die "we can't rename volume if external snapshot exists" if $snapshots->{current}->{parent};
     }
 
-    $target_volname = $class->find_free_diskname($storeid, $scfg, $target_vmid, $format)
+    $target_volname =
+        $class->find_free_diskname($storeid, $scfg, $target_vmid, $format, 0, $source_vtype)
         if !$target_volname;
 
+    my ($target_vtype) = $class->parse_volname($target_volname);
+    if (!PVE::Storage::Common::is_type_change_allowed($source_vtype, $target_vtype)) {
+        die "refusing to rename volume '$source_volname' to '$target_volname':"
+            . " source has vtype '$source_vtype', target name has vtype '$target_vtype'\n";
+    }
+
     my $vg = $scfg->{vgname};
     my $lvs = lvm_list_volumes($vg);
     die "target volume '${target_volname}' already exists\n"
diff --git a/src/PVE/Storage/Plugin.pm b/src/PVE/Storage/Plugin.pm
index 1b72a17..e418042 100644
--- a/src/PVE/Storage/Plugin.pm
+++ b/src/PVE/Storage/Plugin.pm
@@ -2367,7 +2367,7 @@ sub volume_import_formats {
 }
 
 sub rename_volume {
-    my ($class, $scfg, $storeid, $source_volname, $target_vmid, $target_volname) = @_;
+    my ($class, $scfg, $storeid, $source_volname, $target_vmid, $target_volname, $vtype) = @_;
     die "not implemented in storage plugin '$class'\n" if $class->can('api') && $class->api() < 10;
     die "no path found\n" if !$scfg->{path};
 
@@ -2378,11 +2378,29 @@ sub rename_volume {
     }
 
     my (
-        undef, $source_image, $source_vmid, $base_name, $base_vmid, undef, $format,
+        $source_vtype, $source_image, $source_vmid, $base_name, $base_vmid, undef, $format,
     ) = $class->parse_volname($source_volname);
 
-    $target_volname = $class->find_free_diskname($storeid, $scfg, $target_vmid, $format, 1)
-        if !$target_volname;
+    $target_volname = $class->find_free_diskname(
+        $storeid,
+        $scfg,
+        $target_vmid,
+        $format,
+        1,
+        $vtype // $source_vtype,
+    ) if !$target_volname;
+
+    my ($target_vtype) = $class->parse_volname($target_volname);
+
+    if (!PVE::Storage::Common::is_type_change_allowed($source_vtype, $target_vtype)) {
+        die "refusing to rename volume '$source_volname' to '$target_volname':"
+            . " source has vtype '$source_vtype', target name has vtype '$target_vtype'\n";
+    }
+
+    if (defined($vtype) && !PVE::Storage::Common::is_type_change_allowed($vtype, $target_vtype)) {
+        die "refusing to rename volume '$source_volname' to '$target_volname':"
+            . "  target name has vtype '$target_vtype', but vtype '$vtype' was requested\n";
+    }
 
     my $basedir = $class->get_subdir($scfg, 'images');
 
diff --git a/src/PVE/Storage/RBDPlugin.pm b/src/PVE/Storage/RBDPlugin.pm
index fb97c94..437dd07 100644
--- a/src/PVE/Storage/RBDPlugin.pm
+++ b/src/PVE/Storage/RBDPlugin.pm
@@ -1111,11 +1111,18 @@ sub rename_volume {
     my ($class, $scfg, $storeid, $source_volname, $target_vmid, $target_volname) = @_;
 
     my (
-        undef, $source_image, $source_vmid, $base_name, $base_vmid, undef, $format,
+        $source_vtype, $source_image, $source_vmid, $base_name, $base_vmid, undef, $format,
     ) = $class->parse_volname($source_volname);
-    $target_volname = $class->find_free_diskname($storeid, $scfg, $target_vmid, $format)
+    $target_volname =
+        $class->find_free_diskname($storeid, $scfg, $target_vmid, $format, 0, $source_vtype)
         if !$target_volname;
 
+    my ($target_vtype) = $class->parse_volname($target_volname);
+    if (!PVE::Storage::Common::is_type_change_allowed($source_vtype, $target_vtype)) {
+        die "refusing to rename volume '$source_volname' to '$target_volname':"
+            . " source has vtype '$source_vtype', target name has vtype '$target_vtype'\n";
+    }
+
     die "target volume '${target_volname}' already exists\n"
         if rbd_volume_exists($scfg, $storeid, $target_volname);
 
diff --git a/src/PVE/Storage/ZFSPoolPlugin.pm b/src/PVE/Storage/ZFSPoolPlugin.pm
index 1571310..34768d2 100644
--- a/src/PVE/Storage/ZFSPoolPlugin.pm
+++ b/src/PVE/Storage/ZFSPoolPlugin.pm
@@ -943,11 +943,18 @@ sub rename_volume {
     my ($class, $scfg, $storeid, $source_volname, $target_vmid, $target_volname) = @_;
 
     my (
-        undef, $source_image, $source_vmid, $base_name, $base_vmid, undef, $format,
+        $source_vtype, $source_image, $source_vmid, $base_name, $base_vmid, undef, $format,
     ) = $class->parse_volname($source_volname);
-    $target_volname = $class->find_free_diskname($storeid, $scfg, $target_vmid, $format)
+    $target_volname =
+        $class->find_free_diskname($storeid, $scfg, $target_vmid, $format, 0, $source_vtype)
         if !$target_volname;
 
+    my ($target_vtype) = $class->parse_volname($target_volname);
+    if (!PVE::Storage::Common::is_type_change_allowed($source_vtype, $target_vtype)) {
+        die "refusing to rename volume '$source_volname' to '$target_volname':"
+            . " source has vtype '$source_vtype', target name has vtype '$target_vtype'\n";
+    }
+
     my $pool = $scfg->{pool};
     my $source_zfspath = "${pool}/${source_image}";
     my $target_zfspath = "${pool}/${target_volname}";
-- 
2.47.2



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] 74+ messages in thread

* [pve-devel] [PATCH storage 21/26] plugins: update volume_import methods
  2025-07-29 11:15 [pve-devel] [RFC storage 00/26+10+3] unify vtype and content-type and Wolfgang Bumiller
                   ` (19 preceding siblings ...)
  2025-07-29 11:15 ` [pve-devel] [PATCH storage 20/26] plugins: update rename_volumes methods Wolfgang Bumiller
@ 2025-07-29 11:15 ` Wolfgang Bumiller
  2025-07-29 11:15 ` [pve-devel] [PATCH storage 22/26] zfs: update 'path' method for new naming scheme Wolfgang Bumiller
                   ` (18 subsequent siblings)
  39 siblings, 0 replies; 74+ messages in thread
From: Wolfgang Bumiller @ 2025-07-29 11:15 UTC (permalink / raw)
  To: pve-devel

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
---
 src/PVE/Storage/BTRFSPlugin.pm   | 11 +++++-
 src/PVE/Storage/LVMPlugin.pm     | 12 ++++++-
 src/PVE/Storage/LvmThinPlugin.pm | 62 ++++++++++++++++++++------------
 src/PVE/Storage/Plugin.pm        | 12 ++++++-
 src/PVE/Storage/RBDPlugin.pm     | 13 +++++--
 src/PVE/Storage/ZFSPoolPlugin.pm | 14 ++++++--
 6 files changed, 94 insertions(+), 30 deletions(-)

diff --git a/src/PVE/Storage/BTRFSPlugin.pm b/src/PVE/Storage/BTRFSPlugin.pm
index a0145bb..0bd5244 100644
--- a/src/PVE/Storage/BTRFSPlugin.pm
+++ b/src/PVE/Storage/BTRFSPlugin.pm
@@ -880,6 +880,7 @@ sub volume_import {
         $base_snapshot,
         $with_snapshots,
         $allow_rename,
+        $import_vtype,
     ) = @_;
 
     if ($format ne 'btrfs') {
@@ -895,6 +896,14 @@ sub volume_import {
     die "btrfs-receiving volumes of type $volume_format ('$volname') is not supported\n"
         if $volume_format ne 'raw' && $volume_format ne 'subvol';
 
+    if (
+        defined($import_vtype)
+        && !PVE::Storage::Common::is_type_change_allowed($import_vtype, $vtype)
+    ) {
+        die "refusing import volume with name '$volname':"
+            . " name implies type '$vtype', import requested type '$import_vtype'\n";
+    }
+
     if (defined($base_snapshot)) {
         my $path = $class->path($scfg, $volname, $storeid, $base_snapshot);
         $path = raw_file_to_subvol($path) if $volume_format eq 'raw';
@@ -909,7 +918,7 @@ sub volume_import {
 
     if (!defined($base_snapshot) && -e $destination) {
         die "volume $volname already exists\n" if !$allow_rename;
-        $volname = $class->find_free_diskname($storeid, $scfg, $vmid, $volume_format, 1);
+        $volname = $class->find_free_diskname($storeid, $scfg, $vmid, $volume_format, 1, $vtype);
     }
 
     my $imagedir = $class->get_subdir($scfg, $vtype);
diff --git a/src/PVE/Storage/LVMPlugin.pm b/src/PVE/Storage/LVMPlugin.pm
index b578ff4..1811e05 100644
--- a/src/PVE/Storage/LVMPlugin.pm
+++ b/src/PVE/Storage/LVMPlugin.pm
@@ -1278,6 +1278,7 @@ sub volume_import {
         $base_snapshot,
         $with_snapshots,
         $allow_rename,
+        $import_vtype,
     ) = @_;
     die "volume import format $format not available for $class\n"
         if $format ne 'raw+size';
@@ -1290,6 +1291,14 @@ sub volume_import {
     die "cannot import format $format into a file of format $file_format\n"
         if $file_format ne 'raw';
 
+    if (
+        defined($import_vtype)
+        && !PVE::Storage::Common::is_type_change_allowed($import_vtype, $vtype)
+    ) {
+        die "refusing import volume with name '$volname':"
+            . " name implies type '$vtype', import requested type '$import_vtype'\n";
+    }
+
     my $vg = $scfg->{vgname};
     my $lvs = lvm_list_volumes($vg);
     if ($lvs->{$vg}->{$volname}) {
@@ -1302,7 +1311,8 @@ sub volume_import {
     $size = PVE::Storage::Common::align_size_up($size, 1024) / 1024;
 
     eval {
-        my $allocname = $class->alloc_image($storeid, $scfg, $vmid, 'raw', $name, $size);
+        my $allocname =
+            $class->alloc_image($storeid, $scfg, $vmid, 'raw', $name, $size, $vtype);
         my $oldname = $volname;
         $volname = $allocname;
         if (defined($name) && $allocname ne $oldname) {
diff --git a/src/PVE/Storage/LvmThinPlugin.pm b/src/PVE/Storage/LvmThinPlugin.pm
index 6462c22..c1ff474 100644
--- a/src/PVE/Storage/LvmThinPlugin.pm
+++ b/src/PVE/Storage/LvmThinPlugin.pm
@@ -6,6 +6,7 @@ use warnings;
 use IO::File;
 
 use PVE::Tools qw(run_command trim);
+use PVE::Storage::Common;
 use PVE::Storage::Plugin;
 use PVE::Storage::LVMPlugin;
 use PVE::JSONSchema qw(get_standard_option);
@@ -488,6 +489,7 @@ sub volume_import {
         $base_snapshot,
         $with_snapshots,
         $allow_rename,
+        $import_vtype,
     ) = @_;
 
     my ($vtype, $name, $vmid, $basename, $basevmid, $isBase, $file_format) =
@@ -504,36 +506,50 @@ sub volume_import {
             $base_snapshot,
             $with_snapshots,
             $allow_rename,
+            $import_vtype,
         );
+    }
+
+    if (
+        defined($import_vtype)
+        && !PVE::Storage::Common::is_type_change_allowed($import_vtype, $vtype)
+    ) {
+        die "refusing import volume with name '$volname':"
+            . " name implies type '$vtype', import requested type '$import_vtype'\n";
+    }
+
+    my $tempname;
+    my $vg = $scfg->{vgname};
+    my $lvs = PVE::Storage::LVMPlugin::lvm_list_volumes($vg);
+    if ($lvs->{$vg}->{$volname}) {
+        die "volume $vg/$volname already exists\n" if !$allow_rename;
+        warn "volume $vg/$volname already exists - importing with a different name\n";
+
+        $tempname = $class->find_free_diskname($storeid, $scfg, $vmid, undef, 0, $vtype);
     } else {
-        my $tempname;
-        my $vg = $scfg->{vgname};
-        my $lvs = PVE::Storage::LVMPlugin::lvm_list_volumes($vg);
-        if ($lvs->{$vg}->{$volname}) {
-            die "volume $vg/$volname already exists\n" if !$allow_rename;
-            warn "volume $vg/$volname already exists - importing with a different name\n";
-
-            $tempname = $class->find_free_diskname($storeid, $scfg, $vmid);
+        $tempname = $volname;
+        if ($tempname =~ /^base-vol-/) {
+            $tempname =~ substr($tempname, 5);
         } else {
-            $tempname = $volname;
             $tempname =~ s/base/vm/;
         }
+    }
 
-        my $newvolid = $class->SUPER::volume_import(
-            $scfg,
-            $storeid,
-            $fh,
-            $tempname,
-            $format,
-            $snapshot,
-            $base_snapshot,
-            $with_snapshots,
-            $allow_rename,
-        );
-        ($storeid, my $newname) = PVE::Storage::parse_volume_id($newvolid);
+    my $newvolid = $class->SUPER::volume_import(
+        $scfg,
+        $storeid,
+        $fh,
+        $tempname,
+        $format,
+        $snapshot,
+        $base_snapshot,
+        $with_snapshots,
+        $allow_rename,
+        $import_vtype,
+    );
+    ($storeid, my $newname) = PVE::Storage::parse_volume_id($newvolid);
 
-        $volname = $class->create_base($storeid, $scfg, $newname);
-    }
+    $volname = $class->create_base($storeid, $scfg, $newname);
 
     return "$storeid:$volname";
 }
diff --git a/src/PVE/Storage/Plugin.pm b/src/PVE/Storage/Plugin.pm
index e418042..fc39df7 100644
--- a/src/PVE/Storage/Plugin.pm
+++ b/src/PVE/Storage/Plugin.pm
@@ -2289,6 +2289,7 @@ sub volume_import {
         $base_snapshot,
         $with_snapshots,
         $allow_rename,
+        $import_vtype,
     ) = @_;
 
     die "volume import format '$format' not available for $class\n"
@@ -2303,6 +2304,14 @@ sub volume_import {
     my ($vtype, $name, $vmid, $basename, $basevmid, $isBase, $file_format) =
         $class->parse_volname($volname);
 
+    if (
+        defined($import_vtype)
+        && !PVE::Storage::Common::is_type_change_allowed($import_vtype, $vtype)
+    ) {
+        die "refusing import volume with name '$volname':"
+            . " name implies type '$vtype', import requested type '$import_vtype'\n";
+    }
+
     # XXX: Should we bother with conversion routines at this level? This won't
     # happen without manual CLI usage, so for now we just error out...
     die "cannot import format $format into a file of format $file_format\n"
@@ -2321,7 +2330,8 @@ sub volume_import {
     $size = PVE::Storage::Common::align_size_up($size, 1024) / 1024;
 
     eval {
-        my $allocname = $class->alloc_image($storeid, $scfg, $vmid, $file_format, $name, $size);
+        my $allocname =
+            $class->alloc_image($storeid, $scfg, $vmid, $file_format, $name, $size, $vtype);
         my $oldname = $volname;
         $volname = $allocname;
         if (defined($name) && $allocname ne $oldname) {
diff --git a/src/PVE/Storage/RBDPlugin.pm b/src/PVE/Storage/RBDPlugin.pm
index 437dd07..7b54f7c 100644
--- a/src/PVE/Storage/RBDPlugin.pm
+++ b/src/PVE/Storage/RBDPlugin.pm
@@ -1068,20 +1068,29 @@ sub volume_import {
         $base_snapshot,
         $with_snapshots,
         $allow_rename,
+        $import_vtype,
     ) = @_;
 
     die "volume import format $format not available for $class\n" if $format ne 'raw+size';
     die "cannot import volumes together with their snapshots in $class\n" if $with_snapshots;
     die "cannot import an incremental stream in $class\n" if defined($base_snapshot);
 
-    my (undef, $name, $vmid, undef, undef, undef, $file_format) = $class->parse_volname($volname);
+    my ($vtype, $name, $vmid, undef, undef, undef, $file_format) = $class->parse_volname($volname);
     die "cannot import format $format into a volume of format $file_format\n"
         if $file_format ne 'raw';
 
+    if (
+        defined($import_vtype)
+        && !PVE::Storage::Common::is_type_change_allowed($import_vtype, $vtype)
+    ) {
+        die "refusing import volume with name '$volname':"
+            . " name implies type '$vtype', import requested type '$import_vtype'\n";
+    }
+
     if (rbd_volume_exists($scfg, $storeid, $name)) {
         die "volume $name already exists\n" if !$allow_rename;
         warn "volume $name already exists - importing with a different name\n";
-        $volname = $class->find_free_diskname($storeid, $scfg, $vmid, $file_format);
+        $volname = $class->find_free_diskname($storeid, $scfg, $vmid, $file_format, 0, $vtype);
     }
 
     my ($size) = PVE::Storage::Plugin::read_common_header($fh);
diff --git a/src/PVE/Storage/ZFSPoolPlugin.pm b/src/PVE/Storage/ZFSPoolPlugin.pm
index 34768d2..2cae090 100644
--- a/src/PVE/Storage/ZFSPoolPlugin.pm
+++ b/src/PVE/Storage/ZFSPoolPlugin.pm
@@ -9,6 +9,7 @@ use POSIX;
 
 use PVE::ProcFSTools;
 use PVE::RPCEnvironment;
+use PVE::Storage::Common;
 use PVE::Storage::Plugin;
 use PVE::Tools qw(run_command);
 
@@ -890,6 +891,7 @@ sub volume_import {
         $base_snapshot,
         $with_snapshots,
         $allow_rename,
+        $import_vtype,
     ) = @_;
 
     die "unsupported import stream format for $class: $format\n"
@@ -899,9 +901,17 @@ sub volume_import {
     die "internal error: invalid file handle for volume_import\n"
         if !defined($fd);
 
-    my (undef, $dataset, $vmid, undef, undef, undef, $volume_format) =
+    my ($vtype, $dataset, $vmid, undef, undef, undef, $volume_format) =
         $class->parse_volname($volname);
 
+    if (
+        defined($import_vtype)
+        && !PVE::Storage::Common::is_type_change_allowed($import_vtype, $vtype)
+    ) {
+        die "refusing import volume with name '$volname':"
+            . " name implies type '$vtype', import requested type '$import_vtype'\n";
+    }
+
     my $zfspath = "$scfg->{pool}/$dataset";
     my $suffix = defined($base_snapshot) ? "\@$base_snapshot" : '';
     my $exists = 0 == run_command(
@@ -914,7 +924,7 @@ sub volume_import {
     } elsif ($exists) {
         die "volume '$zfspath' already exists\n" if !$allow_rename;
         warn "volume '$zfspath' already exists - importing with a different name\n";
-        $dataset = $class->find_free_diskname($storeid, $scfg, $vmid, $volume_format);
+        $dataset = $class->find_free_diskname($storeid, $scfg, $vmid, $volume_format, 0, $vtype);
         $zfspath = "$scfg->{pool}/$dataset";
     }
 
-- 
2.47.2



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] 74+ messages in thread

* [pve-devel] [PATCH storage 22/26] zfs: update 'path' method for new naming scheme
  2025-07-29 11:15 [pve-devel] [RFC storage 00/26+10+3] unify vtype and content-type and Wolfgang Bumiller
                   ` (20 preceding siblings ...)
  2025-07-29 11:15 ` [pve-devel] [PATCH storage 21/26] plugins: update volume_import methods Wolfgang Bumiller
@ 2025-07-29 11:15 ` Wolfgang Bumiller
  2025-07-30  9:31   ` Fabian Grünbichler
  2025-07-29 11:15 ` [pve-devel] [PATCH storage 23/26] pvesm: add vtype parameter to import command Wolfgang Bumiller
                   ` (17 subsequent siblings)
  39 siblings, 1 reply; 74+ messages in thread
From: Wolfgang Bumiller @ 2025-07-29 11:15 UTC (permalink / raw)
  To: pve-devel

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
---
 src/PVE/Storage/ZFSPoolPlugin.pm | 25 ++++++++++++++++---------
 1 file changed, 16 insertions(+), 9 deletions(-)

diff --git a/src/PVE/Storage/ZFSPoolPlugin.pm b/src/PVE/Storage/ZFSPoolPlugin.pm
index 2cae090..83cb9fb 100644
--- a/src/PVE/Storage/ZFSPoolPlugin.pm
+++ b/src/PVE/Storage/ZFSPoolPlugin.pm
@@ -123,7 +123,15 @@ sub zfs_parse_zvol_list {
     return $list;
 }
 
-my sub image_vtype_from_name : prototype($) {
+my sub volname_is_subvol : prototype($) {
+    my ($volname) = @_;
+    return 1 if $volname =~ /^(?:base-)?subvol-ct-/;
+    return 1 if $volname =~ /^subvol-/;
+    return 1 if $volname =~ /^basevol-/;
+    return 0;
+}
+
+my sub volume_type_from_name : prototype($) {
     my ($name) = @_;
 
     return 'ct-vol' if $name =~ /^(base-)?subvol(-ct)?-/;
@@ -194,16 +202,15 @@ sub path {
     my $path = '';
     my $mountpoint = $scfg->{mountpoint} // "/$scfg->{pool}";
 
-    if ($vtype eq "images") {
-        if ($name =~ m/^subvol-/ || $name =~ m/^basevol-/) {
-            $path = "$mountpoint/$name";
-        } else {
-            $path = "/dev/zvol/$scfg->{pool}/$name";
-        }
-        $path .= "\@$snapname" if defined($snapname);
+    die "$vtype is not allowed in ZFSPool!"
+        if $vtype ne 'vm-vol' && $vtype ne 'ct-vol' && $vtype ne 'images';
+
+    if (volname_is_subvol($name)) {
+        $path = "$mountpoint/$name";
     } else {
-        die "$vtype is not allowed in ZFSPool!";
+        $path = "/dev/zvol/$scfg->{pool}/$name";
     }
+    $path .= "\@$snapname" if defined($snapname);
 
     return ($path, $vmid, $vtype);
 }
-- 
2.47.2



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] 74+ messages in thread

* [pve-devel] [PATCH storage 23/26] pvesm: add vtype parameter to import command
  2025-07-29 11:15 [pve-devel] [RFC storage 00/26+10+3] unify vtype and content-type and Wolfgang Bumiller
                   ` (21 preceding siblings ...)
  2025-07-29 11:15 ` [pve-devel] [PATCH storage 22/26] zfs: update 'path' method for new naming scheme Wolfgang Bumiller
@ 2025-07-29 11:15 ` Wolfgang Bumiller
  2025-07-29 11:15 ` [pve-devel] [PATCH storage 24/26] api: add vtype parameter to create call Wolfgang Bumiller
                   ` (16 subsequent siblings)
  39 siblings, 0 replies; 74+ messages in thread
From: Wolfgang Bumiller @ 2025-07-29 11:15 UTC (permalink / raw)
  To: pve-devel

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
---
 src/PVE/CLI/pvesm.pm | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/PVE/CLI/pvesm.pm b/src/PVE/CLI/pvesm.pm
index 860e46f..354582f 100755
--- a/src/PVE/CLI/pvesm.pm
+++ b/src/PVE/CLI/pvesm.pm
@@ -408,6 +408,7 @@ __PACKAGE__->register_method({
                 maxLength => 40,
                 optional => 1,
             },
+            vtype => get_standard_option('pve-storage-vtype', { optional => 1 }),
         },
     },
     returns => { type => 'string' },
@@ -491,6 +492,7 @@ __PACKAGE__->register_method({
             $param->{base},
             $param->{'with-snapshots'},
             $param->{'allow-rename'},
+            $param->{vtype},
         );
         PVE::Storage::volume_snapshot_delete($cfg, $imported_volid, $delete)
             if defined($delete);
-- 
2.47.2



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] 74+ messages in thread

* [pve-devel] [PATCH storage 24/26] api: add vtype parameter to create call
  2025-07-29 11:15 [pve-devel] [RFC storage 00/26+10+3] unify vtype and content-type and Wolfgang Bumiller
                   ` (22 preceding siblings ...)
  2025-07-29 11:15 ` [pve-devel] [PATCH storage 23/26] pvesm: add vtype parameter to import command Wolfgang Bumiller
@ 2025-07-29 11:15 ` Wolfgang Bumiller
  2025-07-29 11:15 ` [pve-devel] [PATCH storage 25/26] update tests Wolfgang Bumiller
                   ` (15 subsequent siblings)
  39 siblings, 0 replies; 74+ messages in thread
From: Wolfgang Bumiller @ 2025-07-29 11:15 UTC (permalink / raw)
  To: pve-devel

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
---
 src/PVE/API2/Storage/Content.pm | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/PVE/API2/Storage/Content.pm b/src/PVE/API2/Storage/Content.pm
index 1fe7303..bd5e4b2 100644
--- a/src/PVE/API2/Storage/Content.pm
+++ b/src/PVE/API2/Storage/Content.pm
@@ -214,6 +214,7 @@ __PACKAGE__->register_method({
                     optional => 1,
                 },
             ),
+            vtype => get_standard_option('pve-storage-vtype', { optional => 1 }),
         },
     },
     returns => {
@@ -252,7 +253,7 @@ __PACKAGE__->register_method({
         my $cfg = PVE::Storage::config();
 
         my $volid = PVE::Storage::vdisk_alloc(
-            $cfg, $storeid, $param->{vmid}, $param->{format}, $name, $size,
+            $cfg, $storeid, $param->{vmid}, $param->{format}, $name, $size, $param->{vtype},
         );
 
         return $volid;
-- 
2.47.2



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] 74+ messages in thread

* [pve-devel] [PATCH storage 25/26] update tests
  2025-07-29 11:15 [pve-devel] [RFC storage 00/26+10+3] unify vtype and content-type and Wolfgang Bumiller
                   ` (23 preceding siblings ...)
  2025-07-29 11:15 ` [pve-devel] [PATCH storage 24/26] api: add vtype parameter to create call Wolfgang Bumiller
@ 2025-07-29 11:15 ` Wolfgang Bumiller
  2025-07-29 16:33   ` Max R. Carrara
  2025-07-29 11:15 ` [pve-devel] [PATCH storage 26/26] update ApiChangeLog Wolfgang Bumiller
                   ` (14 subsequent siblings)
  39 siblings, 1 reply; 74+ messages in thread
From: Wolfgang Bumiller @ 2025-07-29 11:15 UTC (permalink / raw)
  To: pve-devel

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
---
 src/test/list_volumes_test.pm      | 73 ++++++++++++++++++++----------
 src/test/parse_volname_test.pm     | 34 ++++++++++++--
 src/test/path_to_volume_id_test.pm | 27 +++++++----
 src/test/run_test_lvmplugin.pl     | 11 +++--
 src/test/run_test_zfspoolplugin.pl | 45 ++++++++++--------
 5 files changed, 129 insertions(+), 61 deletions(-)

diff --git a/src/test/list_volumes_test.pm b/src/test/list_volumes_test.pm
index e528fc3..fcc7beb 100644
--- a/src/test/list_volumes_test.pm
+++ b/src/test/list_volumes_test.pm
@@ -71,6 +71,8 @@ my $scfg = {
         'rootdir' => 1,
         'vztmpl' => 1,
         'images' => 1,
+        'vm-vol' => 1,
+        'ct-vol' => 1,
         'snippets' => 1,
         'backup' => 1,
     },
@@ -87,9 +89,9 @@ my @tests = (
         description => 'VMID: 16110, VM, qcow2, backup, snippets',
         vmid => '16110',
         files => [
-            "$storage_dir/images/16110/vm-16110-disk-0.qcow2",
-            "$storage_dir/images/16110/vm-16110-disk-1.raw",
-            "$storage_dir/images/16110/vm-16110-disk-2.vmdk",
+            "$storage_dir/vms/16110/vol-vm-16110-disk-0.qcow2",
+            "$storage_dir/vms/16110/vol-vm-16110-disk-1.raw",
+            "$storage_dir/vms/16110/vol-vm-16110-disk-2.vmdk",
             "$storage_dir/dump/vzdump-qemu-16110-2020_03_30-21_11_40.vma.gz",
             "$storage_dir/dump/vzdump-qemu-16110-2020_03_30-21_12_45.vma.lzo",
             "$storage_dir/dump/vzdump-qemu-16110-2020_03_30-21_13_55.vma",
@@ -99,34 +101,37 @@ my @tests = (
         ],
         expected => [
             {
-                'content' => 'images',
+                'content' => 'vm-vol',
+                'vtype' => 'vm-vol',
                 'ctime' => DEFAULT_CTIME,
                 'format' => 'qcow2',
                 'parent' => undef,
                 'size' => DEFAULT_SIZE,
                 'used' => DEFAULT_USED,
                 'vmid' => '16110',
-                'volid' => 'local:16110/vm-16110-disk-0.qcow2',
+                'volid' => 'local:16110/vol-vm-16110-disk-0.qcow2',
             },
             {
-                'content' => 'images',
+                'content' => 'vm-vol',
+                'vtype' => 'vm-vol',
                 'ctime' => DEFAULT_CTIME,
                 'format' => 'raw',
                 'parent' => undef,
                 'size' => DEFAULT_SIZE,
                 'used' => DEFAULT_USED,
                 'vmid' => '16110',
-                'volid' => 'local:16110/vm-16110-disk-1.raw',
+                'volid' => 'local:16110/vol-vm-16110-disk-1.raw',
             },
             {
-                'content' => 'images',
+                'content' => 'vm-vol',
+                'vtype' => 'vm-vol',
                 'ctime' => DEFAULT_CTIME,
                 'format' => 'vmdk',
                 'parent' => undef,
                 'size' => DEFAULT_SIZE,
                 'used' => DEFAULT_USED,
                 'vmid' => '16110',
-                'volid' => 'local:16110/vm-16110-disk-2.vmdk',
+                'volid' => 'local:16110/vol-vm-16110-disk-2.vmdk',
             },
             {
                 'content' => 'backup',
@@ -184,7 +189,8 @@ my @tests = (
         description => 'VMID: 16112, lxc, raw, backup',
         vmid => '16112',
         files => [
-            "$storage_dir/images/16112/vm-16112-disk-0.raw",
+            "$storage_dir/cts/16112/vol-ct-16112-disk-0.raw",
+            "$storage_dir/images/16112/vm-16112-disk-1.raw",
             "$storage_dir/dump/vzdump-lxc-16112-2020_03_30-21_39_30.tar.lzo",
             "$storage_dir/dump/vzdump-lxc-16112-2020_03_30-21_49_30.tar.gz",
             "$storage_dir/dump/vzdump-lxc-16112-2020_03_30-21_49_30.tar.zst",
@@ -192,6 +198,17 @@ my @tests = (
             "$storage_dir/dump/vzdump-openvz-16112-2020_03_30-21_39_30.tar.bz2",
         ],
         expected => [
+            {
+                'content' => 'ct-vol',
+                'vtype' => 'ct-vol',
+                'ctime' => DEFAULT_CTIME,
+                'format' => 'raw',
+                'parent' => undef,
+                'size' => DEFAULT_SIZE,
+                'used' => DEFAULT_USED,
+                'vmid' => '16112',
+                'volid' => 'local:16112/vol-ct-16112-disk-0.raw',
+            },
             {
                 'content' => 'rootdir',
                 'ctime' => DEFAULT_CTIME,
@@ -200,7 +217,7 @@ my @tests = (
                 'size' => DEFAULT_SIZE,
                 'used' => DEFAULT_USED,
                 'vmid' => '16112',
-                'volid' => 'local:16112/vm-16112-disk-0.raw',
+                'volid' => 'local:16112/vm-16112-disk-1.raw',
             },
             {
                 'content' => 'backup',
@@ -254,7 +271,7 @@ my @tests = (
         vmid => '16114',
         files => [
             "$storage_dir/images/16114/vm-16114-disk-0.qcow2",
-            "$storage_dir/images/16114/vm-16114-disk-1.qcow2",
+            "$storage_dir/vms/16114/vol-vm-16114-disk-1.qcow2",
         ],
         parent => [
             "../9004/base-9004-disk-0.qcow2", "../9004/base-9004-disk-1.qcow2",
@@ -271,14 +288,15 @@ my @tests = (
                 'volid' => 'local:9004/base-9004-disk-0.qcow2/16114/vm-16114-disk-0.qcow2',
             },
             {
-                'content' => 'images',
+                'content' => 'vm-vol',
+                'vtype' => 'vm-vol',
                 'ctime' => DEFAULT_CTIME,
                 'format' => 'qcow2',
                 'parent' => '../9004/base-9004-disk-1.qcow2',
                 'size' => DEFAULT_SIZE,
                 'used' => DEFAULT_USED,
                 'vmid' => '16114',
-                'volid' => 'local:9004/base-9004-disk-1.qcow2/16114/vm-16114-disk-1.qcow2',
+                'volid' => 'local:9004/base-9004-disk-1.qcow2/16114/vol-vm-16114-disk-1.qcow2',
             },
         ],
     },
@@ -287,7 +305,7 @@ my @tests = (
         vmid => '9004',
         files => [
             "$storage_dir/images/9004/base-9004-disk-0.qcow2",
-            "$storage_dir/images/9004/base-9004-disk-1.qcow2",
+            "$storage_dir/vms/9004/base-vol-vm-9004-disk-1.qcow2",
         ],
         expected => [
             {
@@ -301,14 +319,15 @@ my @tests = (
                 'volid' => 'local:9004/base-9004-disk-0.qcow2',
             },
             {
-                'content' => 'images',
+                'content' => 'vm-vol',
+                'vtype' => 'vm-vol',
                 'ctime' => DEFAULT_CTIME,
                 'format' => 'qcow2',
                 'parent' => undef,
                 'size' => DEFAULT_SIZE,
                 'used' => DEFAULT_USED,
                 'vmid' => '9004',
-                'volid' => 'local:9004/base-9004-disk-1.qcow2',
+                'volid' => 'local:9004/base-vol-vm-9004-disk-1.qcow2',
             },
         ],
     },
@@ -428,21 +447,22 @@ my @tests = (
         #"$storage_dir/images/ssss/base-4321-disk-0.qcow2/1234/vm-1234-disk-0.qcow2",
         vmid => undef,
         files => [
-            "$storage_dir/images/1234/vm-1234-disk-0.qcow2",
+            "$storage_dir/vms/1234/vol-vm-1234-disk-0.qcow2",
         ],
         parent => [
-            "../ssss/base-4321-disk-0.qcow2",
+            "../ssss/base-vol-vm-4321-disk-0.qcow2",
         ],
         expected => [
             {
-                'content' => 'images',
+                'content' => 'vm-vol',
+                'vtype' => 'vm-vol',
                 'ctime' => DEFAULT_CTIME,
                 'format' => 'qcow2',
-                'parent' => '../ssss/base-4321-disk-0.qcow2',
+                'parent' => '../ssss/base-vol-vm-4321-disk-0.qcow2',
                 'size' => DEFAULT_SIZE,
                 'used' => DEFAULT_USED,
                 'vmid' => '1234',
-                'volid' => 'local:1234/vm-1234-disk-0.qcow2',
+                'volid' => 'local:1234/vol-vm-1234-disk-0.qcow2',
             },
         ],
     },
@@ -521,7 +541,7 @@ plan tests => $plan + 1;
 
 {
     my $sid = 'local';
-    my $types = ['rootdir', 'images', 'vztmpl', 'iso', 'backup', 'snippets'];
+    my $types = ['images', 'rootdir', 'vm-vol', 'ct-vol', 'vztmpl', 'iso', 'backup', 'snippets'];
     my @suffixes = ('qcow2', 'raw', 'vmdk', 'vhdx');
 
     # run through test cases
@@ -555,6 +575,13 @@ plan tests => $plan + 1;
         eval { $got = PVE::Storage::Plugin->list_volumes($sid, $scfg, $vmid, $types) };
         $got = $@ if $@;
 
+        sub sort_by_volid {
+            my ($data) = @_;
+            return [sort { $a->{volid} cmp $b->{volid} } @$data];
+        }
+
+        $got = sort_by_volid($got) if ref($got) && ref($got) eq 'ARRAY';
+        $expected = sort_by_volid($expected);
         is_deeply($got, $expected, $description) || diag(explain($got));
 
         # clean up after each test case, otherwise
diff --git a/src/test/parse_volname_test.pm b/src/test/parse_volname_test.pm
index 0d077a9..297e280 100644
--- a/src/test/parse_volname_test.pm
+++ b/src/test/parse_volname_test.pm
@@ -20,6 +20,19 @@ my $tests = [
     #
     {
         description => 'VM disk image, linked, qcow2, vm- as base-',
+        volname => "$vmid/vol-vm-$vmid-disk-0.qcow2/$vmid/vol-vm-$vmid-disk-0.qcow2",
+        expected => [
+            'vm-vol',
+            "vol-vm-$vmid-disk-0.qcow2",
+            "$vmid",
+            "vol-vm-$vmid-disk-0.qcow2",
+            "$vmid",
+            !!0,
+            'qcow2',
+        ],
+    },
+    {
+        description => 'VM disk image, legacy, linked, qcow2, vm- as base-',
         volname => "$vmid/vm-$vmid-disk-0.qcow2/$vmid/vm-$vmid-disk-0.qcow2",
         expected => [
             'images',
@@ -27,11 +40,21 @@ my $tests = [
             "$vmid",
             "vm-$vmid-disk-0.qcow2",
             "$vmid",
-            undef,
+            !!0,
             'qcow2',
         ],
     },
     #
+    # Container volumes
+    #
+    {
+        description => 'CT rootdir image',
+        volname => "$vmid/vol-ct-$vmid-disk-0.raw",
+        expected => [
+            'ct-vol', "vol-ct-$vmid-disk-0.raw", "$vmid", undef, undef, !!0, 'raw',
+        ],
+    },
+    #
     # iso
     #
     {
@@ -94,7 +117,7 @@ my $tests = [
         description => 'Container rootdir, subvol',
         volname => "$vmid/subvol-$vmid-disk-0.subvol",
         expected =>
-            ['images', "subvol-$vmid-disk-0.subvol", "$vmid", undef, undef, undef, 'subvol'],
+            ['images', "subvol-$vmid-disk-0.subvol", "$vmid", undef, undef, !!0, 'subvol'],
     },
     {
         description => 'Backup archive, no virtualization type',
@@ -209,7 +232,7 @@ foreach my $s (@$disk_suffix) {
             description => "VM disk image, $s",
             volname => "$vmid/vm-$vmid-disk-1.$s",
             expected => [
-                'images', "vm-$vmid-disk-1.$s", "$vmid", undef, undef, undef, "$s",
+                'images', "vm-$vmid-disk-1.$s", "$vmid", undef, undef, !!0, "$s",
             ],
         },
         {
@@ -221,7 +244,7 @@ foreach my $s (@$disk_suffix) {
                 "$vmid",
                 "base-$vmid-disk-0.$s",
                 "$vmid",
-                undef,
+                !!0,
                 "$s",
             ],
         },
@@ -229,7 +252,7 @@ foreach my $s (@$disk_suffix) {
             description => "VM disk image, base, $s",
             volname => "$vmid/base-$vmid-disk-0.$s",
             expected => [
-                'images', "base-$vmid-disk-0.$s", "$vmid", undef, undef, 'base-', "$s",
+                'images', "base-$vmid-disk-0.$s", "$vmid", undef, undef, !!1, "$s",
             ],
         },
     );
@@ -295,6 +318,7 @@ plan tests => scalar @$tests + 1;
 
 my $seen_vtype;
 my $vtype_subdirs = { map { $_ => 1 } keys %{ PVE::Storage::Plugin::get_vtype_subdirs() } };
+delete $vtype_subdirs->{rootdir}; # this one cannot be observed, it maps to the 'ct-vol' type.
 
 foreach my $t (@$tests) {
     my $description = $t->{description};
diff --git a/src/test/path_to_volume_id_test.pm b/src/test/path_to_volume_id_test.pm
index ab7e276..bb2d47f 100644
--- a/src/test/path_to_volume_id_test.pm
+++ b/src/test/path_to_volume_id_test.pm
@@ -25,8 +25,9 @@ my $scfg = {
             'maxfiles' => 0,
             'content' => {
                 'snippets' => 1,
-                'rootdir' => 1,
                 'images' => 1,
+                'vm-vol' => 1,
+                'ct-vol' => 1,
                 'iso' => 1,
                 'backup' => 1,
                 'vztmpl' => 1,
@@ -44,24 +45,31 @@ my $scfg = {
 # expected    => the result that path_to_volume_id should return
 my @tests = (
     {
-        description => 'Image, qcow2',
+        description => 'Image, qcow2, legacy naming',
         volname => "$storage_dir/images/16110/vm-16110-disk-0.qcow2",
         expected => [
             'images', 'local:16110/vm-16110-disk-0.qcow2',
         ],
     },
+    {
+        description => 'Image, qcow2',
+        volname => "$storage_dir/vms/16110/vol-vm-16110-disk-0.qcow2",
+        expected => [
+            'vm-vol', 'local:16110/vol-vm-16110-disk-0.qcow2',
+        ],
+    },
     {
         description => 'Image, raw',
-        volname => "$storage_dir/images/16112/vm-16112-disk-0.raw",
+        volname => "$storage_dir/vms/16112/vol-vm-16112-disk-0.raw",
         expected => [
-            'images', 'local:16112/vm-16112-disk-0.raw',
+            'vm-vol', 'local:16112/vol-vm-16112-disk-0.raw',
         ],
     },
     {
         description => 'Image template, qcow2',
-        volname => "$storage_dir/images/9004/base-9004-disk-0.qcow2",
+        volname => "$storage_dir/vms/9004/base-vol-vm-9004-disk-0.qcow2",
         expected => [
-            'images', 'local:9004/base-9004-disk-0.qcow2',
+            'vm-vol', 'local:9004/base-vol-vm-9004-disk-0.qcow2',
         ],
     },
 
@@ -141,14 +149,14 @@ my @tests = (
         description => 'Rootdir, folder subvol, legacy naming',
         volname => "$storage_dir/images/1234/subvol-1234-disk-0.subvol/", # fileparse needs / at the end
         expected => [
-            'ct-vol', 'local:1234/subvol-1234-disk-0.subvol',
+            'images', 'local:1234/subvol-1234-disk-0.subvol',
         ],
     },
     {
         description => 'Rootdir, folder subvol',
-        volname => "$storage_dir/images/1234/subvol-1234-disk-0.subvol/", # fileparse needs / at the end
+        volname => "$storage_dir/cts/1234/vol-ct-1234-disk-0.subvol/", # fileparse needs / at the end
         expected => [
-            'images', 'local:1234/subvol-1234-disk-0.subvol',
+            'ct-vol', 'local:1234/vol-ct-1234-disk-0.subvol',
         ],
     },
     {
@@ -239,6 +247,7 @@ plan tests => scalar @tests + 1;
 
 my $seen_vtype;
 my $vtype_subdirs = { map { $_ => 1 } keys %{ PVE::Storage::Plugin::get_vtype_subdirs() } };
+delete $vtype_subdirs->{rootdir}; # this one cannot be observed, it maps to the 'ct-vol' type.
 
 foreach my $tt (@tests) {
     my $file = $tt->{volname};
diff --git a/src/test/run_test_lvmplugin.pl b/src/test/run_test_lvmplugin.pl
index e87a3de..92e8d6e 100755
--- a/src/test/run_test_lvmplugin.pl
+++ b/src/test/run_test_lvmplugin.pl
@@ -159,7 +159,7 @@ my $test7 = sub {
 
     eval {
         my $tmp_volid =
-            PVE::Storage::vdisk_alloc($cfg, $storagename, "112", "raw", undef, 1024 * 1024);
+            PVE::Storage::vdisk_alloc($cfg, $storagename, "112", "raw", undef, 1024 * 1024, undef);
 
         if ($tmp_volid ne "$storagename:vm-112-disk-0") {
             die "volname:$tmp_volid don't match\n";
@@ -186,15 +186,16 @@ my $test7 = sub {
     }
 
     eval {
-        my $tmp_volid =
-            PVE::Storage::vdisk_alloc($cfg, $storagename, "112", "raw", undef, 2048 * 1024);
+        my $tmp_volid = PVE::Storage::vdisk_alloc(
+            $cfg, $storagename, "112", "raw", undef, 2048 * 1024, 'vm-vol',
+        );
 
-        if ($tmp_volid ne "$storagename:vm-112-disk-1") {
+        if ($tmp_volid ne "$storagename:vol-vm-112-disk-1") {
             die "volname:$tmp_volid don't match\n";
         }
         eval {
             run_command(
-                "lvs --noheadings -o lv_size $vgname/vm-112-disk-1",
+                "lvs --noheadings -o lv_size $vgname/vol-vm-112-disk-1",
                 outfunc => sub {
                     my $tmp = shift;
                     if ($tmp !~ m/2\.00g/) {
diff --git a/src/test/run_test_zfspoolplugin.pl b/src/test/run_test_zfspoolplugin.pl
index 9bd70a8..99ab6e2 100755
--- a/src/test/run_test_zfspoolplugin.pl
+++ b/src/test/run_test_zfspoolplugin.pl
@@ -580,7 +580,7 @@ my $test13 = sub {
 
     eval {
         my $tmp_volid =
-            PVE::Storage::vdisk_alloc($cfg, $storagename, "112", "raw", undef, 1024 * 1024);
+            PVE::Storage::vdisk_alloc($cfg, $storagename, "112", "raw", undef, 1024 * 1024, undef);
 
         if ($tmp_volid ne "$storagename:vm-112-disk-0") {
             die "volname:$tmp_volid don't match\n";
@@ -607,18 +607,19 @@ my $test13 = sub {
     }
 
     eval {
-        my $tmp_volid =
-            PVE::Storage::vdisk_alloc($cfg, $storagename, "112", "raw", undef, 2048 * 1024);
+        my $tmp_volid = PVE::Storage::vdisk_alloc(
+            $cfg, $storagename, "112", "raw", undef, 2048 * 1024, 'vm-vol',
+        );
 
-        if ($tmp_volid ne "$storagename:vm-112-disk-1") {
+        if ($tmp_volid ne "$storagename:vol-vm-112-disk-1") {
             die "volname:$tmp_volid don't match\n";
         }
         eval {
             run_command(
-                "zfs get -H volsize $zpath\/vm-112-disk-1",
+                "zfs get -H volsize $zpath\/vol-vm-112-disk-1",
                 outfunc => sub {
                     my $tmp = shift;
-                    if ($tmp !~ m/^$zpath\/vm-112-disk-1.*volsize.*2G.*$/) {
+                    if ($tmp !~ m/^$zpath\/vol-vm-112-disk-1.*volsize.*2G.*$/) {
                         die "size don't match\n";
                     }
                 },
@@ -635,8 +636,9 @@ my $test13 = sub {
     }
 
     eval {
-        my $tmp_volid =
-            PVE::Storage::vdisk_alloc($cfg, $storagename, "113", "subvol", undef, 1024 * 1024);
+        my $tmp_volid = PVE::Storage::vdisk_alloc(
+            $cfg, $storagename, "113", "subvol", undef, 1024 * 1024, undef,
+        );
 
         if ($tmp_volid ne "$storagename:subvol-113-disk-0") {
             die "volname:$tmp_volid  don't match\n";
@@ -663,18 +665,19 @@ my $test13 = sub {
     }
 
     eval {
-        my $tmp_volid =
-            PVE::Storage::vdisk_alloc($cfg, $storagename, "113", "subvol", undef, 2048 * 1024);
+        my $tmp_volid = PVE::Storage::vdisk_alloc(
+            $cfg, $storagename, "113", "subvol", undef, 2048 * 1024, 'ct-vol',
+        );
 
-        if ($tmp_volid ne "$storagename:subvol-113-disk-1") {
+        if ($tmp_volid ne "$storagename:subvol-ct-113-disk-1") {
             die "volname:$tmp_volid  don't match\n";
         }
         eval {
             run_command(
-                "zfs get -H refquota $zpath\/subvol-113-disk-1",
+                "zfs get -H refquota $zpath\/subvol-ct-113-disk-1",
                 outfunc => sub {
                     my $tmp = shift;
-                    if ($tmp !~ m/^$zpath\/subvol-113-disk-1.*refquota.*G.*$/) {
+                    if ($tmp !~ m/^$zpath\/subvol-ct-113-disk-1.*refquota.*G.*$/) {
                         die "size don't match\n";
                     }
                 },
@@ -778,7 +781,7 @@ my $test11 = sub {
 
     print "\nrun test11 \"volume_is_base\"\n";
 
-    eval { PVE::Storage::vdisk_clone($cfg, "$storagename:$vmdisk", 110); };
+    eval { PVE::Storage::vdisk_clone($cfg, "$storagename:$vmdisk", 110, undef, undef); };
     if (!$@) {
         $count++;
         warn "Test11 a: clone_image only works on base images";
@@ -786,7 +789,7 @@ my $test11 = sub {
 
     eval {
         if ("$storagename:$vmbase\/vm-110-disk-0" ne
-            PVE::Storage::vdisk_clone($cfg, "$storagename:$vmbase", 110, '__base__')
+            PVE::Storage::vdisk_clone($cfg, "$storagename:$vmbase", 110, '__base__', undef)
         ) {
             $count++;
             warn "Test11 b";
@@ -806,13 +809,15 @@ my $test11 = sub {
         warn "Test11 b: $@";
     }
 
-    eval { PVE::Storage::vdisk_clone($cfg, "$storagename:$vmbase\/$vmlinked", 111); };
+    eval {
+        PVE::Storage::vdisk_clone($cfg, "$storagename:$vmbase\/$vmlinked", 111, undef, undef);
+    };
     if (!$@) {
         $count++;
         warn "Test11 c: clone_image only works on base images";
     }
 
-    eval { PVE::Storage::vdisk_clone($cfg, "$storagename:$ctdisk", 110); };
+    eval { PVE::Storage::vdisk_clone($cfg, "$storagename:$ctdisk", 110, undef, undef); };
     if (!$@) {
         $count++;
         warn "Test11 d: clone_image only works on base images";
@@ -820,7 +825,7 @@ my $test11 = sub {
 
     eval {
         if ("$storagename:$ctbase\/subvol-210-disk-0" ne
-            PVE::Storage::vdisk_clone($cfg, "$storagename:$ctbase", 210, '__base__')
+            PVE::Storage::vdisk_clone($cfg, "$storagename:$ctbase", 210, '__base__', undef)
         ) {
             $count++;
             warn "Test11 e";
@@ -840,7 +845,9 @@ my $test11 = sub {
         warn "Test11 e: $@";
     }
 
-    eval { PVE::Storage::vdisk_clone($cfg, "$storagename:$ctbase\/$ctlinked", 211); };
+    eval {
+        PVE::Storage::vdisk_clone($cfg, "$storagename:$ctbase\/$ctlinked", 211, undef, undef);
+    };
     if (!$@) {
         $count++;
         warn "Test11 f: clone_image only works on base images";
-- 
2.47.2



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] 74+ messages in thread

* [pve-devel] [PATCH storage 26/26] update ApiChangeLog
  2025-07-29 11:15 [pve-devel] [RFC storage 00/26+10+3] unify vtype and content-type and Wolfgang Bumiller
                   ` (24 preceding siblings ...)
  2025-07-29 11:15 ` [pve-devel] [PATCH storage 25/26] update tests Wolfgang Bumiller
@ 2025-07-29 11:15 ` Wolfgang Bumiller
  2025-07-29 11:15 ` [pve-devel] [PATCH container 1/3] add vtype to vdisk_alloc and vdisk_clone calls Wolfgang Bumiller
                   ` (13 subsequent siblings)
  39 siblings, 0 replies; 74+ messages in thread
From: Wolfgang Bumiller @ 2025-07-29 11:15 UTC (permalink / raw)
  To: pve-devel

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
---
 ApiChangeLog | 53 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 53 insertions(+)

diff --git a/ApiChangeLog b/ApiChangeLog
index d80bfb3..ff85ee0 100644
--- a/ApiChangeLog
+++ b/ApiChangeLog
@@ -57,6 +57,59 @@ Future changes should be documented in here.
   which can override the default format. Must be implemented when the supported formats or default
   format depend on the storage configuration.
 
+* There are now 2 new content types: "vm-vol" and "ct-vol", deprecating "images" and "rootdir"
+  types.
+
+  These represent VM volumes and container volumes respectively.
+
+  Usually, the legacy type "images" should *include* the new "vm-vol" type, and the legacy type
+  "rootdir" should *include* the new "ct-vol" type, but *not* the other way round. See the
+  description of `list_images` below.
+
+* The `get_subdir()` method may now be passed "vm-vol" or "ct-vol".
+
+  Ideally these should map to directories separate from "images" and "rootdir", but as long as the
+  behavior of the other API methods works as intended, this is not strictly necessary.
+
+* Add `type` parameter to `list_images`.
+
+  If this is not set, *all* images should be returned.
+
+  - If `undef`, all volumes should be listed, legacy as well as vm-vol/ct-vol typed.
+  - For "images", this should return *all* untyped volumes *and* the ones of type "vm-vol".
+  - For "rootdir", this should return *all* untyped volumes *and* the ones of type "ct-vol".
+  - For "vm-vol", only volumes expicitly allocated with type "vm-vol" should be listed.
+  - For "ct-vol", only volumes expicitly allocated with type "ct-vol" should be listed.
+
+* Add `type` parameter to `alloc_image`.
+
+  This parameter can be "vm-vol" or "ct-vol", and the storage plugin *should* store this alongside
+  the volumes (this can for instance be done via a naming convention). The type passed here is the
+  which should be returned in `list_images` and `parse_volname`.
+
+  Legacy plugins inevitably ignore this and create volumes of legacy types.
+
+  Note that "images" and "rootdir" will never be passed explicitly as these are considered
+  deprecated.
+
+* Add a `vtype` entry to `list_images` return type.
+
+  For volumes which are known to be of type "vm-vol" or "ct-vol" the plugin *must* include a `vtype`
+  entry containing one of these values in the returned items.
+  For volumes without a type (eg. volumes created by previous versions of the plugin), the field
+  should not be set.
+
+* Add `type` parameter to `clone_image`.
+
+  If the `type` is set, transitioning from a new vtype ("vm-vol" or "ct-vol") to the old "images" or
+  "rootdir" types must be rejected, while transitioning *to* the new vtypes should be allowed.
+
+  The helper `PVE::Storage::Common::is_vtype_change_allowed(from, to)` can be used for this check.
+
+* Add `import_type` parameter to `volume_import`.
+
+  The behavior should be similar to `rename_volume`.
+
 ##  Version 11:
 
 * Allow declaring storage features via plugin data
-- 
2.47.2



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] 74+ messages in thread

* [pve-devel] [PATCH container 1/3] add vtype to vdisk_alloc and vdisk_clone calls
  2025-07-29 11:15 [pve-devel] [RFC storage 00/26+10+3] unify vtype and content-type and Wolfgang Bumiller
                   ` (25 preceding siblings ...)
  2025-07-29 11:15 ` [pve-devel] [PATCH storage 26/26] update ApiChangeLog Wolfgang Bumiller
@ 2025-07-29 11:15 ` Wolfgang Bumiller
  2025-07-29 11:15 ` [pve-devel] [PATCH container 2/3] expect 'vm-vol' vtype in get_replicatable_volumes Wolfgang Bumiller
                   ` (12 subsequent siblings)
  39 siblings, 0 replies; 74+ messages in thread
From: Wolfgang Bumiller @ 2025-07-29 11:15 UTC (permalink / raw)
  To: pve-devel

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
---
 src/PVE/API2/LXC.pm |  9 +++++++--
 src/PVE/LXC.pm      | 20 ++++++++++++--------
 2 files changed, 19 insertions(+), 10 deletions(-)

diff --git a/src/PVE/API2/LXC.pm b/src/PVE/API2/LXC.pm
index a56c441..aa11fc6 100644
--- a/src/PVE/API2/LXC.pm
+++ b/src/PVE/API2/LXC.pm
@@ -1990,8 +1990,13 @@ __PACKAGE__->register_method({
                         );
                     } else {
                         print "create linked clone of mount point $opt ($volid)\n";
-                        $newvolid =
-                            PVE::Storage::vdisk_clone($storecfg, $volid, $newid, $snapname);
+                        $newvolid = PVE::Storage::vdisk_clone(
+                            $storecfg,
+                            $volid,
+                            $newid,
+                            $snapname,
+                            'ct-vol',
+                        );
                     }
 
                     push @$newvollist, $newvolid;
diff --git a/src/PVE/LXC.pm b/src/PVE/LXC.pm
index 741bb33..d72ac79 100644
--- a/src/PVE/LXC.pm
+++ b/src/PVE/LXC.pm
@@ -2285,21 +2285,25 @@ sub alloc_disk {
         my $do_format = 0;
         if ($scfg->{content}->{rootdir} && $scfg->{path}) {
             if ($size_kb > 0 && !($scfg->{type} eq 'btrfs' && $scfg->{quotas})) {
-                $volid =
-                    PVE::Storage::vdisk_alloc($storecfg, $storage, $vmid, 'raw', undef, $size_kb);
+                $volid = PVE::Storage::vdisk_alloc(
+                    $storecfg, $storage, $vmid, 'raw', undef, $size_kb, 'ct-vol',
+                );
                 $do_format = 1;
             } else {
-                $volid = PVE::Storage::vdisk_alloc($storecfg, $storage, $vmid, 'subvol', undef,
-                    $size_kb);
+                $volid = PVE::Storage::vdisk_alloc(
+                    $storecfg, $storage, $vmid, 'subvol', undef, $size_kb, 'ct-vol',
+                );
                 $needs_chown = 1;
             }
         } elsif ($scfg->{type} eq 'zfspool') {
-            $volid =
-                PVE::Storage::vdisk_alloc($storecfg, $storage, $vmid, 'subvol', undef, $size_kb);
+            $volid = PVE::Storage::vdisk_alloc(
+                $storecfg, $storage, $vmid, 'subvol', undef, $size_kb, 'ct-vol',
+            );
             $needs_chown = 1;
         } elsif ($scfg->{content}->{rootdir}) {
-            $volid =
-                PVE::Storage::vdisk_alloc($storecfg, $storage, $vmid, 'raw', undef, $size_kb);
+            $volid = PVE::Storage::vdisk_alloc(
+                $storecfg, $storage, $vmid, 'raw', undef, $size_kb, 'ct-vol',
+            );
             $do_format = 1;
         } else {
             die "content type 'rootdir' is not available or configured on storage '$storage'\n";
-- 
2.47.2



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] 74+ messages in thread

* [pve-devel] [PATCH container 2/3] expect 'vm-vol' vtype in get_replicatable_volumes
  2025-07-29 11:15 [pve-devel] [RFC storage 00/26+10+3] unify vtype and content-type and Wolfgang Bumiller
                   ` (26 preceding siblings ...)
  2025-07-29 11:15 ` [pve-devel] [PATCH container 1/3] add vtype to vdisk_alloc and vdisk_clone calls Wolfgang Bumiller
@ 2025-07-29 11:15 ` Wolfgang Bumiller
  2025-07-29 11:15 ` [pve-devel] [PATCH container 3/3] add vtype to rename_volume call Wolfgang Bumiller
                   ` (11 subsequent siblings)
  39 siblings, 0 replies; 74+ messages in thread
From: Wolfgang Bumiller @ 2025-07-29 11:15 UTC (permalink / raw)
  To: pve-devel

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
---
 src/PVE/LXC/Config.pm | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/PVE/LXC/Config.pm b/src/PVE/LXC/Config.pm
index 7bdb8b9..a9a8816 100644
--- a/src/PVE/LXC/Config.pm
+++ b/src/PVE/LXC/Config.pm
@@ -1919,7 +1919,8 @@ sub get_replicatable_volumes {
         my ($path, $owner, $vtype) = PVE::Storage::path($storecfg, $volid);
         return if !$owner || ($owner != $vmid);
 
-        die "unable to replicate volume '$volid', type '$vtype'\n" if $vtype ne 'images';
+        die "unable to replicate volume '$volid', type '$vtype'\n"
+            if $vtype ne 'ct-vol' && $vtype ne 'images';
 
         return if !$cleanup && !$replicate;
 
-- 
2.47.2



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] 74+ messages in thread

* [pve-devel] [PATCH container 3/3] add vtype to rename_volume call
  2025-07-29 11:15 [pve-devel] [RFC storage 00/26+10+3] unify vtype and content-type and Wolfgang Bumiller
                   ` (27 preceding siblings ...)
  2025-07-29 11:15 ` [pve-devel] [PATCH container 2/3] expect 'vm-vol' vtype in get_replicatable_volumes Wolfgang Bumiller
@ 2025-07-29 11:15 ` Wolfgang Bumiller
  2025-07-29 11:15 ` [pve-devel] [PATCH qemu-server 01/10] add vtype to vdisk_alloc and vdisk_clone calls Wolfgang Bumiller
                   ` (10 subsequent siblings)
  39 siblings, 0 replies; 74+ messages in thread
From: Wolfgang Bumiller @ 2025-07-29 11:15 UTC (permalink / raw)
  To: pve-devel

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
---
 src/PVE/API2/LXC.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/PVE/API2/LXC.pm b/src/PVE/API2/LXC.pm
index aa11fc6..50c7670 100644
--- a/src/PVE/API2/LXC.pm
+++ b/src/PVE/API2/LXC.pm
@@ -2601,7 +2601,7 @@ __PACKAGE__->register_method({
                                 (PVE::Storage::parse_volname($storecfg, $source_volid))[6];
 
                             my $new_volid = PVE::Storage::rename_volume(
-                                $storecfg, $source_volid, $target_vmid,
+                                $storecfg, $source_volid, $target_vmid, undef, 'ct-vol',
                             );
 
                             $drive->{volume} = $new_volid;
-- 
2.47.2



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] 74+ messages in thread

* [pve-devel] [PATCH qemu-server 01/10] add vtype to vdisk_alloc and vdisk_clone calls
  2025-07-29 11:15 [pve-devel] [RFC storage 00/26+10+3] unify vtype and content-type and Wolfgang Bumiller
                   ` (28 preceding siblings ...)
  2025-07-29 11:15 ` [pve-devel] [PATCH container 3/3] add vtype to rename_volume call Wolfgang Bumiller
@ 2025-07-29 11:15 ` Wolfgang Bumiller
  2025-07-29 11:15 ` [pve-devel] [PATCH qemu-server 02/10] add vtype parameter to rename_volume call Wolfgang Bumiller
                   ` (9 subsequent siblings)
  39 siblings, 0 replies; 74+ messages in thread
From: Wolfgang Bumiller @ 2025-07-29 11:15 UTC (permalink / raw)
  To: pve-devel

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
---
 src/PVE/API2/Qemu.pm             | 15 +++++++++------
 src/PVE/QemuConfig.pm            |  2 +-
 src/PVE/QemuServer.pm            | 18 ++++++++----------
 src/PVE/QemuServer/Cloudinit.pm  |  2 +-
 src/PVE/QemuServer/ImportDisk.pm |  7 +------
 src/PVE/QemuServer/OVMF.pm       |  3 ++-
 src/PVE/VZDump/QemuServer.pm     |  8 +++++++-
 src/bin/qmextract                |  3 ++-
 8 files changed, 31 insertions(+), 27 deletions(-)

diff --git a/src/PVE/API2/Qemu.pm b/src/PVE/API2/Qemu.pm
index 09d4411b..a3f967f3 100644
--- a/src/PVE/API2/Qemu.pm
+++ b/src/PVE/API2/Qemu.pm
@@ -474,8 +474,9 @@ my sub create_disks : prototype($$$$$$$$$$$) {
 
             # Initial disk created with 4 MB and aligned to 4MB on regeneration
             my $ci_size = PVE::QemuServer::Cloudinit::CLOUDINIT_DISK_SIZE;
-            my $volid =
-                PVE::Storage::vdisk_alloc($storecfg, $storeid, $vmid, $fmt, $name, $ci_size / 1024);
+            my $volid = PVE::Storage::vdisk_alloc(
+                $storecfg, $storeid, $vmid, $fmt, $name, $ci_size / 1024, 'vm-vol',
+            );
             $disk->{file} = $volid;
             $disk->{media} = 'cdrom';
             push @$vollist, $volid;
@@ -631,11 +632,13 @@ my sub create_disks : prototype($$$$$$$$$$$) {
                         PVE::QemuServer::Drive::TPMSTATE_DISK_SIZE,
                         'b' => 'kb',
                     );
-                    $volid =
-                        PVE::Storage::vdisk_alloc($storecfg, $storeid, $vmid, "raw", undef, $size);
+                    $volid = PVE::Storage::vdisk_alloc(
+                        $storecfg, $storeid, $vmid, "raw", undef, $size, 'vm-vol',
+                    );
                 } else {
-                    $volid =
-                        PVE::Storage::vdisk_alloc($storecfg, $storeid, $vmid, $fmt, undef, $size);
+                    $volid = PVE::Storage::vdisk_alloc(
+                        $storecfg, $storeid, $vmid, $fmt, undef, $size, 'vm-vol',
+                    );
                 }
 
                 # change created disk to a base volume in case the VM is a template
diff --git a/src/PVE/QemuConfig.pm b/src/PVE/QemuConfig.pm
index e0853d65..79a46e45 100644
--- a/src/PVE/QemuConfig.pm
+++ b/src/PVE/QemuConfig.pm
@@ -239,7 +239,7 @@ sub __snapshot_save_vmstate {
     $name .= ".raw" if $scfg->{path}; # add filename extension for file base storage
 
     my $statefile =
-        PVE::Storage::vdisk_alloc($storecfg, $target, $vmid, 'raw', $name, $size * 1024);
+        PVE::Storage::vdisk_alloc($storecfg, $target, $vmid, 'raw', $name, $size * 1024, 'vm-vol');
     my $runningmachine = PVE::QemuServer::Machine::get_current_qemu_machine($vmid);
 
     # get current QEMU -cpu argument to ensure consistency of custom CPU models
diff --git a/src/PVE/QemuServer.pm b/src/PVE/QemuServer.pm
index 5a4f8120..d004dd55 100644
--- a/src/PVE/QemuServer.pm
+++ b/src/PVE/QemuServer.pm
@@ -5359,7 +5359,8 @@ sub vm_migrate_alloc_nbd_disks {
         $format = PVE::Storage::resolve_format_hint($storecfg, $storeid, $format);
 
         my $size = $drive->{size} / 1024;
-        my $newvolid = PVE::Storage::vdisk_alloc($storecfg, $storeid, $vmid, $format, undef, $size);
+        my $newvolid =
+            PVE::Storage::vdisk_alloc($storecfg, $storeid, $vmid, $format, undef, $size, 'vm-vol');
         my $newdrive = $drive;
         $newdrive->{format} = $format;
         $newdrive->{file} = $newvolid;
@@ -6482,8 +6483,9 @@ my $restore_allocate_devices = sub {
             }
         }
 
-        my $volid =
-            PVE::Storage::vdisk_alloc($storecfg, $storeid, $vmid, $d->{format}, $name, $alloc_size);
+        my $volid = PVE::Storage::vdisk_alloc(
+            $storecfg, $storeid, $vmid, $d->{format}, $name, $alloc_size, 'vm-vol',
+        );
 
         print STDERR "new volume ID is '$volid'\n";
         $d->{volid} = $volid;
@@ -7763,7 +7765,8 @@ sub clone_disk {
     print "($drive->{file})\n";
 
     if (!$full) {
-        $newvolid = PVE::Storage::vdisk_clone($storecfg, $drive->{file}, $newvmid, $snapname);
+        $newvolid =
+            PVE::Storage::vdisk_clone($storecfg, $drive->{file}, $newvmid, $snapname, 'vm-vol');
         push @$newvollist, $newvolid;
     } else {
         my ($src_storeid) = PVE::Storage::parse_volume_id($drive->{file});
@@ -7794,12 +7797,7 @@ sub clone_disk {
             $size = PVE::Storage::volume_size_info($storecfg, $drive->{file}, 10);
         }
         $newvolid = PVE::Storage::vdisk_alloc(
-            $storecfg,
-            $storeid,
-            $newvmid,
-            $dst_format,
-            $name,
-            ($size / 1024),
+            $storecfg, $storeid, $newvmid, $dst_format, $name, ($size / 1024), 'vm-vol',
         );
         push @$newvollist, $newvolid;
 
diff --git a/src/PVE/QemuServer/Cloudinit.pm b/src/PVE/QemuServer/Cloudinit.pm
index 349cf90b..9e5fc63e 100644
--- a/src/PVE/QemuServer/Cloudinit.pm
+++ b/src/PVE/QemuServer/Cloudinit.pm
@@ -44,7 +44,7 @@ sub commit_cloudinit_disk {
         $volname =~ m/(vm-$vmid-cloudinit(.\Q$format\E)?)/;
         my $name = $1;
         $size = 4 * 1024;
-        PVE::Storage::vdisk_alloc($storecfg, $storeid, $vmid, $format, $name, $size);
+        PVE::Storage::vdisk_alloc($storecfg, $storeid, $vmid, $format, $name, $size, 'vm-vol');
         $size *= 1024; # vdisk alloc takes KB, qemu-img dd's osize takes byte
     }
     my $plugin = PVE::Storage::Plugin->lookup($scfg->{type});
diff --git a/src/PVE/QemuServer/ImportDisk.pm b/src/PVE/QemuServer/ImportDisk.pm
index 75a54aa2..d14537ae 100755
--- a/src/PVE/QemuServer/ImportDisk.pm
+++ b/src/PVE/QemuServer/ImportDisk.pm
@@ -33,12 +33,7 @@ sub do_import {
         if $format && $format ne $dst_format;
 
     my $dst_volid = PVE::Storage::vdisk_alloc(
-        $storecfg,
-        $storage_id,
-        $vmid,
-        $dst_format,
-        undef,
-        $src_size / 1024,
+        $storecfg, $storage_id, $vmid, $dst_format, undef, $src_size / 1024, 'vm-vol',
     );
 
     my $zeroinit = PVE::Storage::volume_has_feature($storecfg, 'sparseinit', $dst_volid);
diff --git a/src/PVE/QemuServer/OVMF.pm b/src/PVE/QemuServer/OVMF.pm
index 8948651c..9bdeaff7 100644
--- a/src/PVE/QemuServer/OVMF.pm
+++ b/src/PVE/QemuServer/OVMF.pm
@@ -135,7 +135,8 @@ sub create_efidisk($$$$$$$$) {
 
     my $vars_size_b = -s $ovmf_vars;
     my $vars_size = PVE::Tools::convert_size($vars_size_b, 'b' => 'kb');
-    my $volid = PVE::Storage::vdisk_alloc($storecfg, $storeid, $vmid, $fmt, undef, $vars_size);
+    my $volid =
+        PVE::Storage::vdisk_alloc($storecfg, $storeid, $vmid, $fmt, undef, $vars_size, 'vm-vol');
     PVE::Storage::activate_volumes($storecfg, [$volid]);
 
     PVE::QemuServer::QemuImage::convert($ovmf_vars, $volid, $vars_size_b);
diff --git a/src/PVE/VZDump/QemuServer.pm b/src/PVE/VZDump/QemuServer.pm
index 5b94c369..3da54359 100644
--- a/src/PVE/VZDump/QemuServer.pm
+++ b/src/PVE/VZDump/QemuServer.pm
@@ -604,7 +604,13 @@ my sub allocate_fleecing_images {
                 }
 
                 $di->{'fleece-volid'} = PVE::Storage::vdisk_alloc(
-                    $self->{storecfg}, $fleecing_storeid, $vmid, $format, $name, $size,
+                    $self->{storecfg},
+                    $fleecing_storeid,
+                    $vmid,
+                    $format,
+                    $name,
+                    $size,
+                    'vm-vol',
                 );
 
                 push $fleece_volids->@*, $di->{'fleece-volid'};
diff --git a/src/bin/qmextract b/src/bin/qmextract
index 76538f97..ac9ccc13 100755
--- a/src/bin/qmextract
+++ b/src/bin/qmextract
@@ -173,7 +173,8 @@ sub extract_archive {
                 if $format ne 'raw';
         }
 
-        my $volid = PVE::Storage::vdisk_alloc($cfg, $storeid, $vmid, $format, undef, $alloc_size);
+        my $volid =
+            PVE::Storage::vdisk_alloc($cfg, $storeid, $vmid, $format, undef, $alloc_size, 'vm-vol');
 
         print STDERR "new volume ID is '$volid'\n";
 
-- 
2.47.2



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] 74+ messages in thread

* [pve-devel] [PATCH qemu-server 02/10] add vtype parameter to rename_volume call
  2025-07-29 11:15 [pve-devel] [RFC storage 00/26+10+3] unify vtype and content-type and Wolfgang Bumiller
                   ` (29 preceding siblings ...)
  2025-07-29 11:15 ` [pve-devel] [PATCH qemu-server 01/10] add vtype to vdisk_alloc and vdisk_clone calls Wolfgang Bumiller
@ 2025-07-29 11:15 ` Wolfgang Bumiller
  2025-07-29 11:15 ` [pve-devel] [PATCH qemu-server 03/10] expect 'vm-vol' vtype in get_replicatable_volumes Wolfgang Bumiller
                   ` (8 subsequent siblings)
  39 siblings, 0 replies; 74+ messages in thread
From: Wolfgang Bumiller @ 2025-07-29 11:15 UTC (permalink / raw)
  To: pve-devel

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
---
 src/PVE/API2/Qemu.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/PVE/API2/Qemu.pm b/src/PVE/API2/Qemu.pm
index a3f967f3..76883a5b 100644
--- a/src/PVE/API2/Qemu.pm
+++ b/src/PVE/API2/Qemu.pm
@@ -4904,7 +4904,7 @@ __PACKAGE__->register_method({
                                 (PVE::Storage::parse_volname($storecfg, $source_volid))[6];
 
                             my $new_volid = PVE::Storage::rename_volume(
-                                $storecfg, $source_volid, $target_vmid,
+                                $storecfg, $source_volid, $target_vmid, undef, 'vm-vol',
                             );
 
                             $drive->{file} = $new_volid;
-- 
2.47.2



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] 74+ messages in thread

* [pve-devel] [PATCH qemu-server 03/10] expect 'vm-vol' vtype in get_replicatable_volumes
  2025-07-29 11:15 [pve-devel] [RFC storage 00/26+10+3] unify vtype and content-type and Wolfgang Bumiller
                   ` (30 preceding siblings ...)
  2025-07-29 11:15 ` [pve-devel] [PATCH qemu-server 02/10] add vtype parameter to rename_volume call Wolfgang Bumiller
@ 2025-07-29 11:15 ` Wolfgang Bumiller
  2025-07-29 11:15 ` [pve-devel] [PATCH qemu-server 04/10] expect 'vm-vol' vtype wherever 'images' was expected Wolfgang Bumiller
                   ` (7 subsequent siblings)
  39 siblings, 0 replies; 74+ messages in thread
From: Wolfgang Bumiller @ 2025-07-29 11:15 UTC (permalink / raw)
  To: pve-devel

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
---
 src/PVE/QemuConfig.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/PVE/QemuConfig.pm b/src/PVE/QemuConfig.pm
index 79a46e45..451ad5c4 100644
--- a/src/PVE/QemuConfig.pm
+++ b/src/PVE/QemuConfig.pm
@@ -160,7 +160,7 @@ sub get_replicatable_volumes {
         my ($path, $owner, $vtype) = PVE::Storage::path($storecfg, $volid);
         return if !$owner || ($owner != $vmid);
 
-        if ($vtype ne 'images') {
+        if ($vtype ne 'vm-vol' && $vtype ne 'images') {
             return if $cleanup || $noerr;
             die "unable to replicate volume '$volid', type '$vtype'\n";
         }
-- 
2.47.2



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] 74+ messages in thread

* [pve-devel] [PATCH qemu-server 04/10] expect 'vm-vol' vtype wherever 'images' was expected
  2025-07-29 11:15 [pve-devel] [RFC storage 00/26+10+3] unify vtype and content-type and Wolfgang Bumiller
                   ` (31 preceding siblings ...)
  2025-07-29 11:15 ` [pve-devel] [PATCH qemu-server 03/10] expect 'vm-vol' vtype in get_replicatable_volumes Wolfgang Bumiller
@ 2025-07-29 11:15 ` Wolfgang Bumiller
  2025-07-30  8:40   ` Fabian Grünbichler
  2025-07-30  9:17   ` Fiona Ebner
  2025-07-29 11:15 ` [pve-devel] [PATCH qemu-server 05/10] tests: update QmMock to support vtypes Wolfgang Bumiller
                   ` (6 subsequent siblings)
  39 siblings, 2 replies; 74+ messages in thread
From: Wolfgang Bumiller @ 2025-07-29 11:15 UTC (permalink / raw)
  To: pve-devel

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
---
 src/PVE/API2/Qemu.pm   | 16 +++++++++-------
 src/PVE/QemuMigrate.pm |  3 ++-
 src/PVE/QemuServer.pm  |  6 ++++--
 3 files changed, 15 insertions(+), 10 deletions(-)

diff --git a/src/PVE/API2/Qemu.pm b/src/PVE/API2/Qemu.pm
index 76883a5b..deb2eae8 100644
--- a/src/PVE/API2/Qemu.pm
+++ b/src/PVE/API2/Qemu.pm
@@ -191,8 +191,9 @@ my $check_storage_access = sub {
                 PVE::Storage::check_volume_access($rpcenv, $authuser, $storecfg, $vmid, $volid);
                 if ($storeid) {
                     my ($vtype) = PVE::Storage::parse_volname($storecfg, $volid);
-                    raise_param_exc({ $ds => "content type needs to be 'images' or 'iso'" })
-                        if $vtype ne 'images' && $vtype ne 'iso';
+                    raise_param_exc(
+                        { $ds => "content type needs to be 'vm-vol', 'images' or 'iso'" })
+                        if $vtype ne 'vm-vol' && $vtype ne 'images' && $vtype ne 'iso';
                 }
             }
 
@@ -206,10 +207,10 @@ my $check_storage_access = sub {
 
                     raise_param_exc(
                         {
-                            $ds =>
-                                "$src_image has wrong type '$vtype' - needs to be 'images' or 'import'",
+                            $ds => "$src_image has wrong type '$vtype'"
+                                . " - needs to be 'vm-vol', 'images' or 'import'",
                         },
-                    ) if $vtype ne 'images' && $vtype ne 'import';
+                    ) if $vtype ne 'vm-vol' && $vtype ne 'images' && $vtype ne 'import';
 
                     if (PVE::QemuServer::Helpers::needs_extraction($vtype, $fmt)) {
                         my $extraction_scfg =
@@ -658,8 +659,9 @@ my sub create_disks : prototype($$$$$$$$$$$) {
             if ($storeid) {
                 my ($vtype, $volume_format) = (checked_parse_volname($storecfg, $volid))[0, 6];
 
-                die "cannot use volume $volid - content type needs to be 'images' or 'iso'"
-                    if $vtype ne 'images' && $vtype ne 'iso';
+                die "cannot use volume $volid"
+                    . " - content type needs to be 'vm-vol', 'images' or 'iso'"
+                    if $vtype ne 'vm-vol' && $vtype ne 'images' && $vtype ne 'iso';
 
                 # TODO PVE 9 - consider disallowing setting an explicit format for managed volumes.
                 if ($disk->{format} && $disk->{format} ne $volume_format) {
diff --git a/src/PVE/QemuMigrate.pm b/src/PVE/QemuMigrate.pm
index 9585e292..bdb1fce3 100644
--- a/src/PVE/QemuMigrate.pm
+++ b/src/PVE/QemuMigrate.pm
@@ -168,8 +168,9 @@ sub target_storage_check_available {
             $storecfg, $targetsid, $self->{node},
         );
         my ($vtype) = PVE::Storage::parse_volname($storecfg, $volid);
+        my $ctype = $vtype eq 'vm-vol' ? 'images' : $vtype;
         die "$volid: content type '$vtype' is not available on storage '$targetsid'\n"
-            if !$target_scfg->{content}->{$vtype};
+            if !$target_scfg->{content}->{$ctype};
     }
 }
 
diff --git a/src/PVE/QemuServer.pm b/src/PVE/QemuServer.pm
index d004dd55..05a3be91 100644
--- a/src/PVE/QemuServer.pm
+++ b/src/PVE/QemuServer.pm
@@ -8241,8 +8241,10 @@ sub check_volume_storage_type {
     my $scfg = PVE::Storage::storage_config($storecfg, $storeid);
     my ($vtype) = PVE::Storage::parse_volname($storecfg, $vol);
 
-    die "storage '$storeid' does not support content-type '$vtype'\n"
-        if !$scfg->{content}->{$vtype};
+    my $ctype = $vtype eq 'vm-vol' ? 'images' : $vtype;
+
+    die "storage '$storeid' does not support content-type '$ctype'\n"
+        if !$scfg->{content}->{$ctype};
 
     return 1;
 }
-- 
2.47.2



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] 74+ messages in thread

* [pve-devel] [PATCH qemu-server 05/10] tests: update QmMock to support vtypes
  2025-07-29 11:15 [pve-devel] [RFC storage 00/26+10+3] unify vtype and content-type and Wolfgang Bumiller
                   ` (32 preceding siblings ...)
  2025-07-29 11:15 ` [pve-devel] [PATCH qemu-server 04/10] expect 'vm-vol' vtype wherever 'images' was expected Wolfgang Bumiller
@ 2025-07-29 11:15 ` Wolfgang Bumiller
  2025-07-29 11:15 ` [pve-devel] [PATCH qemu-server 06/10] tests: scripted: update tests to new vtypes and paths Wolfgang Bumiller
                   ` (5 subsequent siblings)
  39 siblings, 0 replies; 74+ messages in thread
From: Wolfgang Bumiller @ 2025-07-29 11:15 UTC (permalink / raw)
  To: pve-devel

This currently breaks the tests.
The accompanying test case fixes happen automated via shell commands
in the next commit.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
---
 src/test/MigrationTest/QmMock.pm | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/test/MigrationTest/QmMock.pm b/src/test/MigrationTest/QmMock.pm
index 78be47d3..e98b38d6 100644
--- a/src/test/MigrationTest/QmMock.pm
+++ b/src/test/MigrationTest/QmMock.pm
@@ -89,12 +89,14 @@ my $disk_counter = 10;
 
 $MigrationTest::Shared::storage_module->mock(
     vdisk_alloc => sub {
-        my ($cfg, $storeid, $vmid, $fmt, $name, $size) = @_;
+        my ($cfg, $storeid, $vmid, $fmt, $name, $size, $vtype) = @_;
 
         die "vdisk_alloc (mocked) - name is not expected to be set - implement me\n"
             if defined($name);
 
-        my $name_without_extension = "vm-${vmid}-disk-${disk_counter}";
+        my $prefix = ($vtype && $vtype eq 'vm-vol') ? 'vol-vm' : 'vm';
+
+        my $name_without_extension = "${prefix}-${vmid}-disk-${disk_counter}";
         $disk_counter++;
 
         my $volid;
-- 
2.47.2



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] 74+ messages in thread

* [pve-devel] [PATCH qemu-server 06/10] tests: scripted: update tests to new vtypes and paths
  2025-07-29 11:15 [pve-devel] [RFC storage 00/26+10+3] unify vtype and content-type and Wolfgang Bumiller
                   ` (33 preceding siblings ...)
  2025-07-29 11:15 ` [pve-devel] [PATCH qemu-server 05/10] tests: update QmMock to support vtypes Wolfgang Bumiller
@ 2025-07-29 11:15 ` Wolfgang Bumiller
  2025-07-29 14:13   ` Max R. Carrara
  2025-07-29 11:15 ` [pve-devel] [PATCH qemu-server 07/10] make tidy Wolfgang Bumiller
                   ` (4 subsequent siblings)
  39 siblings, 1 reply; 74+ messages in thread
From: Wolfgang Bumiller @ 2025-07-29 11:15 UTC (permalink / raw)
  To: pve-devel

This is the result of:

$ find src/test/ -type f -print0 | xargs -0 sed -ri -e 's/\<vm-[0-9]+-disk-/vol-&/g'
$ find src/test/ -type f -print0 | xargs -0 sed -ri -e 's/\<vm-\$vmid-disk-/vol-&/g'
$ find src/test/ -type f -print0 | xargs -0 sed -ri -e 's/snap_(vm-\$vmid-disk-)/snap_vol-\1/g'
$ find src/test/ -type f -print0 | xargs -0 sed -ri -e 's/snap_(vm-[0-9]+-disk-)/snap_vol-\1/g'
$ find src/test/ -type f -print0 | xargs -0 sed -ri -e 's|/images/([0-9]+/vol-vm)|/vms/\1|g'
$ find src/test/ -type f -print0 | xargs -0 sed -ri -e 's|/images/([0-9]+/vol-ct)|/cts/\1|g'
$ find src/test/ -type f -print0 | xargs -0 sed -ri -e 's|/images/(\$vmid/vol-vm)|/vms/\1|g'
$ find src/test/ -type f -print0 | xargs -0 sed -ri -e 's|/images/(\$vmid/vol-ct)|/cts/\1|g'

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
---
 src/test/cfg2cmd/aio.conf                     |  28 +--
 src/test/cfg2cmd/aio.conf.cmd                 |  28 +--
 src/test/cfg2cmd/bootorder-empty.conf         |   6 +-
 src/test/cfg2cmd/bootorder-empty.conf.cmd     |   6 +-
 src/test/cfg2cmd/bootorder-legacy.conf        |   6 +-
 src/test/cfg2cmd/bootorder-legacy.conf.cmd    |   6 +-
 src/test/cfg2cmd/bootorder.conf               |   6 +-
 src/test/cfg2cmd/bootorder.conf.cmd           |   6 +-
 src/test/cfg2cmd/efi-raw-old.conf             |   2 +-
 src/test/cfg2cmd/efi-raw-old.conf.cmd         |   2 +-
 src/test/cfg2cmd/efi-raw.conf                 |   2 +-
 src/test/cfg2cmd/efi-raw.conf.cmd             |   2 +-
 src/test/cfg2cmd/efi-secboot-and-tpm-q35.conf |   4 +-
 .../cfg2cmd/efi-secboot-and-tpm-q35.conf.cmd  |   2 +-
 src/test/cfg2cmd/efi-secboot-and-tpm.conf     |   4 +-
 src/test/cfg2cmd/efi-secboot-and-tpm.conf.cmd |   2 +-
 src/test/cfg2cmd/efidisk-on-rbd.conf          |   2 +-
 src/test/cfg2cmd/efidisk-on-rbd.conf.cmd      |   2 +-
 src/test/cfg2cmd/i440fx-win10-hostpci.conf    |   2 +-
 .../cfg2cmd/i440fx-win10-hostpci.conf.cmd     |   2 +-
 src/test/cfg2cmd/ide-no-media-error.conf      |   2 +-
 src/test/cfg2cmd/ide.conf                     |   2 +-
 src/test/cfg2cmd/ide.conf.cmd                 |   2 +-
 src/test/cfg2cmd/pinned-version-pxe-pve.conf  |   2 +-
 .../cfg2cmd/pinned-version-pxe-pve.conf.cmd   |   2 +-
 src/test/cfg2cmd/pinned-version-pxe.conf      |   2 +-
 src/test/cfg2cmd/pinned-version-pxe.conf.cmd  |   2 +-
 src/test/cfg2cmd/pinned-version.conf          |   2 +-
 src/test/cfg2cmd/pinned-version.conf.cmd      |   2 +-
 src/test/cfg2cmd/q35-ide.conf                 |   2 +-
 src/test/cfg2cmd/q35-ide.conf.cmd             |   2 +-
 .../cfg2cmd/q35-linux-hostpci-mapping.conf    |   2 +-
 .../q35-linux-hostpci-mapping.conf.cmd        |   2 +-
 .../q35-linux-hostpci-multifunction.conf      |   2 +-
 .../q35-linux-hostpci-multifunction.conf.cmd  |   2 +-
 .../q35-linux-hostpci-x-pci-overrides.conf    |   2 +-
 ...q35-linux-hostpci-x-pci-overrides.conf.cmd |   2 +-
 src/test/cfg2cmd/q35-linux-hostpci.conf       |   2 +-
 src/test/cfg2cmd/q35-linux-hostpci.conf.cmd   |   2 +-
 src/test/cfg2cmd/q35-simple-6.0.conf          |   2 +-
 src/test/cfg2cmd/q35-simple-6.0.conf.cmd      |   2 +-
 src/test/cfg2cmd/q35-simple-7.0.conf          |   2 +-
 src/test/cfg2cmd/q35-simple-7.0.conf.cmd      |   2 +-
 src/test/cfg2cmd/q35-simple-pinned-6.1.conf   |   2 +-
 .../cfg2cmd/q35-simple-pinned-6.1.conf.cmd    |   2 +-
 src/test/cfg2cmd/q35-simple.conf              |   2 +-
 src/test/cfg2cmd/q35-simple.conf.cmd          |   2 +-
 src/test/cfg2cmd/q35-win10-hostpci.conf       |   2 +-
 src/test/cfg2cmd/q35-win10-hostpci.conf.cmd   |   2 +-
 src/test/cfg2cmd/seabios_serial.conf          |   2 +-
 src/test/cfg2cmd/seabios_serial.conf.cmd      |   2 +-
 src/test/cfg2cmd/sev-es.conf                  |   2 +-
 src/test/cfg2cmd/sev-es.conf.cmd              |   2 +-
 src/test/cfg2cmd/sev-std.conf                 |   2 +-
 src/test/cfg2cmd/sev-std.conf.cmd             |   2 +-
 src/test/cfg2cmd/simple-backingchain.conf     |  16 +-
 src/test/cfg2cmd/simple-backingchain.conf.cmd |   4 +-
 .../simple-balloon-free-page-reporting.conf   |   2 +-
 ...imple-balloon-free-page-reporting.conf.cmd |   2 +-
 src/test/cfg2cmd/simple-btrfs.conf            |   8 +-
 src/test/cfg2cmd/simple-btrfs.conf.cmd        |   8 +-
 src/test/cfg2cmd/simple-cifs.conf             |   8 +-
 src/test/cfg2cmd/simple-cifs.conf.cmd         |   8 +-
 src/test/cfg2cmd/simple-lvm.conf              |   8 +-
 src/test/cfg2cmd/simple-lvm.conf.cmd          |   8 +-
 src/test/cfg2cmd/simple-lvmthin.conf          |   8 +-
 src/test/cfg2cmd/simple-lvmthin.conf.cmd      |   8 +-
 src/test/cfg2cmd/simple-rbd.conf              |  16 +-
 src/test/cfg2cmd/simple-rbd.conf.cmd          |  16 +-
 src/test/cfg2cmd/simple-virtio-blk.conf       |   2 +-
 src/test/cfg2cmd/simple-virtio-blk.conf.cmd   |   2 +-
 src/test/cfg2cmd/simple-zfs-over-iscsi.conf   |   8 +-
 src/test/cfg2cmd/simple1.conf                 |   2 +-
 src/test/cfg2cmd/simple1.conf.cmd             |   2 +-
 .../unsupported-storage-content-type.conf     |   2 +-
 .../cloudinit-snapshot.conf                   |   6 +-
 .../duplicate-sections.conf                   |   6 +-
 .../unknown-sections.conf                     |   6 +-
 .../verify-snapshot.conf                      |   6 +-
 .../cloudinit-snapshot.conf                   |   6 +-
 .../duplicate-sections.conf                   |   8 +-
 .../parse-config-input/fleecing-section.conf  |   4 +-
 src/test/parse-config-input/locked.conf       |   4 +-
 src/test/parse-config-input/plain.conf        |   2 +-
 .../parse-config-input/regular-vm-efi.conf    |   4 +-
 src/test/parse-config-input/sections.conf     |   6 +-
 src/test/parse-config-input/snapshots.conf    |  56 ++---
 .../parse-config-input/unknown-sections.conf  |   6 +-
 .../parse-config-input/verify-snapshot.conf   |   6 +-
 src/test/restore-config-expected/139.conf     |   4 +-
 src/test/restore-config-expected/142.conf     |   2 +-
 src/test/restore-config-expected/1422.conf    |   2 +-
 src/test/restore-config-expected/179.conf     |  10 +-
 src/test/restore-config-input/139.conf        |   4 +-
 src/test/restore-config-input/142.conf        |   2 +-
 src/test/restore-config-input/1422.conf       |   4 +-
 src/test/restore-config-input/179.conf        |  10 +-
 src/test/run_config2command_tests.pl          |  12 +-
 src/test/run_qemu_img_convert_tests.pl        | 160 +++++++-------
 src/test/run_qemu_migrate_tests.pl            | 204 +++++++++---------
 src/test/test_get_replicatable_volumes.pl     |  40 ++--
 101 files changed, 454 insertions(+), 454 deletions(-)

diff --git a/src/test/cfg2cmd/aio.conf b/src/test/cfg2cmd/aio.conf
index d83c23d7..b4b57038 100644
--- a/src/test/cfg2cmd/aio.conf
+++ b/src/test/cfg2cmd/aio.conf
@@ -1,14 +1,14 @@
-scsi0: local:8006/vm-8006-disk-0.raw,discard=on,size=104858K,aio=threads
-scsi1: local:8006/vm-8006-disk-1.raw,discard=on,size=104858K,aio=native
-scsi2: local:8006/vm-8006-disk-2.raw,discard=on,size=104858K,aio=io_uring
-scsi3: local:8006/vm-8006-disk-3.raw,discard=on,size=104858K
-scsi4: cifs-store:8006/vm-8006-disk-4.raw,discard=on,size=104858K
-scsi5: cifs-store:8006/vm-8006-disk-5.raw,discard=on,size=104858K,aio=io_uring
-scsi6: krbd-store:vm-8006-disk-6,discard=on,size=104858K
-scsi7: krbd-store:vm-8006-disk-7,discard=on,size=104858K,aio=io_uring
-scsi8: krbd-store:vm-8006-disk-8,discard=on,size=104858K,cache=writeback
-scsi9: krbd-store:vm-8006-disk-9,discard=on,size=104858K,cache=writeback,aio=io_uring
-scsi10: rbd-store:vm-8006-disk-8,discard=on,size=104858K
-scsi11: rbd-store:vm-8006-disk-8,discard=on,size=104858K,aio=io_uring
-scsi12: lvm-store:vm-8006-disk-9,discard=on,size=104858K
-scsi13: lvm-store:vm-8006-disk-9,discard=on,size=104858K,aio=io_uring
+scsi0: local:8006/vol-vm-8006-disk-0.raw,discard=on,size=104858K,aio=threads
+scsi1: local:8006/vol-vm-8006-disk-1.raw,discard=on,size=104858K,aio=native
+scsi2: local:8006/vol-vm-8006-disk-2.raw,discard=on,size=104858K,aio=io_uring
+scsi3: local:8006/vol-vm-8006-disk-3.raw,discard=on,size=104858K
+scsi4: cifs-store:8006/vol-vm-8006-disk-4.raw,discard=on,size=104858K
+scsi5: cifs-store:8006/vol-vm-8006-disk-5.raw,discard=on,size=104858K,aio=io_uring
+scsi6: krbd-store:vol-vm-8006-disk-6,discard=on,size=104858K
+scsi7: krbd-store:vol-vm-8006-disk-7,discard=on,size=104858K,aio=io_uring
+scsi8: krbd-store:vol-vm-8006-disk-8,discard=on,size=104858K,cache=writeback
+scsi9: krbd-store:vol-vm-8006-disk-9,discard=on,size=104858K,cache=writeback,aio=io_uring
+scsi10: rbd-store:vol-vm-8006-disk-8,discard=on,size=104858K
+scsi11: rbd-store:vol-vm-8006-disk-8,discard=on,size=104858K,aio=io_uring
+scsi12: lvm-store:vol-vm-8006-disk-9,discard=on,size=104858K
+scsi13: lvm-store:vol-vm-8006-disk-9,discard=on,size=104858K,aio=io_uring
diff --git a/src/test/cfg2cmd/aio.conf.cmd b/src/test/cfg2cmd/aio.conf.cmd
index fbeccc9f..7544b1db 100644
--- a/src/test/cfg2cmd/aio.conf.cmd
+++ b/src/test/cfg2cmd/aio.conf.cmd
@@ -38,33 +38,33 @@
   -device 'virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3,free-page-reporting=on' \
   -iscsi 'initiator-name=iqn.1993-08.org.debian:01:aabbccddeeff' \
   -device 'lsi,id=scsihw0,bus=pci.0,addr=0x5' \
-  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"threads","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/var/lib/vz/images/8006/vm-8006-disk-0.raw","node-name":"e3b2553803d55d43b9986a0aac3e9a7","read-only":false},"node-name":"f3b2553803d55d43b9986a0aac3e9a7","read-only":false},"node-name":"drive-scsi0","read-only":false,"throttle-group":"throttle-drive-scsi0"}' \
+  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"threads","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/var/lib/vz/vms/8006/vol-vm-8006-disk-0.raw","node-name":"e3b2553803d55d43b9986a0aac3e9a7","read-only":false},"node-name":"f3b2553803d55d43b9986a0aac3e9a7","read-only":false},"node-name":"drive-scsi0","read-only":false,"throttle-group":"throttle-drive-scsi0"}' \
   -device 'scsi-hd,bus=scsihw0.0,scsi-id=0,drive=drive-scsi0,id=scsi0,device_id=drive-scsi0,write-cache=on' \
-  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"native","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/var/lib/vz/images/8006/vm-8006-disk-1.raw","node-name":"e08707d013893852b3d4d42301a4298","read-only":false},"node-name":"f08707d013893852b3d4d42301a4298","read-only":false},"node-name":"drive-scsi1","read-only":false,"throttle-group":"throttle-drive-scsi1"}' \
+  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"native","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/var/lib/vz/vms/8006/vol-vm-8006-disk-1.raw","node-name":"e08707d013893852b3d4d42301a4298","read-only":false},"node-name":"f08707d013893852b3d4d42301a4298","read-only":false},"node-name":"drive-scsi1","read-only":false,"throttle-group":"throttle-drive-scsi1"}' \
   -device 'scsi-hd,bus=scsihw0.0,scsi-id=1,drive=drive-scsi1,id=scsi1,device_id=drive-scsi1,write-cache=on' \
-  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/var/lib/vz/images/8006/vm-8006-disk-2.raw","node-name":"edb0854bba55e8b2544ad937c9f5afc","read-only":false},"node-name":"fdb0854bba55e8b2544ad937c9f5afc","read-only":false},"node-name":"drive-scsi2","read-only":false,"throttle-group":"throttle-drive-scsi2"}' \
+  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/var/lib/vz/vms/8006/vol-vm-8006-disk-2.raw","node-name":"edb0854bba55e8b2544ad937c9f5afc","read-only":false},"node-name":"fdb0854bba55e8b2544ad937c9f5afc","read-only":false},"node-name":"drive-scsi2","read-only":false,"throttle-group":"throttle-drive-scsi2"}' \
   -device 'scsi-hd,bus=scsihw0.0,scsi-id=2,drive=drive-scsi2,id=scsi2,device_id=drive-scsi2,write-cache=on' \
-  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/var/lib/vz/images/8006/vm-8006-disk-3.raw","node-name":"e9c170cb9491763cad3f31718205efc","read-only":false},"node-name":"f9c170cb9491763cad3f31718205efc","read-only":false},"node-name":"drive-scsi3","read-only":false,"throttle-group":"throttle-drive-scsi3"}' \
+  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/var/lib/vz/vms/8006/vol-vm-8006-disk-3.raw","node-name":"e9c170cb9491763cad3f31718205efc","read-only":false},"node-name":"f9c170cb9491763cad3f31718205efc","read-only":false},"node-name":"drive-scsi3","read-only":false,"throttle-group":"throttle-drive-scsi3"}' \
   -device 'scsi-hd,bus=scsihw0.0,scsi-id=3,drive=drive-scsi3,id=scsi3,device_id=drive-scsi3,write-cache=on' \
-  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"native","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/mnt/pve/cifs-store/images/8006/vm-8006-disk-4.raw","node-name":"ea34ecc24c40da0d53420ef344ced37","read-only":false},"node-name":"fa34ecc24c40da0d53420ef344ced37","read-only":false},"node-name":"drive-scsi4","read-only":false,"throttle-group":"throttle-drive-scsi4"}' \
+  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"native","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/mnt/pve/cifs-store/vms/8006/vol-vm-8006-disk-4.raw","node-name":"ea34ecc24c40da0d53420ef344ced37","read-only":false},"node-name":"fa34ecc24c40da0d53420ef344ced37","read-only":false},"node-name":"drive-scsi4","read-only":false,"throttle-group":"throttle-drive-scsi4"}' \
   -device 'scsi-hd,bus=scsihw0.0,scsi-id=4,drive=drive-scsi4,id=scsi4,device_id=drive-scsi4,write-cache=on' \
-  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/mnt/pve/cifs-store/images/8006/vm-8006-disk-5.raw","node-name":"e39cacf47a4f4877072601505d90949","read-only":false},"node-name":"f39cacf47a4f4877072601505d90949","read-only":false},"node-name":"drive-scsi5","read-only":false,"throttle-group":"throttle-drive-scsi5"}' \
+  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/mnt/pve/cifs-store/vms/8006/vol-vm-8006-disk-5.raw","node-name":"e39cacf47a4f4877072601505d90949","read-only":false},"node-name":"f39cacf47a4f4877072601505d90949","read-only":false},"node-name":"drive-scsi5","read-only":false,"throttle-group":"throttle-drive-scsi5"}' \
   -device 'scsi-hd,bus=scsihw0.0,scsi-id=5,drive=drive-scsi5,id=scsi5,device_id=drive-scsi5,write-cache=on' \
-  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"host_device","filename":"/dev/rbd-pve/fc4181a6-56eb-4f68-b452-8ba1f381ca2a/cpool/vm-8006-disk-6","node-name":"e7db1ee70981087e4a2861bc7da417b","read-only":false},"node-name":"f7db1ee70981087e4a2861bc7da417b","read-only":false},"node-name":"drive-scsi6","read-only":false,"throttle-group":"throttle-drive-scsi6"}' \
+  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"host_device","filename":"/dev/rbd-pve/fc4181a6-56eb-4f68-b452-8ba1f381ca2a/cpool/vol-vm-8006-disk-6","node-name":"e7db1ee70981087e4a2861bc7da417b","read-only":false},"node-name":"f7db1ee70981087e4a2861bc7da417b","read-only":false},"node-name":"drive-scsi6","read-only":false,"throttle-group":"throttle-drive-scsi6"}' \
   -device 'scsi-hd,bus=scsihw0.0,scsi-id=6,drive=drive-scsi6,id=scsi6,device_id=drive-scsi6,write-cache=on' \
   -device 'lsi,id=scsihw1,bus=pci.0,addr=0x6' \
-  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"host_device","filename":"/dev/rbd-pve/fc4181a6-56eb-4f68-b452-8ba1f381ca2a/cpool/vm-8006-disk-7","node-name":"e2d2deac808301140a96c862fe3ea85","read-only":false},"node-name":"f2d2deac808301140a96c862fe3ea85","read-only":false},"node-name":"drive-scsi7","read-only":false,"throttle-group":"throttle-drive-scsi7"}' \
+  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"host_device","filename":"/dev/rbd-pve/fc4181a6-56eb-4f68-b452-8ba1f381ca2a/cpool/vol-vm-8006-disk-7","node-name":"e2d2deac808301140a96c862fe3ea85","read-only":false},"node-name":"f2d2deac808301140a96c862fe3ea85","read-only":false},"node-name":"drive-scsi7","read-only":false,"throttle-group":"throttle-drive-scsi7"}' \
   -device 'scsi-hd,bus=scsihw1.0,scsi-id=0,drive=drive-scsi7,id=scsi7,device_id=drive-scsi7,write-cache=on' \
-  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"threads","cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"host_device","filename":"/dev/rbd-pve/fc4181a6-56eb-4f68-b452-8ba1f381ca2a/cpool/vm-8006-disk-8","node-name":"e9796b73db57b8943746ede7d0d3060","read-only":false},"node-name":"f9796b73db57b8943746ede7d0d3060","read-only":false},"node-name":"drive-scsi8","read-only":false,"throttle-group":"throttle-drive-scsi8"}' \
+  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"threads","cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"host_device","filename":"/dev/rbd-pve/fc4181a6-56eb-4f68-b452-8ba1f381ca2a/cpool/vol-vm-8006-disk-8","node-name":"e9796b73db57b8943746ede7d0d3060","read-only":false},"node-name":"f9796b73db57b8943746ede7d0d3060","read-only":false},"node-name":"drive-scsi8","read-only":false,"throttle-group":"throttle-drive-scsi8"}' \
   -device 'scsi-hd,bus=scsihw1.0,scsi-id=1,drive=drive-scsi8,id=scsi8,device_id=drive-scsi8,write-cache=on' \
-  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"io_uring","cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"host_device","filename":"/dev/rbd-pve/fc4181a6-56eb-4f68-b452-8ba1f381ca2a/cpool/vm-8006-disk-9","node-name":"efa538892acc012edbdc5810035bf7d","read-only":false},"node-name":"ffa538892acc012edbdc5810035bf7d","read-only":false},"node-name":"drive-scsi9","read-only":false,"throttle-group":"throttle-drive-scsi9"}' \
+  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"io_uring","cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"host_device","filename":"/dev/rbd-pve/fc4181a6-56eb-4f68-b452-8ba1f381ca2a/cpool/vol-vm-8006-disk-9","node-name":"efa538892acc012edbdc5810035bf7d","read-only":false},"node-name":"ffa538892acc012edbdc5810035bf7d","read-only":false},"node-name":"drive-scsi9","read-only":false,"throttle-group":"throttle-drive-scsi9"}' \
   -device 'scsi-hd,bus=scsihw1.0,scsi-id=2,drive=drive-scsi9,id=scsi9,device_id=drive-scsi9,write-cache=on' \
-  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"auth-client-required":["none"],"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"rbd","image":"vm-8006-disk-8","node-name":"e6f4cbffa741d16bba69304eb2800ef","pool":"cpool","read-only":false,"server":[{"host":"127.0.0.42","port":"3300"},{"host":"127.0.0.21","port":"3300"},{"host":"::1","port":"3300"}]},"node-name":"f6f4cbffa741d16bba69304eb2800ef","read-only":false},"node-name":"drive-scsi10","read-only":false,"throttle-group":"throttle-drive-scsi10"}' \
+  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"auth-client-required":["none"],"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"rbd","image":"vol-vm-8006-disk-8","node-name":"e6f4cbffa741d16bba69304eb2800ef","pool":"cpool","read-only":false,"server":[{"host":"127.0.0.42","port":"3300"},{"host":"127.0.0.21","port":"3300"},{"host":"::1","port":"3300"}]},"node-name":"f6f4cbffa741d16bba69304eb2800ef","read-only":false},"node-name":"drive-scsi10","read-only":false,"throttle-group":"throttle-drive-scsi10"}' \
   -device 'scsi-hd,bus=scsihw1.0,scsi-id=3,drive=drive-scsi10,id=scsi10,device_id=drive-scsi10,write-cache=on' \
-  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"auth-client-required":["none"],"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"rbd","image":"vm-8006-disk-8","node-name":"e42375c54de70f5f4be966d98c90255","pool":"cpool","read-only":false,"server":[{"host":"127.0.0.42","port":"3300"},{"host":"127.0.0.21","port":"3300"},{"host":"::1","port":"3300"}]},"node-name":"f42375c54de70f5f4be966d98c90255","read-only":false},"node-name":"drive-scsi11","read-only":false,"throttle-group":"throttle-drive-scsi11"}' \
+  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"auth-client-required":["none"],"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"rbd","image":"vol-vm-8006-disk-8","node-name":"e42375c54de70f5f4be966d98c90255","pool":"cpool","read-only":false,"server":[{"host":"127.0.0.42","port":"3300"},{"host":"127.0.0.21","port":"3300"},{"host":"::1","port":"3300"}]},"node-name":"f42375c54de70f5f4be966d98c90255","read-only":false},"node-name":"drive-scsi11","read-only":false,"throttle-group":"throttle-drive-scsi11"}' \
   -device 'scsi-hd,bus=scsihw1.0,scsi-id=4,drive=drive-scsi11,id=scsi11,device_id=drive-scsi11,write-cache=on' \
-  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"native","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"host_device","filename":"/dev/veegee/vm-8006-disk-9","node-name":"ed7b2c9e0133619fcf6cb8ce5903502","read-only":false},"node-name":"fd7b2c9e0133619fcf6cb8ce5903502","read-only":false},"node-name":"drive-scsi12","read-only":false,"throttle-group":"throttle-drive-scsi12"}' \
+  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"native","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"host_device","filename":"/dev/veegee/vol-vm-8006-disk-9","node-name":"ed7b2c9e0133619fcf6cb8ce5903502","read-only":false},"node-name":"fd7b2c9e0133619fcf6cb8ce5903502","read-only":false},"node-name":"drive-scsi12","read-only":false,"throttle-group":"throttle-drive-scsi12"}' \
   -device 'scsi-hd,bus=scsihw1.0,scsi-id=5,drive=drive-scsi12,id=scsi12,device_id=drive-scsi12,write-cache=on' \
-  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"host_device","filename":"/dev/veegee/vm-8006-disk-9","node-name":"ed85420a880203ca1401d00a8edf132","read-only":false},"node-name":"fd85420a880203ca1401d00a8edf132","read-only":false},"node-name":"drive-scsi13","read-only":false,"throttle-group":"throttle-drive-scsi13"}' \
+  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"host_device","filename":"/dev/veegee/vol-vm-8006-disk-9","node-name":"ed85420a880203ca1401d00a8edf132","read-only":false},"node-name":"fd85420a880203ca1401d00a8edf132","read-only":false},"node-name":"drive-scsi13","read-only":false,"throttle-group":"throttle-drive-scsi13"}' \
   -device 'scsi-hd,bus=scsihw1.0,scsi-id=6,drive=drive-scsi13,id=scsi13,device_id=drive-scsi13,write-cache=on' \
   -machine 'type=pc+pve0'
diff --git a/src/test/cfg2cmd/bootorder-empty.conf b/src/test/cfg2cmd/bootorder-empty.conf
index ccfadb9f..0f6934a8 100644
--- a/src/test/cfg2cmd/bootorder-empty.conf
+++ b/src/test/cfg2cmd/bootorder-empty.conf
@@ -7,9 +7,9 @@ name: simple
 net0: virtio=A2:C0:43:77:08:A0,bridge=vmbr0
 numa: 0
 ostype: l26
-scsi4: local:8006/vm-8006-disk-0.qcow2,discard=on,size=104858K
+scsi4: local:8006/vol-vm-8006-disk-0.qcow2,discard=on,size=104858K
 smbios1: uuid=7b10d7af-b932-4c66-b2c3-3996152ec465
 sockets: 1
-virtio0: local:8006/vm-8006-disk-0.qcow2,discard=on,iothread=1,size=104858K
-virtio1: local:8006/vm-8006-disk-0.qcow2,discard=on,iothread=1,size=104858K
+virtio0: local:8006/vol-vm-8006-disk-0.qcow2,discard=on,iothread=1,size=104858K
+virtio1: local:8006/vol-vm-8006-disk-0.qcow2,discard=on,iothread=1,size=104858K
 vmgenid: c773c261-d800-4348-9f5d-167fadd53cf8
diff --git a/src/test/cfg2cmd/bootorder-empty.conf.cmd b/src/test/cfg2cmd/bootorder-empty.conf.cmd
index 3516b344..b53e303b 100644
--- a/src/test/cfg2cmd/bootorder-empty.conf.cmd
+++ b/src/test/cfg2cmd/bootorder-empty.conf.cmd
@@ -32,11 +32,11 @@
   -iscsi 'initiator-name=iqn.1993-08.org.debian:01:aabbccddeeff' \
   -device 'ide-cd,bus=ide.1,unit=0,id=ide2' \
   -device 'lsi,id=scsihw0,bus=pci.0,addr=0x5' \
-  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/var/lib/vz/images/8006/vm-8006-disk-0.qcow2","node-name":"e6bf62e20f6c14a2c19bd6f1f5ac36c","read-only":false},"node-name":"f6bf62e20f6c14a2c19bd6f1f5ac36c","read-only":false},"node-name":"drive-scsi4","read-only":false,"throttle-group":"throttle-drive-scsi4"}' \
+  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/var/lib/vz/vms/8006/vol-vm-8006-disk-0.qcow2","node-name":"e6bf62e20f6c14a2c19bd6f1f5ac36c","read-only":false},"node-name":"f6bf62e20f6c14a2c19bd6f1f5ac36c","read-only":false},"node-name":"drive-scsi4","read-only":false,"throttle-group":"throttle-drive-scsi4"}' \
   -device 'scsi-hd,bus=scsihw0.0,scsi-id=4,drive=drive-scsi4,id=scsi4,device_id=drive-scsi4,write-cache=on' \
-  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/var/lib/vz/images/8006/vm-8006-disk-0.qcow2","node-name":"edd19f6c1b3a6d5a6248c3376a91a16","read-only":false},"node-name":"fdd19f6c1b3a6d5a6248c3376a91a16","read-only":false},"node-name":"drive-virtio0","read-only":false,"throttle-group":"throttle-drive-virtio0"}' \
+  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/var/lib/vz/vms/8006/vol-vm-8006-disk-0.qcow2","node-name":"edd19f6c1b3a6d5a6248c3376a91a16","read-only":false},"node-name":"fdd19f6c1b3a6d5a6248c3376a91a16","read-only":false},"node-name":"drive-virtio0","read-only":false,"throttle-group":"throttle-drive-virtio0"}' \
   -device 'virtio-blk-pci,drive=drive-virtio0,id=virtio0,bus=pci.0,addr=0xa,iothread=iothread-virtio0,write-cache=on' \
-  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/var/lib/vz/images/8006/vm-8006-disk-0.qcow2","node-name":"eeb683fb9c516c1a8707c917f0d7a38","read-only":false},"node-name":"feb683fb9c516c1a8707c917f0d7a38","read-only":false},"node-name":"drive-virtio1","read-only":false,"throttle-group":"throttle-drive-virtio1"}' \
+  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/var/lib/vz/vms/8006/vol-vm-8006-disk-0.qcow2","node-name":"eeb683fb9c516c1a8707c917f0d7a38","read-only":false},"node-name":"feb683fb9c516c1a8707c917f0d7a38","read-only":false},"node-name":"drive-virtio1","read-only":false,"throttle-group":"throttle-drive-virtio1"}' \
   -device 'virtio-blk-pci,drive=drive-virtio1,id=virtio1,bus=pci.0,addr=0xb,iothread=iothread-virtio1,write-cache=on' \
   -netdev 'type=tap,id=net0,ifname=tap8006i0,script=/usr/libexec/qemu-server/pve-bridge,downscript=/usr/libexec/qemu-server/pve-bridgedown,vhost=on' \
   -device 'virtio-net-pci,mac=A2:C0:43:77:08:A0,netdev=net0,bus=pci.0,addr=0x12,id=net0,rx_queue_size=1024,tx_queue_size=256' \
diff --git a/src/test/cfg2cmd/bootorder-legacy.conf b/src/test/cfg2cmd/bootorder-legacy.conf
index 4e59268b..da521616 100644
--- a/src/test/cfg2cmd/bootorder-legacy.conf
+++ b/src/test/cfg2cmd/bootorder-legacy.conf
@@ -8,9 +8,9 @@ name: simple
 net0: virtio=A2:C0:43:77:08:A0,bridge=vmbr0
 numa: 0
 ostype: l26
-scsi4: local:8006/vm-8006-disk-0.qcow2,discard=on,size=104858K
+scsi4: local:8006/vol-vm-8006-disk-0.qcow2,discard=on,size=104858K
 smbios1: uuid=7b10d7af-b932-4c66-b2c3-3996152ec465
 sockets: 1
-virtio0: local:8006/vm-8006-disk-0.qcow2,discard=on,iothread=1,size=104858K
-virtio1: local:8006/vm-8006-disk-0.qcow2,discard=on,iothread=1,size=104858K
+virtio0: local:8006/vol-vm-8006-disk-0.qcow2,discard=on,iothread=1,size=104858K
+virtio1: local:8006/vol-vm-8006-disk-0.qcow2,discard=on,iothread=1,size=104858K
 vmgenid: c773c261-d800-4348-9f5d-167fadd53cf8
diff --git a/src/test/cfg2cmd/bootorder-legacy.conf.cmd b/src/test/cfg2cmd/bootorder-legacy.conf.cmd
index c86ab6f9..85b2ec50 100644
--- a/src/test/cfg2cmd/bootorder-legacy.conf.cmd
+++ b/src/test/cfg2cmd/bootorder-legacy.conf.cmd
@@ -32,11 +32,11 @@
   -iscsi 'initiator-name=iqn.1993-08.org.debian:01:aabbccddeeff' \
   -device 'ide-cd,bus=ide.1,unit=0,id=ide2,bootindex=200' \
   -device 'lsi,id=scsihw0,bus=pci.0,addr=0x5' \
-  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/var/lib/vz/images/8006/vm-8006-disk-0.qcow2","node-name":"e6bf62e20f6c14a2c19bd6f1f5ac36c","read-only":false},"node-name":"f6bf62e20f6c14a2c19bd6f1f5ac36c","read-only":false},"node-name":"drive-scsi4","read-only":false,"throttle-group":"throttle-drive-scsi4"}' \
+  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/var/lib/vz/vms/8006/vol-vm-8006-disk-0.qcow2","node-name":"e6bf62e20f6c14a2c19bd6f1f5ac36c","read-only":false},"node-name":"f6bf62e20f6c14a2c19bd6f1f5ac36c","read-only":false},"node-name":"drive-scsi4","read-only":false,"throttle-group":"throttle-drive-scsi4"}' \
   -device 'scsi-hd,bus=scsihw0.0,scsi-id=4,drive=drive-scsi4,id=scsi4,device_id=drive-scsi4,write-cache=on' \
-  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/var/lib/vz/images/8006/vm-8006-disk-0.qcow2","node-name":"edd19f6c1b3a6d5a6248c3376a91a16","read-only":false},"node-name":"fdd19f6c1b3a6d5a6248c3376a91a16","read-only":false},"node-name":"drive-virtio0","read-only":false,"throttle-group":"throttle-drive-virtio0"}' \
+  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/var/lib/vz/vms/8006/vol-vm-8006-disk-0.qcow2","node-name":"edd19f6c1b3a6d5a6248c3376a91a16","read-only":false},"node-name":"fdd19f6c1b3a6d5a6248c3376a91a16","read-only":false},"node-name":"drive-virtio0","read-only":false,"throttle-group":"throttle-drive-virtio0"}' \
   -device 'virtio-blk-pci,drive=drive-virtio0,id=virtio0,bus=pci.0,addr=0xa,iothread=iothread-virtio0,write-cache=on' \
-  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/var/lib/vz/images/8006/vm-8006-disk-0.qcow2","node-name":"eeb683fb9c516c1a8707c917f0d7a38","read-only":false},"node-name":"feb683fb9c516c1a8707c917f0d7a38","read-only":false},"node-name":"drive-virtio1","read-only":false,"throttle-group":"throttle-drive-virtio1"}' \
+  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/var/lib/vz/vms/8006/vol-vm-8006-disk-0.qcow2","node-name":"eeb683fb9c516c1a8707c917f0d7a38","read-only":false},"node-name":"feb683fb9c516c1a8707c917f0d7a38","read-only":false},"node-name":"drive-virtio1","read-only":false,"throttle-group":"throttle-drive-virtio1"}' \
   -device 'virtio-blk-pci,drive=drive-virtio1,id=virtio1,bus=pci.0,addr=0xb,iothread=iothread-virtio1,bootindex=302,write-cache=on' \
   -netdev 'type=tap,id=net0,ifname=tap8006i0,script=/usr/libexec/qemu-server/pve-bridge,downscript=/usr/libexec/qemu-server/pve-bridgedown,vhost=on' \
   -device 'virtio-net-pci,mac=A2:C0:43:77:08:A0,netdev=net0,bus=pci.0,addr=0x12,id=net0,rx_queue_size=1024,tx_queue_size=256,bootindex=100' \
diff --git a/src/test/cfg2cmd/bootorder.conf b/src/test/cfg2cmd/bootorder.conf
index 7991065d..edd7c4fd 100644
--- a/src/test/cfg2cmd/bootorder.conf
+++ b/src/test/cfg2cmd/bootorder.conf
@@ -7,9 +7,9 @@ name: simple
 net0: virtio=A2:C0:43:77:08:A0,bridge=vmbr0
 numa: 0
 ostype: l26
-scsi4: local:8006/vm-8006-disk-0.qcow2,discard=on,size=104858K
+scsi4: local:8006/vol-vm-8006-disk-0.qcow2,discard=on,size=104858K
 smbios1: uuid=7b10d7af-b932-4c66-b2c3-3996152ec465
 sockets: 1
-virtio0: local:8006/vm-8006-disk-0.qcow2,discard=on,iothread=1,size=104858K
-virtio1: local:8006/vm-8006-disk-0.qcow2,discard=on,iothread=1,size=104858K
+virtio0: local:8006/vol-vm-8006-disk-0.qcow2,discard=on,iothread=1,size=104858K
+virtio1: local:8006/vol-vm-8006-disk-0.qcow2,discard=on,iothread=1,size=104858K
 vmgenid: c773c261-d800-4348-9f5d-167fadd53cf8
diff --git a/src/test/cfg2cmd/bootorder.conf.cmd b/src/test/cfg2cmd/bootorder.conf.cmd
index 48f9da8b..78e6c51b 100644
--- a/src/test/cfg2cmd/bootorder.conf.cmd
+++ b/src/test/cfg2cmd/bootorder.conf.cmd
@@ -32,11 +32,11 @@
   -iscsi 'initiator-name=iqn.1993-08.org.debian:01:aabbccddeeff' \
   -device 'ide-cd,bus=ide.1,unit=0,id=ide2,bootindex=103' \
   -device 'lsi,id=scsihw0,bus=pci.0,addr=0x5' \
-  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/var/lib/vz/images/8006/vm-8006-disk-0.qcow2","node-name":"e6bf62e20f6c14a2c19bd6f1f5ac36c","read-only":false},"node-name":"f6bf62e20f6c14a2c19bd6f1f5ac36c","read-only":false},"node-name":"drive-scsi4","read-only":false,"throttle-group":"throttle-drive-scsi4"}' \
+  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/var/lib/vz/vms/8006/vol-vm-8006-disk-0.qcow2","node-name":"e6bf62e20f6c14a2c19bd6f1f5ac36c","read-only":false},"node-name":"f6bf62e20f6c14a2c19bd6f1f5ac36c","read-only":false},"node-name":"drive-scsi4","read-only":false,"throttle-group":"throttle-drive-scsi4"}' \
   -device 'scsi-hd,bus=scsihw0.0,scsi-id=4,drive=drive-scsi4,id=scsi4,device_id=drive-scsi4,bootindex=102,write-cache=on' \
-  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/var/lib/vz/images/8006/vm-8006-disk-0.qcow2","node-name":"edd19f6c1b3a6d5a6248c3376a91a16","read-only":false},"node-name":"fdd19f6c1b3a6d5a6248c3376a91a16","read-only":false},"node-name":"drive-virtio0","read-only":false,"throttle-group":"throttle-drive-virtio0"}' \
+  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/var/lib/vz/vms/8006/vol-vm-8006-disk-0.qcow2","node-name":"edd19f6c1b3a6d5a6248c3376a91a16","read-only":false},"node-name":"fdd19f6c1b3a6d5a6248c3376a91a16","read-only":false},"node-name":"drive-virtio0","read-only":false,"throttle-group":"throttle-drive-virtio0"}' \
   -device 'virtio-blk-pci,drive=drive-virtio0,id=virtio0,bus=pci.0,addr=0xa,iothread=iothread-virtio0,write-cache=on' \
-  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/var/lib/vz/images/8006/vm-8006-disk-0.qcow2","node-name":"eeb683fb9c516c1a8707c917f0d7a38","read-only":false},"node-name":"feb683fb9c516c1a8707c917f0d7a38","read-only":false},"node-name":"drive-virtio1","read-only":false,"throttle-group":"throttle-drive-virtio1"}' \
+  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/var/lib/vz/vms/8006/vol-vm-8006-disk-0.qcow2","node-name":"eeb683fb9c516c1a8707c917f0d7a38","read-only":false},"node-name":"feb683fb9c516c1a8707c917f0d7a38","read-only":false},"node-name":"drive-virtio1","read-only":false,"throttle-group":"throttle-drive-virtio1"}' \
   -device 'virtio-blk-pci,drive=drive-virtio1,id=virtio1,bus=pci.0,addr=0xb,iothread=iothread-virtio1,bootindex=100,write-cache=on' \
   -netdev 'type=tap,id=net0,ifname=tap8006i0,script=/usr/libexec/qemu-server/pve-bridge,downscript=/usr/libexec/qemu-server/pve-bridgedown,vhost=on' \
   -device 'virtio-net-pci,mac=A2:C0:43:77:08:A0,netdev=net0,bus=pci.0,addr=0x12,id=net0,rx_queue_size=1024,tx_queue_size=256,bootindex=101' \
diff --git a/src/test/cfg2cmd/efi-raw-old.conf b/src/test/cfg2cmd/efi-raw-old.conf
index 621470ed..0437d2e6 100644
--- a/src/test/cfg2cmd/efi-raw-old.conf
+++ b/src/test/cfg2cmd/efi-raw-old.conf
@@ -2,4 +2,4 @@
 smbios1: uuid=7b10d7af-b932-4c66-b2c3-3996152ec465
 bios: ovmf
 machine: pc-i440fx-4.1+pve0
-efidisk0: local:100/vm-100-disk-0.raw
+efidisk0: local:100/vol-vm-100-disk-0.raw
diff --git a/src/test/cfg2cmd/efi-raw-old.conf.cmd b/src/test/cfg2cmd/efi-raw-old.conf.cmd
index b62967bd..14acfa6e 100644
--- a/src/test/cfg2cmd/efi-raw-old.conf.cmd
+++ b/src/test/cfg2cmd/efi-raw-old.conf.cmd
@@ -10,7 +10,7 @@
   -daemonize \
   -smbios 'type=1,uuid=7b10d7af-b932-4c66-b2c3-3996152ec465' \
   -drive 'if=pflash,unit=0,format=raw,readonly=on,file=/usr/share/pve-edk2-firmware//OVMF_CODE.fd' \
-  -drive 'if=pflash,unit=1,id=drive-efidisk0,format=raw,file=/var/lib/vz/images/100/vm-100-disk-0.raw' \
+  -drive 'if=pflash,unit=1,id=drive-efidisk0,format=raw,file=/var/lib/vz/vms/100/vol-vm-100-disk-0.raw' \
   -smp '1,sockets=1,cores=1,maxcpus=1' \
   -nodefaults \
   -boot 'menu=on,strict=on,reboot-timeout=1000,splash=/usr/share/qemu-server/bootsplash.jpg' \
diff --git a/src/test/cfg2cmd/efi-raw.conf b/src/test/cfg2cmd/efi-raw.conf
index 37f0358f..5f7399be 100644
--- a/src/test/cfg2cmd/efi-raw.conf
+++ b/src/test/cfg2cmd/efi-raw.conf
@@ -1,4 +1,4 @@
 # TEST: Test raw efidisk size parameter
 smbios1: uuid=7b10d7af-b932-4c66-b2c3-3996152ec465
 bios: ovmf
-efidisk0: local:100/vm-100-disk-0.raw
+efidisk0: local:100/vol-vm-100-disk-0.raw
diff --git a/src/test/cfg2cmd/efi-raw.conf.cmd b/src/test/cfg2cmd/efi-raw.conf.cmd
index d3b2ec8c..74841d17 100644
--- a/src/test/cfg2cmd/efi-raw.conf.cmd
+++ b/src/test/cfg2cmd/efi-raw.conf.cmd
@@ -11,7 +11,7 @@
   -smbios 'type=1,uuid=7b10d7af-b932-4c66-b2c3-3996152ec465' \
   -object '{"id":"throttle-drive-efidisk0","limits":{},"qom-type":"throttle-group"}' \
   -blockdev '{"driver":"raw","file":{"driver":"file","filename":"/usr/share/pve-edk2-firmware//OVMF_CODE.fd"},"node-name":"pflash0","read-only":true}' \
-  -blockdev '{"detect-zeroes":"on","discard":"ignore","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"raw","file":{"aio":"io_uring","cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"file","filename":"/var/lib/vz/images/100/vm-100-disk-0.raw","node-name":"e1175f2a490414e7c53337589fde17a","read-only":false},"node-name":"f1175f2a490414e7c53337589fde17a","read-only":false,"size":131072},"node-name":"drive-efidisk0","read-only":false,"throttle-group":"throttle-drive-efidisk0"}' \
+  -blockdev '{"detect-zeroes":"on","discard":"ignore","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"raw","file":{"aio":"io_uring","cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"file","filename":"/var/lib/vz/vms/100/vol-vm-100-disk-0.raw","node-name":"e1175f2a490414e7c53337589fde17a","read-only":false},"node-name":"f1175f2a490414e7c53337589fde17a","read-only":false,"size":131072},"node-name":"drive-efidisk0","read-only":false,"throttle-group":"throttle-drive-efidisk0"}' \
   -smp '1,sockets=1,cores=1,maxcpus=1' \
   -nodefaults \
   -boot 'menu=on,strict=on,reboot-timeout=1000,splash=/usr/share/qemu-server/bootsplash.jpg' \
diff --git a/src/test/cfg2cmd/efi-secboot-and-tpm-q35.conf b/src/test/cfg2cmd/efi-secboot-and-tpm-q35.conf
index 51e525b3..65ebec5f 100644
--- a/src/test/cfg2cmd/efi-secboot-and-tpm-q35.conf
+++ b/src/test/cfg2cmd/efi-secboot-and-tpm-q35.conf
@@ -2,5 +2,5 @@
 smbios1: uuid=7b10d7af-b932-4c66-b2c3-3996152ec465
 bios: ovmf
 machine: q35
-efidisk0: local:100/vm-100-disk-0.raw,efitype=4m,pre-enrolled-keys=1,size=528K
-tpmstate0: local:108/vm-100-disk-1.raw,size=4M,version=v2.0
+efidisk0: local:100/vol-vm-100-disk-0.raw,efitype=4m,pre-enrolled-keys=1,size=528K
+tpmstate0: local:108/vol-vm-100-disk-1.raw,size=4M,version=v2.0
diff --git a/src/test/cfg2cmd/efi-secboot-and-tpm-q35.conf.cmd b/src/test/cfg2cmd/efi-secboot-and-tpm-q35.conf.cmd
index 3d6279e9..905fd1b6 100644
--- a/src/test/cfg2cmd/efi-secboot-and-tpm-q35.conf.cmd
+++ b/src/test/cfg2cmd/efi-secboot-and-tpm-q35.conf.cmd
@@ -11,7 +11,7 @@
   -smbios 'type=1,uuid=7b10d7af-b932-4c66-b2c3-3996152ec465' \
   -object '{"id":"throttle-drive-efidisk0","limits":{},"qom-type":"throttle-group"}' \
   -blockdev '{"driver":"raw","file":{"driver":"file","filename":"/usr/share/pve-edk2-firmware//OVMF_CODE_4M.secboot.fd"},"node-name":"pflash0","read-only":true}' \
-  -blockdev '{"detect-zeroes":"on","discard":"ignore","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"raw","file":{"aio":"io_uring","cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"file","filename":"/var/lib/vz/images/100/vm-100-disk-0.raw","node-name":"e1175f2a490414e7c53337589fde17a","read-only":false},"node-name":"f1175f2a490414e7c53337589fde17a","read-only":false,"size":540672},"node-name":"drive-efidisk0","read-only":false,"throttle-group":"throttle-drive-efidisk0"}' \
+  -blockdev '{"detect-zeroes":"on","discard":"ignore","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"raw","file":{"aio":"io_uring","cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"file","filename":"/var/lib/vz/vms/100/vol-vm-100-disk-0.raw","node-name":"e1175f2a490414e7c53337589fde17a","read-only":false},"node-name":"f1175f2a490414e7c53337589fde17a","read-only":false,"size":540672},"node-name":"drive-efidisk0","read-only":false,"throttle-group":"throttle-drive-efidisk0"}' \
   -smp '1,sockets=1,cores=1,maxcpus=1' \
   -nodefaults \
   -boot 'menu=on,strict=on,reboot-timeout=1000,splash=/usr/share/qemu-server/bootsplash.jpg' \
diff --git a/src/test/cfg2cmd/efi-secboot-and-tpm.conf b/src/test/cfg2cmd/efi-secboot-and-tpm.conf
index 4856b531..7dda3d14 100644
--- a/src/test/cfg2cmd/efi-secboot-and-tpm.conf
+++ b/src/test/cfg2cmd/efi-secboot-and-tpm.conf
@@ -1,5 +1,5 @@
 # TEST: Test newer 4MB efidisk with secureboot and a TPM device
 smbios1: uuid=7b10d7af-b932-4c66-b2c3-3996152ec465
 bios: ovmf
-efidisk0: local:100/vm-100-disk-0.raw,efitype=4m,pre-enrolled-keys=1,size=528K
-tpmstate0: local:108/vm-100-disk-1.raw,size=4M,version=v2.0
+efidisk0: local:100/vol-vm-100-disk-0.raw,efitype=4m,pre-enrolled-keys=1,size=528K
+tpmstate0: local:108/vol-vm-100-disk-1.raw,size=4M,version=v2.0
diff --git a/src/test/cfg2cmd/efi-secboot-and-tpm.conf.cmd b/src/test/cfg2cmd/efi-secboot-and-tpm.conf.cmd
index f705aa84..96d9c285 100644
--- a/src/test/cfg2cmd/efi-secboot-and-tpm.conf.cmd
+++ b/src/test/cfg2cmd/efi-secboot-and-tpm.conf.cmd
@@ -11,7 +11,7 @@
   -smbios 'type=1,uuid=7b10d7af-b932-4c66-b2c3-3996152ec465' \
   -object '{"id":"throttle-drive-efidisk0","limits":{},"qom-type":"throttle-group"}' \
   -blockdev '{"driver":"raw","file":{"driver":"file","filename":"/usr/share/pve-edk2-firmware//OVMF_CODE_4M.fd"},"node-name":"pflash0","read-only":true}' \
-  -blockdev '{"detect-zeroes":"on","discard":"ignore","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"raw","file":{"aio":"io_uring","cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"file","filename":"/var/lib/vz/images/100/vm-100-disk-0.raw","node-name":"e1175f2a490414e7c53337589fde17a","read-only":false},"node-name":"f1175f2a490414e7c53337589fde17a","read-only":false,"size":540672},"node-name":"drive-efidisk0","read-only":false,"throttle-group":"throttle-drive-efidisk0"}' \
+  -blockdev '{"detect-zeroes":"on","discard":"ignore","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"raw","file":{"aio":"io_uring","cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"file","filename":"/var/lib/vz/vms/100/vol-vm-100-disk-0.raw","node-name":"e1175f2a490414e7c53337589fde17a","read-only":false},"node-name":"f1175f2a490414e7c53337589fde17a","read-only":false,"size":540672},"node-name":"drive-efidisk0","read-only":false,"throttle-group":"throttle-drive-efidisk0"}' \
   -smp '1,sockets=1,cores=1,maxcpus=1' \
   -nodefaults \
   -boot 'menu=on,strict=on,reboot-timeout=1000,splash=/usr/share/qemu-server/bootsplash.jpg' \
diff --git a/src/test/cfg2cmd/efidisk-on-rbd.conf b/src/test/cfg2cmd/efidisk-on-rbd.conf
index 1958fe61..d6d9361e 100644
--- a/src/test/cfg2cmd/efidisk-on-rbd.conf
+++ b/src/test/cfg2cmd/efidisk-on-rbd.conf
@@ -2,7 +2,7 @@
 bios: ovmf
 bootdisk: scsi0
 cores: 1
-efidisk0: rbd-store:vm-100-disk-1,size=128K
+efidisk0: rbd-store:vol-vm-100-disk-1,size=128K
 memory: 512
 net0: virtio=2E:01:68:F9:9C:87,bridge=vmbr0
 numa: 1
diff --git a/src/test/cfg2cmd/efidisk-on-rbd.conf.cmd b/src/test/cfg2cmd/efidisk-on-rbd.conf.cmd
index 5d0c8aff..dcab512c 100644
--- a/src/test/cfg2cmd/efidisk-on-rbd.conf.cmd
+++ b/src/test/cfg2cmd/efidisk-on-rbd.conf.cmd
@@ -11,7 +11,7 @@
   -smbios 'type=1,uuid=3dd750ce-d910-44d0-9493-525c0be4e688' \
   -object '{"id":"throttle-drive-efidisk0","limits":{},"qom-type":"throttle-group"}' \
   -blockdev '{"driver":"raw","file":{"driver":"file","filename":"/usr/share/pve-edk2-firmware//OVMF_CODE.fd"},"node-name":"pflash0","read-only":true}' \
-  -blockdev '{"detect-zeroes":"on","discard":"ignore","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"raw","file":{"auth-client-required":["none"],"cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"rbd","image":"vm-100-disk-1","node-name":"eeb8f022b5551ad1d795611f112c767","pool":"cpool","read-only":false,"server":[{"host":"127.0.0.42","port":"3300"},{"host":"127.0.0.21","port":"3300"},{"host":"::1","port":"3300"}]},"node-name":"feb8f022b5551ad1d795611f112c767","read-only":false,"size":131072},"node-name":"drive-efidisk0","read-only":false,"throttle-group":"throttle-drive-efidisk0"}' \
+  -blockdev '{"detect-zeroes":"on","discard":"ignore","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"raw","file":{"auth-client-required":["none"],"cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"rbd","image":"vol-vm-100-disk-1","node-name":"eeb8f022b5551ad1d795611f112c767","pool":"cpool","read-only":false,"server":[{"host":"127.0.0.42","port":"3300"},{"host":"127.0.0.21","port":"3300"},{"host":"::1","port":"3300"}]},"node-name":"feb8f022b5551ad1d795611f112c767","read-only":false,"size":131072},"node-name":"drive-efidisk0","read-only":false,"throttle-group":"throttle-drive-efidisk0"}' \
   -smp '1,sockets=1,cores=1,maxcpus=1' \
   -nodefaults \
   -boot 'menu=on,strict=on,reboot-timeout=1000,splash=/usr/share/qemu-server/bootsplash.jpg' \
diff --git a/src/test/cfg2cmd/i440fx-win10-hostpci.conf b/src/test/cfg2cmd/i440fx-win10-hostpci.conf
index 2ab2dda1..3585ce7e 100644
--- a/src/test/cfg2cmd/i440fx-win10-hostpci.conf
+++ b/src/test/cfg2cmd/i440fx-win10-hostpci.conf
@@ -2,7 +2,7 @@
 bios: ovmf
 bootdisk: scsi0
 cores: 1
-efidisk0: local:100/vm-100-disk-1.qcow2,size=128K
+efidisk0: local:100/vol-vm-100-disk-1.qcow2,size=128K
 hostpci0: 0f:f2.0
 machine: pc
 memory: 512
diff --git a/src/test/cfg2cmd/i440fx-win10-hostpci.conf.cmd b/src/test/cfg2cmd/i440fx-win10-hostpci.conf.cmd
index ca648dab..437b1772 100644
--- a/src/test/cfg2cmd/i440fx-win10-hostpci.conf.cmd
+++ b/src/test/cfg2cmd/i440fx-win10-hostpci.conf.cmd
@@ -10,7 +10,7 @@
   -daemonize \
   -smbios 'type=1,uuid=3dd750ce-d910-44d0-9493-525c0be4e687' \
   -drive 'if=pflash,unit=0,format=raw,readonly=on,file=/usr/share/pve-edk2-firmware//OVMF_CODE.fd' \
-  -drive 'if=pflash,unit=1,id=drive-efidisk0,format=qcow2,file=/var/lib/vz/images/100/vm-100-disk-1.qcow2' \
+  -drive 'if=pflash,unit=1,id=drive-efidisk0,format=qcow2,file=/var/lib/vz/vms/100/vol-vm-100-disk-1.qcow2' \
   -smp '2,sockets=2,cores=1,maxcpus=2' \
   -nodefaults \
   -boot 'menu=on,strict=on,reboot-timeout=1000,splash=/usr/share/qemu-server/bootsplash.jpg' \
diff --git a/src/test/cfg2cmd/ide-no-media-error.conf b/src/test/cfg2cmd/ide-no-media-error.conf
index 48971463..e42771a2 100644
--- a/src/test/cfg2cmd/ide-no-media-error.conf
+++ b/src/test/cfg2cmd/ide-no-media-error.conf
@@ -9,7 +9,7 @@ ide3: cifs-store:iso/three.iso,size=112M
 memory: 512
 net0: virtio=2E:01:68:F9:9C:87,bridge=vmbr0
 ostype: l26
-scsi0: local:100/vm-100-disk-2.qcow2,size=10G
+scsi0: local:100/vol-vm-100-disk-2.qcow2,size=10G
 scsihw: virtio-scsi-pci
 smbios1: uuid=3dd750ce-d910-44d0-9493-525c0be4e687
 vmgenid: 54d1c06c-8f5b-440f-b5b2-6eab1380e13d
diff --git a/src/test/cfg2cmd/ide.conf b/src/test/cfg2cmd/ide.conf
index 8f565ab1..a2cb70bf 100644
--- a/src/test/cfg2cmd/ide.conf
+++ b/src/test/cfg2cmd/ide.conf
@@ -8,7 +8,7 @@ ide3: cifs-store:iso/three.iso,media=cdrom,size=112M
 memory: 512
 net0: virtio=2E:01:68:F9:9C:87,bridge=vmbr0
 ostype: l26
-scsi0: local:100/vm-100-disk-2.qcow2,size=10G
+scsi0: local:100/vol-vm-100-disk-2.qcow2,size=10G
 scsihw: virtio-scsi-pci
 smbios1: uuid=3dd750ce-d910-44d0-9493-525c0be4e687
 vmgenid: 54d1c06c-8f5b-440f-b5b2-6eab1380e13d
diff --git a/src/test/cfg2cmd/ide.conf.cmd b/src/test/cfg2cmd/ide.conf.cmd
index 6b5a52a9..73dfdfab 100644
--- a/src/test/cfg2cmd/ide.conf.cmd
+++ b/src/test/cfg2cmd/ide.conf.cmd
@@ -39,7 +39,7 @@
   -blockdev '{"driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"driver":"raw","file":{"aio":"threads","cache":{"direct":false,"no-flush":false},"driver":"file","filename":"/mnt/pve/cifs-store/template/iso/three.iso","node-name":"e35557bae4bcbf9edc9f7ff7f132f30","read-only":true},"node-name":"f35557bae4bcbf9edc9f7ff7f132f30","read-only":true},"node-name":"drive-ide3","read-only":true,"throttle-group":"throttle-drive-ide3"}' \
   -device 'ide-cd,bus=ide.1,unit=1,drive=drive-ide3,id=ide3,bootindex=203' \
   -device 'virtio-scsi-pci,id=scsihw0,bus=pci.0,addr=0x5' \
-  -blockdev '{"detect-zeroes":"on","discard":"ignore","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"file","filename":"/var/lib/vz/images/100/vm-100-disk-2.qcow2","node-name":"ec11e0572184321efc5835152b95d5d","read-only":false},"node-name":"fc11e0572184321efc5835152b95d5d","read-only":false},"node-name":"drive-scsi0","read-only":false,"throttle-group":"throttle-drive-scsi0"}' \
+  -blockdev '{"detect-zeroes":"on","discard":"ignore","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"file","filename":"/var/lib/vz/vms/100/vol-vm-100-disk-2.qcow2","node-name":"ec11e0572184321efc5835152b95d5d","read-only":false},"node-name":"fc11e0572184321efc5835152b95d5d","read-only":false},"node-name":"drive-scsi0","read-only":false,"throttle-group":"throttle-drive-scsi0"}' \
   -device 'scsi-hd,bus=scsihw0.0,channel=0,scsi-id=0,lun=0,drive=drive-scsi0,id=scsi0,device_id=drive-scsi0,bootindex=100,write-cache=on' \
   -netdev 'type=tap,id=net0,ifname=tap8006i0,script=/usr/libexec/qemu-server/pve-bridge,downscript=/usr/libexec/qemu-server/pve-bridgedown,vhost=on' \
   -device 'virtio-net-pci,mac=2E:01:68:F9:9C:87,netdev=net0,bus=pci.0,addr=0x12,id=net0,rx_queue_size=1024,tx_queue_size=256,bootindex=300' \
diff --git a/src/test/cfg2cmd/pinned-version-pxe-pve.conf b/src/test/cfg2cmd/pinned-version-pxe-pve.conf
index 36169d7b..dc9bb4f5 100644
--- a/src/test/cfg2cmd/pinned-version-pxe-pve.conf
+++ b/src/test/cfg2cmd/pinned-version-pxe-pve.conf
@@ -8,7 +8,7 @@ name: pinned
 net0: virtio=A2:C0:43:77:08:A1,bridge=vmbr0
 numa: 0
 ostype: l26
-scsi0: local:8006/vm-8006-disk-0.raw,discard=on,size=104858K
+scsi0: local:8006/vol-vm-8006-disk-0.raw,discard=on,size=104858K
 scsihw: virtio-scsi-pci
 smbios1: uuid=c7fdd046-fefc-11e9-832e-770e1d5636a0
 sockets: 1
diff --git a/src/test/cfg2cmd/pinned-version-pxe-pve.conf.cmd b/src/test/cfg2cmd/pinned-version-pxe-pve.conf.cmd
index 7301e3fa..b1e7e054 100644
--- a/src/test/cfg2cmd/pinned-version-pxe-pve.conf.cmd
+++ b/src/test/cfg2cmd/pinned-version-pxe-pve.conf.cmd
@@ -26,7 +26,7 @@
   -drive 'if=none,id=drive-ide2,media=cdrom,aio=io_uring' \
   -device 'ide-cd,bus=ide.1,unit=0,drive=drive-ide2,id=ide2,bootindex=200' \
   -device 'virtio-scsi-pci,id=scsihw0,bus=pci.0,addr=0x5' \
-  -drive 'file=/var/lib/vz/images/8006/vm-8006-disk-0.raw,if=none,id=drive-scsi0,discard=on,format=raw,cache=none,aio=io_uring,detect-zeroes=unmap' \
+  -drive 'file=/var/lib/vz/vms/8006/vol-vm-8006-disk-0.raw,if=none,id=drive-scsi0,discard=on,format=raw,cache=none,aio=io_uring,detect-zeroes=unmap' \
   -device 'scsi-hd,bus=scsihw0.0,channel=0,scsi-id=0,lun=0,drive=drive-scsi0,id=scsi0,bootindex=100' \
   -netdev 'type=tap,id=net0,ifname=tap8006i0,script=/usr/libexec/qemu-server/pve-bridge,downscript=/usr/libexec/qemu-server/pve-bridgedown,vhost=on' \
   -device 'virtio-net-pci,mac=A2:C0:43:77:08:A1,netdev=net0,bus=pci.0,addr=0x12,id=net0,bootindex=300,romfile=pxe-virtio.rom' \
diff --git a/src/test/cfg2cmd/pinned-version-pxe.conf b/src/test/cfg2cmd/pinned-version-pxe.conf
index 738868f2..40ed2cdf 100644
--- a/src/test/cfg2cmd/pinned-version-pxe.conf
+++ b/src/test/cfg2cmd/pinned-version-pxe.conf
@@ -8,7 +8,7 @@ name: pinned
 net0: virtio=A2:C0:43:77:08:A1,bridge=vmbr0
 numa: 0
 ostype: l26
-scsi0: local:8006/vm-8006-disk-0.raw,discard=on,size=104858K
+scsi0: local:8006/vol-vm-8006-disk-0.raw,discard=on,size=104858K
 scsihw: virtio-scsi-pci
 smbios1: uuid=c7fdd046-fefc-11e9-832e-770e1d5636a0
 sockets: 1
diff --git a/src/test/cfg2cmd/pinned-version-pxe.conf.cmd b/src/test/cfg2cmd/pinned-version-pxe.conf.cmd
index 89be8c69..4fd9db4d 100644
--- a/src/test/cfg2cmd/pinned-version-pxe.conf.cmd
+++ b/src/test/cfg2cmd/pinned-version-pxe.conf.cmd
@@ -24,7 +24,7 @@
   -drive 'if=none,id=drive-ide2,media=cdrom,aio=io_uring' \
   -device 'ide-cd,bus=ide.1,unit=0,drive=drive-ide2,id=ide2,bootindex=200' \
   -device 'virtio-scsi-pci,id=scsihw0,bus=pci.0,addr=0x5' \
-  -drive 'file=/var/lib/vz/images/8006/vm-8006-disk-0.raw,if=none,id=drive-scsi0,discard=on,format=raw,cache=none,aio=io_uring,detect-zeroes=unmap' \
+  -drive 'file=/var/lib/vz/vms/8006/vol-vm-8006-disk-0.raw,if=none,id=drive-scsi0,discard=on,format=raw,cache=none,aio=io_uring,detect-zeroes=unmap' \
   -device 'scsi-hd,bus=scsihw0.0,channel=0,scsi-id=0,lun=0,drive=drive-scsi0,id=scsi0,bootindex=100' \
   -netdev 'type=tap,id=net0,ifname=tap8006i0,script=/usr/libexec/qemu-server/pve-bridge,downscript=/usr/libexec/qemu-server/pve-bridgedown,vhost=on' \
   -device 'virtio-net-pci,mac=A2:C0:43:77:08:A1,netdev=net0,bus=pci.0,addr=0x12,id=net0,bootindex=300,romfile=pxe-virtio.rom' \
diff --git a/src/test/cfg2cmd/pinned-version.conf b/src/test/cfg2cmd/pinned-version.conf
index 61191836..3a833151 100644
--- a/src/test/cfg2cmd/pinned-version.conf
+++ b/src/test/cfg2cmd/pinned-version.conf
@@ -8,7 +8,7 @@ name: pinned
 net0: virtio=A2:C0:43:77:08:A1,bridge=vmbr0
 numa: 0
 ostype: l26
-scsi0: local:8006/vm-8006-disk-0.raw,discard=on,size=104858K
+scsi0: local:8006/vol-vm-8006-disk-0.raw,discard=on,size=104858K
 scsihw: virtio-scsi-pci
 smbios1: uuid=c7fdd046-fefc-11e9-832e-770e1d5636a0
 sockets: 1
diff --git a/src/test/cfg2cmd/pinned-version.conf.cmd b/src/test/cfg2cmd/pinned-version.conf.cmd
index da161ad9..397cee4b 100644
--- a/src/test/cfg2cmd/pinned-version.conf.cmd
+++ b/src/test/cfg2cmd/pinned-version.conf.cmd
@@ -24,7 +24,7 @@
   -drive 'if=none,id=drive-ide2,media=cdrom,aio=io_uring' \
   -device 'ide-cd,bus=ide.1,unit=0,drive=drive-ide2,id=ide2,bootindex=200' \
   -device 'virtio-scsi-pci,id=scsihw0,bus=pci.0,addr=0x5' \
-  -drive 'file=/var/lib/vz/images/8006/vm-8006-disk-0.raw,if=none,id=drive-scsi0,discard=on,format=raw,cache=none,aio=io_uring,detect-zeroes=unmap' \
+  -drive 'file=/var/lib/vz/vms/8006/vol-vm-8006-disk-0.raw,if=none,id=drive-scsi0,discard=on,format=raw,cache=none,aio=io_uring,detect-zeroes=unmap' \
   -device 'scsi-hd,bus=scsihw0.0,channel=0,scsi-id=0,lun=0,drive=drive-scsi0,id=scsi0,bootindex=100' \
   -netdev 'type=tap,id=net0,ifname=tap8006i0,script=/usr/libexec/qemu-server/pve-bridge,downscript=/usr/libexec/qemu-server/pve-bridgedown,vhost=on' \
   -device 'virtio-net-pci,mac=A2:C0:43:77:08:A1,netdev=net0,bus=pci.0,addr=0x12,id=net0,bootindex=300' \
diff --git a/src/test/cfg2cmd/q35-ide.conf b/src/test/cfg2cmd/q35-ide.conf
index bfef0a14..00fc52ef 100644
--- a/src/test/cfg2cmd/q35-ide.conf
+++ b/src/test/cfg2cmd/q35-ide.conf
@@ -9,7 +9,7 @@ machine: q35
 memory: 512
 net0: virtio=2E:01:68:F9:9C:87,bridge=vmbr0
 ostype: l26
-scsi0: local:100/vm-100-disk-2.qcow2,size=10G
+scsi0: local:100/vol-vm-100-disk-2.qcow2,size=10G
 scsihw: virtio-scsi-pci
 smbios1: uuid=3dd750ce-d910-44d0-9493-525c0be4e687
 vmgenid: 54d1c06c-8f5b-440f-b5b2-6eab1380e13d
diff --git a/src/test/cfg2cmd/q35-ide.conf.cmd b/src/test/cfg2cmd/q35-ide.conf.cmd
index 475e58d9..0a5ffd0e 100644
--- a/src/test/cfg2cmd/q35-ide.conf.cmd
+++ b/src/test/cfg2cmd/q35-ide.conf.cmd
@@ -38,7 +38,7 @@
   -blockdev '{"driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"driver":"raw","file":{"aio":"threads","cache":{"direct":false,"no-flush":false},"driver":"file","filename":"/mnt/pve/cifs-store/template/iso/three.iso","node-name":"e35557bae4bcbf9edc9f7ff7f132f30","read-only":true},"node-name":"f35557bae4bcbf9edc9f7ff7f132f30","read-only":true},"node-name":"drive-ide3","read-only":true,"throttle-group":"throttle-drive-ide3"}' \
   -device 'ide-cd,bus=ide.3,unit=0,drive=drive-ide3,id=ide3,bootindex=203' \
   -device 'virtio-scsi-pci,id=scsihw0,bus=pci.0,addr=0x5' \
-  -blockdev '{"detect-zeroes":"on","discard":"ignore","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"file","filename":"/var/lib/vz/images/100/vm-100-disk-2.qcow2","node-name":"ec11e0572184321efc5835152b95d5d","read-only":false},"node-name":"fc11e0572184321efc5835152b95d5d","read-only":false},"node-name":"drive-scsi0","read-only":false,"throttle-group":"throttle-drive-scsi0"}' \
+  -blockdev '{"detect-zeroes":"on","discard":"ignore","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"file","filename":"/var/lib/vz/vms/100/vol-vm-100-disk-2.qcow2","node-name":"ec11e0572184321efc5835152b95d5d","read-only":false},"node-name":"fc11e0572184321efc5835152b95d5d","read-only":false},"node-name":"drive-scsi0","read-only":false,"throttle-group":"throttle-drive-scsi0"}' \
   -device 'scsi-hd,bus=scsihw0.0,channel=0,scsi-id=0,lun=0,drive=drive-scsi0,id=scsi0,device_id=drive-scsi0,bootindex=100,write-cache=on' \
   -netdev 'type=tap,id=net0,ifname=tap8006i0,script=/usr/libexec/qemu-server/pve-bridge,downscript=/usr/libexec/qemu-server/pve-bridgedown,vhost=on' \
   -device 'virtio-net-pci,mac=2E:01:68:F9:9C:87,netdev=net0,bus=pci.0,addr=0x12,id=net0,rx_queue_size=1024,tx_queue_size=256,bootindex=300' \
diff --git a/src/test/cfg2cmd/q35-linux-hostpci-mapping.conf b/src/test/cfg2cmd/q35-linux-hostpci-mapping.conf
index 2366fc4a..ef66f9a7 100644
--- a/src/test/cfg2cmd/q35-linux-hostpci-mapping.conf
+++ b/src/test/cfg2cmd/q35-linux-hostpci-mapping.conf
@@ -2,7 +2,7 @@
 bios: ovmf
 bootdisk: scsi0
 cores: 1
-efidisk0: local:100/vm-100-disk-1.qcow2,size=128K
+efidisk0: local:100/vol-vm-100-disk-1.qcow2,size=128K
 hostpci0: mapping=someNic
 hostpci1: mapping=someGpu,mdev=some-model
 hostpci2: mapping=someNic
diff --git a/src/test/cfg2cmd/q35-linux-hostpci-mapping.conf.cmd b/src/test/cfg2cmd/q35-linux-hostpci-mapping.conf.cmd
index b0c3e587..2c3e4539 100644
--- a/src/test/cfg2cmd/q35-linux-hostpci-mapping.conf.cmd
+++ b/src/test/cfg2cmd/q35-linux-hostpci-mapping.conf.cmd
@@ -11,7 +11,7 @@
   -smbios 'type=1,uuid=3dd750ce-d910-44d0-9493-525c0be4e687' \
   -object '{"id":"throttle-drive-efidisk0","limits":{},"qom-type":"throttle-group"}' \
   -blockdev '{"driver":"raw","file":{"driver":"file","filename":"/usr/share/pve-edk2-firmware//OVMF_CODE.fd"},"node-name":"pflash0","read-only":true}' \
-  -blockdev '{"detect-zeroes":"on","discard":"ignore","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"file","filename":"/var/lib/vz/images/100/vm-100-disk-1.qcow2","node-name":"e70e3017c5a79fdee5a04aa92ac1e9c","read-only":false},"node-name":"f70e3017c5a79fdee5a04aa92ac1e9c","read-only":false},"node-name":"drive-efidisk0","read-only":false,"throttle-group":"throttle-drive-efidisk0"}' \
+  -blockdev '{"detect-zeroes":"on","discard":"ignore","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"file","filename":"/var/lib/vz/vms/100/vol-vm-100-disk-1.qcow2","node-name":"e70e3017c5a79fdee5a04aa92ac1e9c","read-only":false},"node-name":"f70e3017c5a79fdee5a04aa92ac1e9c","read-only":false},"node-name":"drive-efidisk0","read-only":false,"throttle-group":"throttle-drive-efidisk0"}' \
   -global 'ICH9-LPC.acpi-pci-hotplug-with-bridge-support=off' \
   -smp '2,sockets=2,cores=1,maxcpus=2' \
   -nodefaults \
diff --git a/src/test/cfg2cmd/q35-linux-hostpci-multifunction.conf b/src/test/cfg2cmd/q35-linux-hostpci-multifunction.conf
index 5f1a3ff7..9054a025 100644
--- a/src/test/cfg2cmd/q35-linux-hostpci-multifunction.conf
+++ b/src/test/cfg2cmd/q35-linux-hostpci-multifunction.conf
@@ -2,7 +2,7 @@
 bios: ovmf
 bootdisk: scsi0
 cores: 1
-efidisk0: local:100/vm-100-disk-1.qcow2,size=128K
+efidisk0: local:100/vol-vm-100-disk-1.qcow2,size=128K
 hostpci0: f0:43
 hostpci1: 1234:f0:43
 machine: q35
diff --git a/src/test/cfg2cmd/q35-linux-hostpci-multifunction.conf.cmd b/src/test/cfg2cmd/q35-linux-hostpci-multifunction.conf.cmd
index b4aa46f5..219af1c4 100644
--- a/src/test/cfg2cmd/q35-linux-hostpci-multifunction.conf.cmd
+++ b/src/test/cfg2cmd/q35-linux-hostpci-multifunction.conf.cmd
@@ -11,7 +11,7 @@
   -smbios 'type=1,uuid=3dd750ce-d910-44d0-9493-525c0be4e687' \
   -object '{"id":"throttle-drive-efidisk0","limits":{},"qom-type":"throttle-group"}' \
   -blockdev '{"driver":"raw","file":{"driver":"file","filename":"/usr/share/pve-edk2-firmware//OVMF_CODE.fd"},"node-name":"pflash0","read-only":true}' \
-  -blockdev '{"detect-zeroes":"on","discard":"ignore","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"file","filename":"/var/lib/vz/images/100/vm-100-disk-1.qcow2","node-name":"e70e3017c5a79fdee5a04aa92ac1e9c","read-only":false},"node-name":"f70e3017c5a79fdee5a04aa92ac1e9c","read-only":false},"node-name":"drive-efidisk0","read-only":false,"throttle-group":"throttle-drive-efidisk0"}' \
+  -blockdev '{"detect-zeroes":"on","discard":"ignore","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"file","filename":"/var/lib/vz/vms/100/vol-vm-100-disk-1.qcow2","node-name":"e70e3017c5a79fdee5a04aa92ac1e9c","read-only":false},"node-name":"f70e3017c5a79fdee5a04aa92ac1e9c","read-only":false},"node-name":"drive-efidisk0","read-only":false,"throttle-group":"throttle-drive-efidisk0"}' \
   -global 'ICH9-LPC.acpi-pci-hotplug-with-bridge-support=off' \
   -smp '2,sockets=2,cores=1,maxcpus=2' \
   -nodefaults \
diff --git a/src/test/cfg2cmd/q35-linux-hostpci-x-pci-overrides.conf b/src/test/cfg2cmd/q35-linux-hostpci-x-pci-overrides.conf
index b726a3a4..76190056 100644
--- a/src/test/cfg2cmd/q35-linux-hostpci-x-pci-overrides.conf
+++ b/src/test/cfg2cmd/q35-linux-hostpci-x-pci-overrides.conf
@@ -2,7 +2,7 @@
 bios: ovmf
 bootdisk: scsi0
 cores: 1
-efidisk0: local:100/vm-100-disk-1.qcow2,size=128K
+efidisk0: local:100/vol-vm-100-disk-1.qcow2,size=128K
 hostpci0: 00:ff.1,vendor-id=0x1234,device-id=0x5678,sub-vendor-id=0x2233,sub-device-id=0x0000
 hostpci1: d0:13.0,pcie=1,vendor-id=0x1234,device-id=0x5678
 machine: q35
diff --git a/src/test/cfg2cmd/q35-linux-hostpci-x-pci-overrides.conf.cmd b/src/test/cfg2cmd/q35-linux-hostpci-x-pci-overrides.conf.cmd
index 6c4937c7..bfdba6d2 100644
--- a/src/test/cfg2cmd/q35-linux-hostpci-x-pci-overrides.conf.cmd
+++ b/src/test/cfg2cmd/q35-linux-hostpci-x-pci-overrides.conf.cmd
@@ -11,7 +11,7 @@
   -smbios 'type=1,uuid=3dd750ce-d910-44d0-9493-525c0be4e687' \
   -object '{"id":"throttle-drive-efidisk0","limits":{},"qom-type":"throttle-group"}' \
   -blockdev '{"driver":"raw","file":{"driver":"file","filename":"/usr/share/pve-edk2-firmware//OVMF_CODE.fd"},"node-name":"pflash0","read-only":true}' \
-  -blockdev '{"detect-zeroes":"on","discard":"ignore","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"file","filename":"/var/lib/vz/images/100/vm-100-disk-1.qcow2","node-name":"e70e3017c5a79fdee5a04aa92ac1e9c","read-only":false},"node-name":"f70e3017c5a79fdee5a04aa92ac1e9c","read-only":false},"node-name":"drive-efidisk0","read-only":false,"throttle-group":"throttle-drive-efidisk0"}' \
+  -blockdev '{"detect-zeroes":"on","discard":"ignore","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"file","filename":"/var/lib/vz/vms/100/vol-vm-100-disk-1.qcow2","node-name":"e70e3017c5a79fdee5a04aa92ac1e9c","read-only":false},"node-name":"f70e3017c5a79fdee5a04aa92ac1e9c","read-only":false},"node-name":"drive-efidisk0","read-only":false,"throttle-group":"throttle-drive-efidisk0"}' \
   -global 'ICH9-LPC.acpi-pci-hotplug-with-bridge-support=off' \
   -smp '2,sockets=2,cores=1,maxcpus=2' \
   -nodefaults \
diff --git a/src/test/cfg2cmd/q35-linux-hostpci.conf b/src/test/cfg2cmd/q35-linux-hostpci.conf
index 7290120a..fb5b299d 100644
--- a/src/test/cfg2cmd/q35-linux-hostpci.conf
+++ b/src/test/cfg2cmd/q35-linux-hostpci.conf
@@ -2,7 +2,7 @@
 bios: ovmf
 bootdisk: scsi0
 cores: 1
-efidisk0: local:100/vm-100-disk-1.qcow2,size=128K
+efidisk0: local:100/vol-vm-100-disk-1.qcow2,size=128K
 hostpci0: 00:ff.1
 hostpci1: d0:13.0,pcie=1
 hostpci2: 00:f4.0
diff --git a/src/test/cfg2cmd/q35-linux-hostpci.conf.cmd b/src/test/cfg2cmd/q35-linux-hostpci.conf.cmd
index 19e6ba3c..b6edad85 100644
--- a/src/test/cfg2cmd/q35-linux-hostpci.conf.cmd
+++ b/src/test/cfg2cmd/q35-linux-hostpci.conf.cmd
@@ -11,7 +11,7 @@
   -smbios 'type=1,uuid=3dd750ce-d910-44d0-9493-525c0be4e687' \
   -object '{"id":"throttle-drive-efidisk0","limits":{},"qom-type":"throttle-group"}' \
   -blockdev '{"driver":"raw","file":{"driver":"file","filename":"/usr/share/pve-edk2-firmware//OVMF_CODE.fd"},"node-name":"pflash0","read-only":true}' \
-  -blockdev '{"detect-zeroes":"on","discard":"ignore","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"file","filename":"/var/lib/vz/images/100/vm-100-disk-1.qcow2","node-name":"e70e3017c5a79fdee5a04aa92ac1e9c","read-only":false},"node-name":"f70e3017c5a79fdee5a04aa92ac1e9c","read-only":false},"node-name":"drive-efidisk0","read-only":false,"throttle-group":"throttle-drive-efidisk0"}' \
+  -blockdev '{"detect-zeroes":"on","discard":"ignore","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"file","filename":"/var/lib/vz/vms/100/vol-vm-100-disk-1.qcow2","node-name":"e70e3017c5a79fdee5a04aa92ac1e9c","read-only":false},"node-name":"f70e3017c5a79fdee5a04aa92ac1e9c","read-only":false},"node-name":"drive-efidisk0","read-only":false,"throttle-group":"throttle-drive-efidisk0"}' \
   -global 'ICH9-LPC.acpi-pci-hotplug-with-bridge-support=off' \
   -smp '2,sockets=2,cores=1,maxcpus=2' \
   -nodefaults \
diff --git a/src/test/cfg2cmd/q35-simple-6.0.conf b/src/test/cfg2cmd/q35-simple-6.0.conf
index d482dfea..19bb6fae 100644
--- a/src/test/cfg2cmd/q35-simple-6.0.conf
+++ b/src/test/cfg2cmd/q35-simple-6.0.conf
@@ -2,7 +2,7 @@
 bios: ovmf
 bootdisk: scsi0
 cores: 2
-efidisk0: local:100/vm-100-disk-1.qcow2,size=128K
+efidisk0: local:100/vol-vm-100-disk-1.qcow2,size=128K
 machine: pc-q35-6.0
 memory: 512
 net0: virtio=2E:01:68:F9:9C:87,bridge=vmbr0
diff --git a/src/test/cfg2cmd/q35-simple-6.0.conf.cmd b/src/test/cfg2cmd/q35-simple-6.0.conf.cmd
index 858dd11c..2e4885df 100644
--- a/src/test/cfg2cmd/q35-simple-6.0.conf.cmd
+++ b/src/test/cfg2cmd/q35-simple-6.0.conf.cmd
@@ -10,7 +10,7 @@
   -daemonize \
   -smbios 'type=1,uuid=3dd750ce-d910-44d0-9493-525c0be4e687' \
   -drive 'if=pflash,unit=0,format=raw,readonly=on,file=/usr/share/pve-edk2-firmware//OVMF_CODE.fd' \
-  -drive 'if=pflash,unit=1,id=drive-efidisk0,format=qcow2,file=/var/lib/vz/images/100/vm-100-disk-1.qcow2' \
+  -drive 'if=pflash,unit=1,id=drive-efidisk0,format=qcow2,file=/var/lib/vz/vms/100/vol-vm-100-disk-1.qcow2' \
   -smp '2,sockets=1,cores=2,maxcpus=2' \
   -nodefaults \
   -boot 'menu=on,strict=on,reboot-timeout=1000,splash=/usr/share/qemu-server/bootsplash.jpg' \
diff --git a/src/test/cfg2cmd/q35-simple-7.0.conf b/src/test/cfg2cmd/q35-simple-7.0.conf
index 9e3097ee..01029bc2 100644
--- a/src/test/cfg2cmd/q35-simple-7.0.conf
+++ b/src/test/cfg2cmd/q35-simple-7.0.conf
@@ -2,7 +2,7 @@
 bios: ovmf
 bootdisk: scsi0
 cores: 2
-efidisk0: local:100/vm-100-disk-1.qcow2,size=128K
+efidisk0: local:100/vol-vm-100-disk-1.qcow2,size=128K
 machine: pc-q35-7.0
 meta: creation-qemu=6.1
 memory: 512
diff --git a/src/test/cfg2cmd/q35-simple-7.0.conf.cmd b/src/test/cfg2cmd/q35-simple-7.0.conf.cmd
index 7a241d09..af4885e5 100644
--- a/src/test/cfg2cmd/q35-simple-7.0.conf.cmd
+++ b/src/test/cfg2cmd/q35-simple-7.0.conf.cmd
@@ -10,7 +10,7 @@
   -daemonize \
   -smbios 'type=1,uuid=3dd750ce-d910-44d0-9493-525c0be4e687' \
   -drive 'if=pflash,unit=0,format=raw,readonly=on,file=/usr/share/pve-edk2-firmware//OVMF_CODE.fd' \
-  -drive 'if=pflash,unit=1,id=drive-efidisk0,format=qcow2,file=/var/lib/vz/images/100/vm-100-disk-1.qcow2' \
+  -drive 'if=pflash,unit=1,id=drive-efidisk0,format=qcow2,file=/var/lib/vz/vms/100/vol-vm-100-disk-1.qcow2' \
   -smp '2,sockets=1,cores=2,maxcpus=2' \
   -nodefaults \
   -boot 'menu=on,strict=on,reboot-timeout=1000,splash=/usr/share/qemu-server/bootsplash.jpg' \
diff --git a/src/test/cfg2cmd/q35-simple-pinned-6.1.conf b/src/test/cfg2cmd/q35-simple-pinned-6.1.conf
index 9ecfe006..5028e8e4 100644
--- a/src/test/cfg2cmd/q35-simple-pinned-6.1.conf
+++ b/src/test/cfg2cmd/q35-simple-pinned-6.1.conf
@@ -3,7 +3,7 @@
 bios: ovmf
 bootdisk: scsi0
 cores: 2
-efidisk0: local:100/vm-100-disk-1.qcow2,size=128K
+efidisk0: local:100/vol-vm-100-disk-1.qcow2,size=128K
 machine: pc-q35-6.1
 memory: 512
 net0: virtio=2E:01:68:F9:9C:87,bridge=vmbr0
diff --git a/src/test/cfg2cmd/q35-simple-pinned-6.1.conf.cmd b/src/test/cfg2cmd/q35-simple-pinned-6.1.conf.cmd
index 24a2e299..dd33a0a7 100644
--- a/src/test/cfg2cmd/q35-simple-pinned-6.1.conf.cmd
+++ b/src/test/cfg2cmd/q35-simple-pinned-6.1.conf.cmd
@@ -10,7 +10,7 @@
   -daemonize \
   -smbios 'type=1,uuid=3dd750ce-d910-44d0-9493-525c0be4e687' \
   -drive 'if=pflash,unit=0,format=raw,readonly=on,file=/usr/share/pve-edk2-firmware//OVMF_CODE.fd' \
-  -drive 'if=pflash,unit=1,id=drive-efidisk0,format=qcow2,file=/var/lib/vz/images/100/vm-100-disk-1.qcow2' \
+  -drive 'if=pflash,unit=1,id=drive-efidisk0,format=qcow2,file=/var/lib/vz/vms/100/vol-vm-100-disk-1.qcow2' \
   -smp '2,sockets=1,cores=2,maxcpus=2' \
   -nodefaults \
   -boot 'menu=on,strict=on,reboot-timeout=1000,splash=/usr/share/qemu-server/bootsplash.jpg' \
diff --git a/src/test/cfg2cmd/q35-simple.conf b/src/test/cfg2cmd/q35-simple.conf
index 21f78122..27fafed2 100644
--- a/src/test/cfg2cmd/q35-simple.conf
+++ b/src/test/cfg2cmd/q35-simple.conf
@@ -3,7 +3,7 @@
 bios: ovmf
 bootdisk: scsi0
 cores: 2
-efidisk0: local:100/vm-100-disk-1.qcow2,size=128K
+efidisk0: local:100/vol-vm-100-disk-1.qcow2,size=128K
 machine: q35
 memory: 512
 net0: virtio=2E:01:68:F9:9C:87,bridge=vmbr0
diff --git a/src/test/cfg2cmd/q35-simple.conf.cmd b/src/test/cfg2cmd/q35-simple.conf.cmd
index e3f712c3..deed9c2d 100644
--- a/src/test/cfg2cmd/q35-simple.conf.cmd
+++ b/src/test/cfg2cmd/q35-simple.conf.cmd
@@ -11,7 +11,7 @@
   -smbios 'type=1,uuid=3dd750ce-d910-44d0-9493-525c0be4e687' \
   -object '{"id":"throttle-drive-efidisk0","limits":{},"qom-type":"throttle-group"}' \
   -blockdev '{"driver":"raw","file":{"driver":"file","filename":"/usr/share/pve-edk2-firmware//OVMF_CODE.fd"},"node-name":"pflash0","read-only":true}' \
-  -blockdev '{"detect-zeroes":"on","discard":"ignore","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"file","filename":"/var/lib/vz/images/100/vm-100-disk-1.qcow2","node-name":"e70e3017c5a79fdee5a04aa92ac1e9c","read-only":false},"node-name":"f70e3017c5a79fdee5a04aa92ac1e9c","read-only":false},"node-name":"drive-efidisk0","read-only":false,"throttle-group":"throttle-drive-efidisk0"}' \
+  -blockdev '{"detect-zeroes":"on","discard":"ignore","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"file","filename":"/var/lib/vz/vms/100/vol-vm-100-disk-1.qcow2","node-name":"e70e3017c5a79fdee5a04aa92ac1e9c","read-only":false},"node-name":"f70e3017c5a79fdee5a04aa92ac1e9c","read-only":false},"node-name":"drive-efidisk0","read-only":false,"throttle-group":"throttle-drive-efidisk0"}' \
   -global 'ICH9-LPC.acpi-pci-hotplug-with-bridge-support=off' \
   -smp '2,sockets=1,cores=2,maxcpus=2' \
   -nodefaults \
diff --git a/src/test/cfg2cmd/q35-win10-hostpci.conf b/src/test/cfg2cmd/q35-win10-hostpci.conf
index a8f6e342..5ea44ac6 100644
--- a/src/test/cfg2cmd/q35-win10-hostpci.conf
+++ b/src/test/cfg2cmd/q35-win10-hostpci.conf
@@ -2,7 +2,7 @@
 bios: ovmf
 bootdisk: scsi0
 cores: 1
-efidisk0: local:100/vm-100-disk-1.qcow2,size=128K
+efidisk0: local:100/vol-vm-100-disk-1.qcow2,size=128K
 hostpci0: f0:42.0
 hostpci1: f0:43.0,pcie=1
 hostpci4: 00:43.1,pcie=1
diff --git a/src/test/cfg2cmd/q35-win10-hostpci.conf.cmd b/src/test/cfg2cmd/q35-win10-hostpci.conf.cmd
index 3a4dd6ec..12b2f268 100644
--- a/src/test/cfg2cmd/q35-win10-hostpci.conf.cmd
+++ b/src/test/cfg2cmd/q35-win10-hostpci.conf.cmd
@@ -10,7 +10,7 @@
   -daemonize \
   -smbios 'type=1,uuid=3dd750ce-d910-44d0-9493-525c0be4e687' \
   -drive 'if=pflash,unit=0,format=raw,readonly=on,file=/usr/share/pve-edk2-firmware//OVMF_CODE.fd' \
-  -drive 'if=pflash,unit=1,id=drive-efidisk0,format=qcow2,file=/var/lib/vz/images/100/vm-100-disk-1.qcow2' \
+  -drive 'if=pflash,unit=1,id=drive-efidisk0,format=qcow2,file=/var/lib/vz/vms/100/vol-vm-100-disk-1.qcow2' \
   -smp '2,sockets=2,cores=1,maxcpus=2' \
   -nodefaults \
   -boot 'menu=on,strict=on,reboot-timeout=1000,splash=/usr/share/qemu-server/bootsplash.jpg' \
diff --git a/src/test/cfg2cmd/seabios_serial.conf b/src/test/cfg2cmd/seabios_serial.conf
index 7ebfa504..35fb60f9 100644
--- a/src/test/cfg2cmd/seabios_serial.conf
+++ b/src/test/cfg2cmd/seabios_serial.conf
@@ -7,7 +7,7 @@ name: seabiosserial
 net0: virtio=A2:C0:43:77:08:A0,bridge=vmbr0
 numa: 0
 ostype: l26
-scsi0: local:8006/vm-8006-disk-0.qcow2,discard=on,size=104858K
+scsi0: local:8006/vol-vm-8006-disk-0.qcow2,discard=on,size=104858K
 scsihw: virtio-scsi-pci
 serial0: socket
 smbios1: uuid=7b10d7af-b932-4c66-b2c3-3996152ec465
diff --git a/src/test/cfg2cmd/seabios_serial.conf.cmd b/src/test/cfg2cmd/seabios_serial.conf.cmd
index 8fc0509b..b401d58b 100644
--- a/src/test/cfg2cmd/seabios_serial.conf.cmd
+++ b/src/test/cfg2cmd/seabios_serial.conf.cmd
@@ -28,7 +28,7 @@
   -iscsi 'initiator-name=iqn.1993-08.org.debian:01:aabbccddeeff' \
   -device 'ide-cd,bus=ide.1,unit=0,id=ide2,bootindex=200' \
   -device 'virtio-scsi-pci,id=scsihw0,bus=pci.0,addr=0x5' \
-  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/var/lib/vz/images/8006/vm-8006-disk-0.qcow2","node-name":"ecd04be4259153b8293415fefa2a84c","read-only":false},"node-name":"fcd04be4259153b8293415fefa2a84c","read-only":false},"node-name":"drive-scsi0","read-only":false,"throttle-group":"throttle-drive-scsi0"}' \
+  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/var/lib/vz/vms/8006/vol-vm-8006-disk-0.qcow2","node-name":"ecd04be4259153b8293415fefa2a84c","read-only":false},"node-name":"fcd04be4259153b8293415fefa2a84c","read-only":false},"node-name":"drive-scsi0","read-only":false,"throttle-group":"throttle-drive-scsi0"}' \
   -device 'scsi-hd,bus=scsihw0.0,channel=0,scsi-id=0,lun=0,drive=drive-scsi0,id=scsi0,device_id=drive-scsi0,bootindex=100,write-cache=on' \
   -netdev 'type=tap,id=net0,ifname=tap8006i0,script=/usr/libexec/qemu-server/pve-bridge,downscript=/usr/libexec/qemu-server/pve-bridgedown,vhost=on' \
   -device 'virtio-net-pci,mac=A2:C0:43:77:08:A0,netdev=net0,bus=pci.0,addr=0x12,id=net0,rx_queue_size=1024,tx_queue_size=256,bootindex=300' \
diff --git a/src/test/cfg2cmd/sev-es.conf b/src/test/cfg2cmd/sev-es.conf
index 3da71e76..af11fa3a 100644
--- a/src/test/cfg2cmd/sev-es.conf
+++ b/src/test/cfg2cmd/sev-es.conf
@@ -2,5 +2,5 @@
 # HW_CAPABILITIES: amd-turin-9005
 smbios1: uuid=7b10d7af-b932-4c66-b2c3-3996152ec465
 bios: ovmf
-efidisk0: local:100/vm-100-disk-0.raw,efitype=4m,pre-enrolled-keys=1,size=528K
+efidisk0: local:100/vol-vm-100-disk-0.raw,efitype=4m,pre-enrolled-keys=1,size=528K
 amd-sev: type=es
diff --git a/src/test/cfg2cmd/sev-es.conf.cmd b/src/test/cfg2cmd/sev-es.conf.cmd
index 3cc2dbc6..d8b9394e 100644
--- a/src/test/cfg2cmd/sev-es.conf.cmd
+++ b/src/test/cfg2cmd/sev-es.conf.cmd
@@ -11,7 +11,7 @@
   -smbios 'type=1,uuid=7b10d7af-b932-4c66-b2c3-3996152ec465' \
   -object '{"id":"throttle-drive-efidisk0","limits":{},"qom-type":"throttle-group"}' \
   -blockdev '{"driver":"raw","file":{"driver":"file","filename":"/usr/share/pve-edk2-firmware//OVMF_CVM_CODE_4M.fd"},"node-name":"pflash0","read-only":true}' \
-  -blockdev '{"detect-zeroes":"on","discard":"ignore","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"raw","file":{"aio":"io_uring","cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"file","filename":"/var/lib/vz/images/100/vm-100-disk-0.raw","node-name":"e1175f2a490414e7c53337589fde17a","read-only":false},"node-name":"f1175f2a490414e7c53337589fde17a","read-only":false,"size":540672},"node-name":"drive-efidisk0","read-only":false,"throttle-group":"throttle-drive-efidisk0"}' \
+  -blockdev '{"detect-zeroes":"on","discard":"ignore","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"raw","file":{"aio":"io_uring","cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"file","filename":"/var/lib/vz/vms/100/vol-vm-100-disk-0.raw","node-name":"e1175f2a490414e7c53337589fde17a","read-only":false},"node-name":"f1175f2a490414e7c53337589fde17a","read-only":false,"size":540672},"node-name":"drive-efidisk0","read-only":false,"throttle-group":"throttle-drive-efidisk0"}' \
   -smp '1,sockets=1,cores=1,maxcpus=1' \
   -nodefaults \
   -boot 'menu=on,strict=on,reboot-timeout=1000,splash=/usr/share/qemu-server/bootsplash.jpg' \
diff --git a/src/test/cfg2cmd/sev-std.conf b/src/test/cfg2cmd/sev-std.conf
index a85a08c9..d14605ab 100644
--- a/src/test/cfg2cmd/sev-std.conf
+++ b/src/test/cfg2cmd/sev-std.conf
@@ -2,5 +2,5 @@
 # HW_CAPABILITIES: amd-turin-9005
 smbios1: uuid=7b10d7af-b932-4c66-b2c3-3996152ec465
 bios: ovmf
-efidisk0: local:100/vm-100-disk-0.raw,efitype=4m,pre-enrolled-keys=1,size=528K
+efidisk0: local:100/vol-vm-100-disk-0.raw,efitype=4m,pre-enrolled-keys=1,size=528K
 amd-sev: type=std
diff --git a/src/test/cfg2cmd/sev-std.conf.cmd b/src/test/cfg2cmd/sev-std.conf.cmd
index 6291a302..177edae4 100644
--- a/src/test/cfg2cmd/sev-std.conf.cmd
+++ b/src/test/cfg2cmd/sev-std.conf.cmd
@@ -11,7 +11,7 @@
   -smbios 'type=1,uuid=7b10d7af-b932-4c66-b2c3-3996152ec465' \
   -object '{"id":"throttle-drive-efidisk0","limits":{},"qom-type":"throttle-group"}' \
   -blockdev '{"driver":"raw","file":{"driver":"file","filename":"/usr/share/pve-edk2-firmware//OVMF_CVM_CODE_4M.fd"},"node-name":"pflash0","read-only":true}' \
-  -blockdev '{"detect-zeroes":"on","discard":"ignore","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"raw","file":{"aio":"io_uring","cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"file","filename":"/var/lib/vz/images/100/vm-100-disk-0.raw","node-name":"e1175f2a490414e7c53337589fde17a","read-only":false},"node-name":"f1175f2a490414e7c53337589fde17a","read-only":false,"size":540672},"node-name":"drive-efidisk0","read-only":false,"throttle-group":"throttle-drive-efidisk0"}' \
+  -blockdev '{"detect-zeroes":"on","discard":"ignore","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"raw","file":{"aio":"io_uring","cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"file","filename":"/var/lib/vz/vms/100/vol-vm-100-disk-0.raw","node-name":"e1175f2a490414e7c53337589fde17a","read-only":false},"node-name":"f1175f2a490414e7c53337589fde17a","read-only":false,"size":540672},"node-name":"drive-efidisk0","read-only":false,"throttle-group":"throttle-drive-efidisk0"}' \
   -smp '1,sockets=1,cores=1,maxcpus=1' \
   -nodefaults \
   -boot 'menu=on,strict=on,reboot-timeout=1000,splash=/usr/share/qemu-server/bootsplash.jpg' \
diff --git a/src/test/cfg2cmd/simple-backingchain.conf b/src/test/cfg2cmd/simple-backingchain.conf
index 2c0b0f2c..b3e7654f 100644
--- a/src/test/cfg2cmd/simple-backingchain.conf
+++ b/src/test/cfg2cmd/simple-backingchain.conf
@@ -1,25 +1,25 @@
 # TEST: Simple test for external snapshot backing chain
 name: simple
 parent: snap3
-scsi0: localsnapext:8006/vm-8006-disk-0.qcow2,size=1G
-scsi1: lvm-store:vm-8006-disk-0.qcow2,size=1G
+scsi0: localsnapext:8006/vol-vm-8006-disk-0.qcow2,size=1G
+scsi1: lvm-store:vol-vm-8006-disk-0.qcow2,size=1G
 
 [snap1]
 name: simple
-scsi0: localsnapext:8006/vm-8006-disk-0.qcow2,size=1G
-scsi1: lvm-store:vm-8006-disk-0.qcow2,size=1G
+scsi0: localsnapext:8006/vol-vm-8006-disk-0.qcow2,size=1G
+scsi1: lvm-store:vol-vm-8006-disk-0.qcow2,size=1G
 snaptime: 1748933042
 
 [snap2]
 parent: snap1
 name: simple
-scsi0: localsnapext:8006/vm-8006-disk-0.qcow2,size=1G
-scsi1: lvm-store:vm-8006-disk-0.qcow2,size=1G
+scsi0: localsnapext:8006/vol-vm-8006-disk-0.qcow2,size=1G
+scsi1: lvm-store:vol-vm-8006-disk-0.qcow2,size=1G
 snaptime: 1748933043
 
 [snap3]
 parent: snap2
 name: simple
-scsi0: localsnapext:8006/vm-8006-disk-0.qcow2,size=1G
-scsi1: lvm-store:vm-8006-disk-0.qcow2,size=1G
+scsi0: localsnapext:8006/vol-vm-8006-disk-0.qcow2,size=1G
+scsi1: lvm-store:vol-vm-8006-disk-0.qcow2,size=1G
 snaptime: 1748933044
diff --git a/src/test/cfg2cmd/simple-backingchain.conf.cmd b/src/test/cfg2cmd/simple-backingchain.conf.cmd
index 4ac24b93..8ae2ca7a 100644
--- a/src/test/cfg2cmd/simple-backingchain.conf.cmd
+++ b/src/test/cfg2cmd/simple-backingchain.conf.cmd
@@ -26,8 +26,8 @@
   -device 'virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3,free-page-reporting=on' \
   -iscsi 'initiator-name=iqn.1993-08.org.debian:01:aabbccddeeff' \
   -device 'lsi,id=scsihw0,bus=pci.0,addr=0x5' \
-  -blockdev '{"detect-zeroes":"on","discard":"ignore","driver":"throttle","file":{"backing":{"backing":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"on","discard":"ignore","discard-no-unref":true,"driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"file","filename":"/var/lib/vzsnapext/images/8006/snap1-vm-8006-disk-0.qcow2","node-name":"ea91a385a49a008a4735c0aec5c6749","read-only":false},"node-name":"fa91a385a49a008a4735c0aec5c6749","read-only":false},"cache":{"direct":true,"no-flush":false},"detect-zeroes":"on","discard":"ignore","discard-no-unref":true,"driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"file","filename":"/var/lib/vzsnapext/images/8006/snap2-vm-8006-disk-0.qcow2","node-name":"ec0289317073959d450248d8cd7a480","read-only":false},"node-name":"fc0289317073959d450248d8cd7a480","read-only":false},"ca
 che":{"direct":true,"no-flush":false},"detect-zeroes":"on","discard":"ignore","discard-no-unref":true,"driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"file","filename":"/var/lib/vzsnapext/images/8006/vm-8006-disk-0.qcow2","node-name":"e74f4959037afb46eddc7313c43dfdd","read-only":false},"node-name":"f74f4959037afb46eddc7313c43dfdd","read-only":false},"node-name":"drive-scsi0","read-only":false,"throttle-group":"throttle-drive-scsi0"}' \
+  -blockdev '{"detect-zeroes":"on","discard":"ignore","driver":"throttle","file":{"backing":{"backing":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"on","discard":"ignore","discard-no-unref":true,"driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"file","filename":"/var/lib/vzsnapext/images/8006/snap1-vol-vm-8006-disk-0.qcow2","node-name":"ea91a385a49a008a4735c0aec5c6749","read-only":false},"node-name":"fa91a385a49a008a4735c0aec5c6749","read-only":false},"cache":{"direct":true,"no-flush":false},"detect-zeroes":"on","discard":"ignore","discard-no-unref":true,"driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"file","filename":"/var/lib/vzsnapext/images/8006/snap2-vol-vm-8006-disk-0.qcow2","node-name":"ec0289317073959d450248d8cd7a480","read-only":false},"node-name":"fc0289317073959d450248d8cd7a480","read-only":fa
 lse},"cache":{"direct":true,"no-flush":false},"detect-zeroes":"on","discard":"ignore","discard-no-unref":true,"driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"file","filename":"/var/lib/vzsnapext/vms/8006/vol-vm-8006-disk-0.qcow2","node-name":"e74f4959037afb46eddc7313c43dfdd","read-only":false},"node-name":"f74f4959037afb46eddc7313c43dfdd","read-only":false},"node-name":"drive-scsi0","read-only":false,"throttle-group":"throttle-drive-scsi0"}' \
   -device 'scsi-hd,bus=scsihw0.0,scsi-id=0,drive=drive-scsi0,id=scsi0,device_id=drive-scsi0,write-cache=on' \
-  -blockdev '{"detect-zeroes":"on","discard":"ignore","driver":"throttle","file":{"backing":{"backing":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"qcow2","file":{"aio":"native","cache":{"direct":true,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"host_device","filename":"/dev/veegee/snap1-vm-8006-disk-0.qcow2","node-name":"e25f58d3e6e11f2065ad41253988915","read-only":false},"node-name":"f25f58d3e6e11f2065ad41253988915","read-only":false},"cache":{"direct":true,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"qcow2","file":{"aio":"native","cache":{"direct":true,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"host_device","filename":"/dev/veegee/snap2-vm-8006-disk-0.qcow2","node-name":"e9415bb5e484c1e25d25063b01686fe","read-only":false},"node-name":"f9415bb5e484c1e25d25063b01686fe","read-only":false},"cache":{"direct":true,"no-flush":false},"detect-zeroes":"on","discard":"ignore
 ","driver":"qcow2","file":{"aio":"native","cache":{"direct":true,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"host_device","filename":"/dev/veegee/vm-8006-disk-0.qcow2","node-name":"e87358a470ca311f94d5cc61d1eb428","read-only":false},"node-name":"f87358a470ca311f94d5cc61d1eb428","read-only":false},"node-name":"drive-scsi1","read-only":false,"throttle-group":"throttle-drive-scsi1"}' \
+  -blockdev '{"detect-zeroes":"on","discard":"ignore","driver":"throttle","file":{"backing":{"backing":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"qcow2","file":{"aio":"native","cache":{"direct":true,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"host_device","filename":"/dev/veegee/snap1-vol-vm-8006-disk-0.qcow2","node-name":"e25f58d3e6e11f2065ad41253988915","read-only":false},"node-name":"f25f58d3e6e11f2065ad41253988915","read-only":false},"cache":{"direct":true,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"qcow2","file":{"aio":"native","cache":{"direct":true,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"host_device","filename":"/dev/veegee/snap2-vol-vm-8006-disk-0.qcow2","node-name":"e9415bb5e484c1e25d25063b01686fe","read-only":false},"node-name":"f9415bb5e484c1e25d25063b01686fe","read-only":false},"cache":{"direct":true,"no-flush":false},"detect-zeroes":"on","discard"
 :"ignore","driver":"qcow2","file":{"aio":"native","cache":{"direct":true,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"host_device","filename":"/dev/veegee/vol-vm-8006-disk-0.qcow2","node-name":"e87358a470ca311f94d5cc61d1eb428","read-only":false},"node-name":"f87358a470ca311f94d5cc61d1eb428","read-only":false},"node-name":"drive-scsi1","read-only":false,"throttle-group":"throttle-drive-scsi1"}' \
   -device 'scsi-hd,bus=scsihw0.0,scsi-id=1,drive=drive-scsi1,id=scsi1,device_id=drive-scsi1,write-cache=on' \
   -machine 'type=pc+pve0'
diff --git a/src/test/cfg2cmd/simple-balloon-free-page-reporting.conf b/src/test/cfg2cmd/simple-balloon-free-page-reporting.conf
index ae71eaf6..bbb60788 100644
--- a/src/test/cfg2cmd/simple-balloon-free-page-reporting.conf
+++ b/src/test/cfg2cmd/simple-balloon-free-page-reporting.conf
@@ -8,7 +8,7 @@ name: simple
 net0: virtio=A2:C0:43:77:08:A0,bridge=vmbr0
 numa: 0
 ostype: l26
-scsi0: local:8006/vm-8006-disk-0.qcow2,discard=on,size=104858K
+scsi0: local:8006/vol-vm-8006-disk-0.qcow2,discard=on,size=104858K
 scsihw: virtio-scsi-pci
 smbios1: uuid=7b10d7af-b932-4c66-b2c3-3996152ec465
 sockets: 1
diff --git a/src/test/cfg2cmd/simple-balloon-free-page-reporting.conf.cmd b/src/test/cfg2cmd/simple-balloon-free-page-reporting.conf.cmd
index 0c61d334..1c7cd183 100644
--- a/src/test/cfg2cmd/simple-balloon-free-page-reporting.conf.cmd
+++ b/src/test/cfg2cmd/simple-balloon-free-page-reporting.conf.cmd
@@ -26,7 +26,7 @@
   -drive 'if=none,id=drive-ide2,media=cdrom,aio=io_uring' \
   -device 'ide-cd,bus=ide.1,unit=0,drive=drive-ide2,id=ide2,bootindex=200' \
   -device 'virtio-scsi-pci,id=scsihw0,bus=pci.0,addr=0x5' \
-  -drive 'file=/var/lib/vz/images/8006/vm-8006-disk-0.qcow2,if=none,id=drive-scsi0,discard=on,format=qcow2,cache=none,aio=io_uring,detect-zeroes=unmap' \
+  -drive 'file=/var/lib/vz/vms/8006/vol-vm-8006-disk-0.qcow2,if=none,id=drive-scsi0,discard=on,format=qcow2,cache=none,aio=io_uring,detect-zeroes=unmap' \
   -device 'scsi-hd,bus=scsihw0.0,channel=0,scsi-id=0,lun=0,drive=drive-scsi0,id=scsi0,bootindex=100' \
   -netdev 'type=tap,id=net0,ifname=tap8006i0,script=/usr/libexec/qemu-server/pve-bridge,downscript=/usr/libexec/qemu-server/pve-bridgedown,vhost=on' \
   -device 'virtio-net-pci,mac=A2:C0:43:77:08:A0,netdev=net0,bus=pci.0,addr=0x12,id=net0,bootindex=300' \
diff --git a/src/test/cfg2cmd/simple-btrfs.conf b/src/test/cfg2cmd/simple-btrfs.conf
index 27de3b03..c5d9503a 100644
--- a/src/test/cfg2cmd/simple-btrfs.conf
+++ b/src/test/cfg2cmd/simple-btrfs.conf
@@ -7,10 +7,10 @@ name: simple
 net0: virtio=A2:C0:43:77:08:A0,bridge=vmbr0
 numa: 0
 ostype: l26
-scsi0: btrfs-store:8006/vm-8006-disk-0.raw,discard=on,size=104858K
-scsi1: btrfs-store:8006/vm-8006-disk-0.raw,cache=writeback,discard=on,size=104858K
-scsi2: btrfs-store:8006/vm-8006-disk-0.raw,cache=writethrough,discard=on,size=104858K
-scsi3: btrfs-store:8006/vm-8006-disk-0.raw,cache=directsync,discard=on,size=104858K
+scsi0: btrfs-store:8006/vol-vm-8006-disk-0.raw,discard=on,size=104858K
+scsi1: btrfs-store:8006/vol-vm-8006-disk-0.raw,cache=writeback,discard=on,size=104858K
+scsi2: btrfs-store:8006/vol-vm-8006-disk-0.raw,cache=writethrough,discard=on,size=104858K
+scsi3: btrfs-store:8006/vol-vm-8006-disk-0.raw,cache=directsync,discard=on,size=104858K
 scsihw: virtio-scsi-pci
 smbios1: uuid=7b10d7af-b932-4c66-b2c3-3996152ec465
 sockets: 1
diff --git a/src/test/cfg2cmd/simple-btrfs.conf.cmd b/src/test/cfg2cmd/simple-btrfs.conf.cmd
index f80421ad..12ddeead 100644
--- a/src/test/cfg2cmd/simple-btrfs.conf.cmd
+++ b/src/test/cfg2cmd/simple-btrfs.conf.cmd
@@ -31,13 +31,13 @@
   -iscsi 'initiator-name=iqn.1993-08.org.debian:01:aabbccddeeff' \
   -device 'ide-cd,bus=ide.1,unit=0,id=ide2,bootindex=200' \
   -device 'virtio-scsi-pci,id=scsihw0,bus=pci.0,addr=0x5' \
-  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"io_uring","cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/butter/bread/images/8006/vm-8006-disk-0/disk.raw","node-name":"e99aff0ff797aa030a22e9f580076dd","read-only":false},"node-name":"f99aff0ff797aa030a22e9f580076dd","read-only":false},"node-name":"drive-scsi0","read-only":false,"throttle-group":"throttle-drive-scsi0"}' \
+  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"io_uring","cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/butter/bread/vms/8006/vol-vm-8006-disk-0/disk.raw","node-name":"e99aff0ff797aa030a22e9f580076dd","read-only":false},"node-name":"f99aff0ff797aa030a22e9f580076dd","read-only":false},"node-name":"drive-scsi0","read-only":false,"throttle-group":"throttle-drive-scsi0"}' \
   -device 'scsi-hd,bus=scsihw0.0,channel=0,scsi-id=0,lun=0,drive=drive-scsi0,id=scsi0,device_id=drive-scsi0,bootindex=100,write-cache=on' \
-  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"io_uring","cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/butter/bread/images/8006/vm-8006-disk-0/disk.raw","node-name":"e7b2fd2a8c5dbfc550d9781e5df8841","read-only":false},"node-name":"f7b2fd2a8c5dbfc550d9781e5df8841","read-only":false},"node-name":"drive-scsi1","read-only":false,"throttle-group":"throttle-drive-scsi1"}' \
+  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"io_uring","cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/butter/bread/vms/8006/vol-vm-8006-disk-0/disk.raw","node-name":"e7b2fd2a8c5dbfc550d9781e5df8841","read-only":false},"node-name":"f7b2fd2a8c5dbfc550d9781e5df8841","read-only":false},"node-name":"drive-scsi1","read-only":false,"throttle-group":"throttle-drive-scsi1"}' \
   -device 'scsi-hd,bus=scsihw0.0,channel=0,scsi-id=0,lun=1,drive=drive-scsi1,id=scsi1,device_id=drive-scsi1,write-cache=on' \
-  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"io_uring","cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/butter/bread/images/8006/vm-8006-disk-0/disk.raw","node-name":"ed78b07bb04c2cbd8aedc648e885569","read-only":false},"node-name":"fd78b07bb04c2cbd8aedc648e885569","read-only":false},"node-name":"drive-scsi2","read-only":false,"throttle-group":"throttle-drive-scsi2"}' \
+  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"io_uring","cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/butter/bread/vms/8006/vol-vm-8006-disk-0/disk.raw","node-name":"ed78b07bb04c2cbd8aedc648e885569","read-only":false},"node-name":"fd78b07bb04c2cbd8aedc648e885569","read-only":false},"node-name":"drive-scsi2","read-only":false,"throttle-group":"throttle-drive-scsi2"}' \
   -device 'scsi-hd,bus=scsihw0.0,channel=0,scsi-id=0,lun=2,drive=drive-scsi2,id=scsi2,device_id=drive-scsi2,write-cache=off' \
-  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/butter/bread/images/8006/vm-8006-disk-0/disk.raw","node-name":"e7487c01d831e2b51a5446980170ec9","read-only":false},"node-name":"f7487c01d831e2b51a5446980170ec9","read-only":false},"node-name":"drive-scsi3","read-only":false,"throttle-group":"throttle-drive-scsi3"}' \
+  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/butter/bread/vms/8006/vol-vm-8006-disk-0/disk.raw","node-name":"e7487c01d831e2b51a5446980170ec9","read-only":false},"node-name":"f7487c01d831e2b51a5446980170ec9","read-only":false},"node-name":"drive-scsi3","read-only":false,"throttle-group":"throttle-drive-scsi3"}' \
   -device 'scsi-hd,bus=scsihw0.0,channel=0,scsi-id=0,lun=3,drive=drive-scsi3,id=scsi3,device_id=drive-scsi3,write-cache=off' \
   -netdev 'type=tap,id=net0,ifname=tap8006i0,script=/usr/libexec/qemu-server/pve-bridge,downscript=/usr/libexec/qemu-server/pve-bridgedown,vhost=on' \
   -device 'virtio-net-pci,mac=A2:C0:43:77:08:A0,netdev=net0,bus=pci.0,addr=0x12,id=net0,rx_queue_size=1024,tx_queue_size=256,bootindex=300' \
diff --git a/src/test/cfg2cmd/simple-cifs.conf b/src/test/cfg2cmd/simple-cifs.conf
index fe0fed81..6af966a3 100644
--- a/src/test/cfg2cmd/simple-cifs.conf
+++ b/src/test/cfg2cmd/simple-cifs.conf
@@ -2,8 +2,8 @@
 ide2: none,media=cdrom
 name: simple
 ostype: l26
-scsi0: cifs-store:8006/vm-8006-disk-0.raw,discard=on,size=104858K
-scsi1: cifs-store:8006/vm-8006-disk-0.raw,cache=writeback,discard=on,size=104858K
-scsi2: cifs-store:8006/vm-8006-disk-0.raw,cache=writethrough,discard=on,size=104858K
-scsi3: cifs-store:8006/vm-8006-disk-0.raw,cache=directsync,discard=on,size=104858K
+scsi0: cifs-store:8006/vol-vm-8006-disk-0.raw,discard=on,size=104858K
+scsi1: cifs-store:8006/vol-vm-8006-disk-0.raw,cache=writeback,discard=on,size=104858K
+scsi2: cifs-store:8006/vol-vm-8006-disk-0.raw,cache=writethrough,discard=on,size=104858K
+scsi3: cifs-store:8006/vol-vm-8006-disk-0.raw,cache=directsync,discard=on,size=104858K
 scsihw: virtio-scsi-pci
diff --git a/src/test/cfg2cmd/simple-cifs.conf.cmd b/src/test/cfg2cmd/simple-cifs.conf.cmd
index 4174d061..a3b75065 100644
--- a/src/test/cfg2cmd/simple-cifs.conf.cmd
+++ b/src/test/cfg2cmd/simple-cifs.conf.cmd
@@ -29,12 +29,12 @@
   -iscsi 'initiator-name=iqn.1993-08.org.debian:01:aabbccddeeff' \
   -device 'ide-cd,bus=ide.1,unit=0,id=ide2,bootindex=200' \
   -device 'virtio-scsi-pci,id=scsihw0,bus=pci.0,addr=0x5' \
-  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"native","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/mnt/pve/cifs-store/images/8006/vm-8006-disk-0.raw","node-name":"e2b3b8f2d6a23adc1aa3ecd195dbaf5","read-only":false},"node-name":"f2b3b8f2d6a23adc1aa3ecd195dbaf5","read-only":false},"node-name":"drive-scsi0","read-only":false,"throttle-group":"throttle-drive-scsi0"}' \
+  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"native","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/mnt/pve/cifs-store/vms/8006/vol-vm-8006-disk-0.raw","node-name":"e2b3b8f2d6a23adc1aa3ecd195dbaf5","read-only":false},"node-name":"f2b3b8f2d6a23adc1aa3ecd195dbaf5","read-only":false},"node-name":"drive-scsi0","read-only":false,"throttle-group":"throttle-drive-scsi0"}' \
   -device 'scsi-hd,bus=scsihw0.0,channel=0,scsi-id=0,lun=0,drive=drive-scsi0,id=scsi0,device_id=drive-scsi0,write-cache=on' \
-  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"threads","cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/mnt/pve/cifs-store/images/8006/vm-8006-disk-0.raw","node-name":"ee4d9a961200a669c1a8182632aba3e","read-only":false},"node-name":"fe4d9a961200a669c1a8182632aba3e","read-only":false},"node-name":"drive-scsi1","read-only":false,"throttle-group":"throttle-drive-scsi1"}' \
+  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"threads","cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/mnt/pve/cifs-store/vms/8006/vol-vm-8006-disk-0.raw","node-name":"ee4d9a961200a669c1a8182632aba3e","read-only":false},"node-name":"fe4d9a961200a669c1a8182632aba3e","read-only":false},"node-name":"drive-scsi1","read-only":false,"throttle-group":"throttle-drive-scsi1"}' \
   -device 'scsi-hd,bus=scsihw0.0,channel=0,scsi-id=0,lun=1,drive=drive-scsi1,id=scsi1,device_id=drive-scsi1,write-cache=on' \
-  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"threads","cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/mnt/pve/cifs-store/images/8006/vm-8006-disk-0.raw","node-name":"e6a3bf7eee1e2636cbe31f62b537b6c","read-only":false},"node-name":"f6a3bf7eee1e2636cbe31f62b537b6c","read-only":false},"node-name":"drive-scsi2","read-only":false,"throttle-group":"throttle-drive-scsi2"}' \
+  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"threads","cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/mnt/pve/cifs-store/vms/8006/vol-vm-8006-disk-0.raw","node-name":"e6a3bf7eee1e2636cbe31f62b537b6c","read-only":false},"node-name":"f6a3bf7eee1e2636cbe31f62b537b6c","read-only":false},"node-name":"drive-scsi2","read-only":false,"throttle-group":"throttle-drive-scsi2"}' \
   -device 'scsi-hd,bus=scsihw0.0,channel=0,scsi-id=0,lun=2,drive=drive-scsi2,id=scsi2,device_id=drive-scsi2,write-cache=off' \
-  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"native","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/mnt/pve/cifs-store/images/8006/vm-8006-disk-0.raw","node-name":"e7042ee58e764b1296ad54014cb9a03","read-only":false},"node-name":"f7042ee58e764b1296ad54014cb9a03","read-only":false},"node-name":"drive-scsi3","read-only":false,"throttle-group":"throttle-drive-scsi3"}' \
+  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"native","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/mnt/pve/cifs-store/vms/8006/vol-vm-8006-disk-0.raw","node-name":"e7042ee58e764b1296ad54014cb9a03","read-only":false},"node-name":"f7042ee58e764b1296ad54014cb9a03","read-only":false},"node-name":"drive-scsi3","read-only":false,"throttle-group":"throttle-drive-scsi3"}' \
   -device 'scsi-hd,bus=scsihw0.0,channel=0,scsi-id=0,lun=3,drive=drive-scsi3,id=scsi3,device_id=drive-scsi3,write-cache=off' \
   -machine 'type=pc+pve0'
diff --git a/src/test/cfg2cmd/simple-lvm.conf b/src/test/cfg2cmd/simple-lvm.conf
index 4c20991b..24f08f14 100644
--- a/src/test/cfg2cmd/simple-lvm.conf
+++ b/src/test/cfg2cmd/simple-lvm.conf
@@ -1,8 +1,8 @@
 # TEST: Simple test for LVM backed VM
 bootdisk: scsi0
 name: simple
-scsi0: lvm-store:vm-8006-disk-0,discard=on,size=104858K
-scsi1: lvm-store:vm-8006-disk-0,cache=writeback,discard=on,size=104858K
-scsi2: lvm-store:vm-8006-disk-0,cache=writethrough,discard=on,size=104858K
-scsi3: lvm-store:vm-8006-disk-0,cache=directsync,discard=on,size=104858K
+scsi0: lvm-store:vol-vm-8006-disk-0,discard=on,size=104858K
+scsi1: lvm-store:vol-vm-8006-disk-0,cache=writeback,discard=on,size=104858K
+scsi2: lvm-store:vol-vm-8006-disk-0,cache=writethrough,discard=on,size=104858K
+scsi3: lvm-store:vol-vm-8006-disk-0,cache=directsync,discard=on,size=104858K
 scsihw: virtio-scsi-pci
diff --git a/src/test/cfg2cmd/simple-lvm.conf.cmd b/src/test/cfg2cmd/simple-lvm.conf.cmd
index 96248c0d..0ab09c87 100644
--- a/src/test/cfg2cmd/simple-lvm.conf.cmd
+++ b/src/test/cfg2cmd/simple-lvm.conf.cmd
@@ -28,12 +28,12 @@
   -device 'virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3,free-page-reporting=on' \
   -iscsi 'initiator-name=iqn.1993-08.org.debian:01:aabbccddeeff' \
   -device 'virtio-scsi-pci,id=scsihw0,bus=pci.0,addr=0x5' \
-  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"native","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"host_device","filename":"/dev/veegee/vm-8006-disk-0","node-name":"e0378a375d635b0f473569544c7c207","read-only":false},"node-name":"f0378a375d635b0f473569544c7c207","read-only":false},"node-name":"drive-scsi0","read-only":false,"throttle-group":"throttle-drive-scsi0"}' \
+  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"native","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"host_device","filename":"/dev/veegee/vol-vm-8006-disk-0","node-name":"e0378a375d635b0f473569544c7c207","read-only":false},"node-name":"f0378a375d635b0f473569544c7c207","read-only":false},"node-name":"drive-scsi0","read-only":false,"throttle-group":"throttle-drive-scsi0"}' \
   -device 'scsi-hd,bus=scsihw0.0,channel=0,scsi-id=0,lun=0,drive=drive-scsi0,id=scsi0,device_id=drive-scsi0,bootindex=100,write-cache=on' \
-  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"threads","cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"host_device","filename":"/dev/veegee/vm-8006-disk-0","node-name":"e2fbae024c8a771f708f4a5391211b0","read-only":false},"node-name":"f2fbae024c8a771f708f4a5391211b0","read-only":false},"node-name":"drive-scsi1","read-only":false,"throttle-group":"throttle-drive-scsi1"}' \
+  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"threads","cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"host_device","filename":"/dev/veegee/vol-vm-8006-disk-0","node-name":"e2fbae024c8a771f708f4a5391211b0","read-only":false},"node-name":"f2fbae024c8a771f708f4a5391211b0","read-only":false},"node-name":"drive-scsi1","read-only":false,"throttle-group":"throttle-drive-scsi1"}' \
   -device 'scsi-hd,bus=scsihw0.0,channel=0,scsi-id=0,lun=1,drive=drive-scsi1,id=scsi1,device_id=drive-scsi1,write-cache=on' \
-  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"threads","cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"host_device","filename":"/dev/veegee/vm-8006-disk-0","node-name":"e4328c26b141e3efe1564cb60bf1155","read-only":false},"node-name":"f4328c26b141e3efe1564cb60bf1155","read-only":false},"node-name":"drive-scsi2","read-only":false,"throttle-group":"throttle-drive-scsi2"}' \
+  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"threads","cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"host_device","filename":"/dev/veegee/vol-vm-8006-disk-0","node-name":"e4328c26b141e3efe1564cb60bf1155","read-only":false},"node-name":"f4328c26b141e3efe1564cb60bf1155","read-only":false},"node-name":"drive-scsi2","read-only":false,"throttle-group":"throttle-drive-scsi2"}' \
   -device 'scsi-hd,bus=scsihw0.0,channel=0,scsi-id=0,lun=2,drive=drive-scsi2,id=scsi2,device_id=drive-scsi2,write-cache=off' \
-  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"native","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"host_device","filename":"/dev/veegee/vm-8006-disk-0","node-name":"e68e10f8128f05fe5f7e85cc1f9922b","read-only":false},"node-name":"f68e10f8128f05fe5f7e85cc1f9922b","read-only":false},"node-name":"drive-scsi3","read-only":false,"throttle-group":"throttle-drive-scsi3"}' \
+  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"native","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"host_device","filename":"/dev/veegee/vol-vm-8006-disk-0","node-name":"e68e10f8128f05fe5f7e85cc1f9922b","read-only":false},"node-name":"f68e10f8128f05fe5f7e85cc1f9922b","read-only":false},"node-name":"drive-scsi3","read-only":false,"throttle-group":"throttle-drive-scsi3"}' \
   -device 'scsi-hd,bus=scsihw0.0,channel=0,scsi-id=0,lun=3,drive=drive-scsi3,id=scsi3,device_id=drive-scsi3,write-cache=off' \
   -machine 'type=pc+pve0'
diff --git a/src/test/cfg2cmd/simple-lvmthin.conf b/src/test/cfg2cmd/simple-lvmthin.conf
index 5d70622e..c898eebb 100644
--- a/src/test/cfg2cmd/simple-lvmthin.conf
+++ b/src/test/cfg2cmd/simple-lvmthin.conf
@@ -1,8 +1,8 @@
 # TEST: Simple test for LVMthin backed VM
 bootdisk: scsi0
 name: simple
-scsi0: local-lvm:vm-8006-disk-0,discard=on,size=104858K
-scsi1: local-lvm:vm-8006-disk-0,cache=writeback,discard=on,size=104858K
-scsi2: local-lvm:vm-8006-disk-0,cache=writethrough,discard=on,size=104858K
-scsi3: local-lvm:vm-8006-disk-0,cache=directsync,discard=on,size=104858K
+scsi0: local-lvm:vol-vm-8006-disk-0,discard=on,size=104858K
+scsi1: local-lvm:vol-vm-8006-disk-0,cache=writeback,discard=on,size=104858K
+scsi2: local-lvm:vol-vm-8006-disk-0,cache=writethrough,discard=on,size=104858K
+scsi3: local-lvm:vol-vm-8006-disk-0,cache=directsync,discard=on,size=104858K
 scsihw: virtio-scsi-pci
diff --git a/src/test/cfg2cmd/simple-lvmthin.conf.cmd b/src/test/cfg2cmd/simple-lvmthin.conf.cmd
index 9c98fffc..c4dc173d 100644
--- a/src/test/cfg2cmd/simple-lvmthin.conf.cmd
+++ b/src/test/cfg2cmd/simple-lvmthin.conf.cmd
@@ -28,12 +28,12 @@
   -device 'virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3,free-page-reporting=on' \
   -iscsi 'initiator-name=iqn.1993-08.org.debian:01:aabbccddeeff' \
   -device 'virtio-scsi-pci,id=scsihw0,bus=pci.0,addr=0x5' \
-  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"host_device","filename":"/dev/pve/vm-8006-disk-0","node-name":"e6d87b01b7bb888b8426534a542ff1c","read-only":false},"node-name":"f6d87b01b7bb888b8426534a542ff1c","read-only":false},"node-name":"drive-scsi0","read-only":false,"throttle-group":"throttle-drive-scsi0"}' \
+  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"host_device","filename":"/dev/pve/vol-vm-8006-disk-0","node-name":"e6d87b01b7bb888b8426534a542ff1c","read-only":false},"node-name":"f6d87b01b7bb888b8426534a542ff1c","read-only":false},"node-name":"drive-scsi0","read-only":false,"throttle-group":"throttle-drive-scsi0"}' \
   -device 'scsi-hd,bus=scsihw0.0,channel=0,scsi-id=0,lun=0,drive=drive-scsi0,id=scsi0,device_id=drive-scsi0,bootindex=100,write-cache=on' \
-  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"io_uring","cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"host_device","filename":"/dev/pve/vm-8006-disk-0","node-name":"e96d9ece81aa4271aa2d8485184f66b","read-only":false},"node-name":"f96d9ece81aa4271aa2d8485184f66b","read-only":false},"node-name":"drive-scsi1","read-only":false,"throttle-group":"throttle-drive-scsi1"}' \
+  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"io_uring","cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"host_device","filename":"/dev/pve/vol-vm-8006-disk-0","node-name":"e96d9ece81aa4271aa2d8485184f66b","read-only":false},"node-name":"f96d9ece81aa4271aa2d8485184f66b","read-only":false},"node-name":"drive-scsi1","read-only":false,"throttle-group":"throttle-drive-scsi1"}' \
   -device 'scsi-hd,bus=scsihw0.0,channel=0,scsi-id=0,lun=1,drive=drive-scsi1,id=scsi1,device_id=drive-scsi1,write-cache=on' \
-  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"io_uring","cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"host_device","filename":"/dev/pve/vm-8006-disk-0","node-name":"e0b89788ef97beda10a850ab45897d9","read-only":false},"node-name":"f0b89788ef97beda10a850ab45897d9","read-only":false},"node-name":"drive-scsi2","read-only":false,"throttle-group":"throttle-drive-scsi2"}' \
+  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"io_uring","cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"host_device","filename":"/dev/pve/vol-vm-8006-disk-0","node-name":"e0b89788ef97beda10a850ab45897d9","read-only":false},"node-name":"f0b89788ef97beda10a850ab45897d9","read-only":false},"node-name":"drive-scsi2","read-only":false,"throttle-group":"throttle-drive-scsi2"}' \
   -device 'scsi-hd,bus=scsihw0.0,channel=0,scsi-id=0,lun=2,drive=drive-scsi2,id=scsi2,device_id=drive-scsi2,write-cache=off' \
-  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"host_device","filename":"/dev/pve/vm-8006-disk-0","node-name":"ea7b6871af66ca3e13e95bd74570aa2","read-only":false},"node-name":"fa7b6871af66ca3e13e95bd74570aa2","read-only":false},"node-name":"drive-scsi3","read-only":false,"throttle-group":"throttle-drive-scsi3"}' \
+  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"host_device","filename":"/dev/pve/vol-vm-8006-disk-0","node-name":"ea7b6871af66ca3e13e95bd74570aa2","read-only":false},"node-name":"fa7b6871af66ca3e13e95bd74570aa2","read-only":false},"node-name":"drive-scsi3","read-only":false,"throttle-group":"throttle-drive-scsi3"}' \
   -device 'scsi-hd,bus=scsihw0.0,channel=0,scsi-id=0,lun=3,drive=drive-scsi3,id=scsi3,device_id=drive-scsi3,write-cache=off' \
   -machine 'type=pc+pve0'
diff --git a/src/test/cfg2cmd/simple-rbd.conf b/src/test/cfg2cmd/simple-rbd.conf
index 9960d72d..df092fb4 100644
--- a/src/test/cfg2cmd/simple-rbd.conf
+++ b/src/test/cfg2cmd/simple-rbd.conf
@@ -7,14 +7,14 @@ name: simple
 net0: virtio=A2:C0:43:77:08:A0,bridge=vmbr0
 numa: 0
 ostype: l26
-scsi0: rbd-store:vm-8006-disk-0,discard=on,size=104858K
-scsi1: rbd-store:vm-8006-disk-0,discard=on,cache=writeback,size=104858K
-scsi2: rbd-store:vm-8006-disk-0,discard=on,cache=writethrough,size=104858K
-scsi3: rbd-store:vm-8006-disk-0,discard=on,cache=directsync,size=104858K
-scsi4: krbd-store:vm-8006-disk-0,discard=on,size=104858K
-scsi5: krbd-store:vm-8006-disk-0,cache=writeback,discard=on,size=104858K
-scsi6: krbd-store:vm-8006-disk-0,cache=writethrough,discard=on,size=104858K
-scsi7: krbd-store:vm-8006-disk-0,cache=directsync,discard=on,size=104858K
+scsi0: rbd-store:vol-vm-8006-disk-0,discard=on,size=104858K
+scsi1: rbd-store:vol-vm-8006-disk-0,discard=on,cache=writeback,size=104858K
+scsi2: rbd-store:vol-vm-8006-disk-0,discard=on,cache=writethrough,size=104858K
+scsi3: rbd-store:vol-vm-8006-disk-0,discard=on,cache=directsync,size=104858K
+scsi4: krbd-store:vol-vm-8006-disk-0,discard=on,size=104858K
+scsi5: krbd-store:vol-vm-8006-disk-0,cache=writeback,discard=on,size=104858K
+scsi6: krbd-store:vol-vm-8006-disk-0,cache=writethrough,discard=on,size=104858K
+scsi7: krbd-store:vol-vm-8006-disk-0,cache=directsync,discard=on,size=104858K
 scsihw: virtio-scsi-pci
 smbios1: uuid=7b10d7af-b932-4c66-b2c3-3996152ec465
 sockets: 1
diff --git a/src/test/cfg2cmd/simple-rbd.conf.cmd b/src/test/cfg2cmd/simple-rbd.conf.cmd
index b848672c..2bcb9287 100644
--- a/src/test/cfg2cmd/simple-rbd.conf.cmd
+++ b/src/test/cfg2cmd/simple-rbd.conf.cmd
@@ -35,21 +35,21 @@
   -iscsi 'initiator-name=iqn.1993-08.org.debian:01:aabbccddeeff' \
   -device 'ide-cd,bus=ide.1,unit=0,id=ide2,bootindex=200' \
   -device 'virtio-scsi-pci,id=scsihw0,bus=pci.0,addr=0x5' \
-  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"auth-client-required":["none"],"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"rbd","image":"vm-8006-disk-0","node-name":"e8e1af6f55c6a2466f178045aa79710","pool":"cpool","read-only":false,"server":[{"host":"127.0.0.42","port":"3300"},{"host":"127.0.0.21","port":"3300"},{"host":"::1","port":"3300"}]},"node-name":"f8e1af6f55c6a2466f178045aa79710","read-only":false},"node-name":"drive-scsi0","read-only":false,"throttle-group":"throttle-drive-scsi0"}' \
+  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"auth-client-required":["none"],"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"rbd","image":"vol-vm-8006-disk-0","node-name":"e8e1af6f55c6a2466f178045aa79710","pool":"cpool","read-only":false,"server":[{"host":"127.0.0.42","port":"3300"},{"host":"127.0.0.21","port":"3300"},{"host":"::1","port":"3300"}]},"node-name":"f8e1af6f55c6a2466f178045aa79710","read-only":false},"node-name":"drive-scsi0","read-only":false,"throttle-group":"throttle-drive-scsi0"}' \
   -device 'scsi-hd,bus=scsihw0.0,channel=0,scsi-id=0,lun=0,drive=drive-scsi0,id=scsi0,device_id=drive-scsi0,bootindex=100,write-cache=on' \
-  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"auth-client-required":["none"],"cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"rbd","image":"vm-8006-disk-0","node-name":"e3990bba2ed1f48c5bb23e9f37b4cec","pool":"cpool","read-only":false,"server":[{"host":"127.0.0.42","port":"3300"},{"host":"127.0.0.21","port":"3300"},{"host":"::1","port":"3300"}]},"node-name":"f3990bba2ed1f48c5bb23e9f37b4cec","read-only":false},"node-name":"drive-scsi1","read-only":false,"throttle-group":"throttle-drive-scsi1"}' \
+  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"auth-client-required":["none"],"cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"rbd","image":"vol-vm-8006-disk-0","node-name":"e3990bba2ed1f48c5bb23e9f37b4cec","pool":"cpool","read-only":false,"server":[{"host":"127.0.0.42","port":"3300"},{"host":"127.0.0.21","port":"3300"},{"host":"::1","port":"3300"}]},"node-name":"f3990bba2ed1f48c5bb23e9f37b4cec","read-only":false},"node-name":"drive-scsi1","read-only":false,"throttle-group":"throttle-drive-scsi1"}' \
   -device 'scsi-hd,bus=scsihw0.0,channel=0,scsi-id=0,lun=1,drive=drive-scsi1,id=scsi1,device_id=drive-scsi1,write-cache=on' \
-  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"auth-client-required":["none"],"cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"rbd","image":"vm-8006-disk-0","node-name":"e3beccc2a8f2eacb8b5df8055a7d093","pool":"cpool","read-only":false,"server":[{"host":"127.0.0.42","port":"3300"},{"host":"127.0.0.21","port":"3300"},{"host":"::1","port":"3300"}]},"node-name":"f3beccc2a8f2eacb8b5df8055a7d093","read-only":false},"node-name":"drive-scsi2","read-only":false,"throttle-group":"throttle-drive-scsi2"}' \
+  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"auth-client-required":["none"],"cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"rbd","image":"vol-vm-8006-disk-0","node-name":"e3beccc2a8f2eacb8b5df8055a7d093","pool":"cpool","read-only":false,"server":[{"host":"127.0.0.42","port":"3300"},{"host":"127.0.0.21","port":"3300"},{"host":"::1","port":"3300"}]},"node-name":"f3beccc2a8f2eacb8b5df8055a7d093","read-only":false},"node-name":"drive-scsi2","read-only":false,"throttle-group":"throttle-drive-scsi2"}' \
   -device 'scsi-hd,bus=scsihw0.0,channel=0,scsi-id=0,lun=2,drive=drive-scsi2,id=scsi2,device_id=drive-scsi2,write-cache=off' \
-  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"auth-client-required":["none"],"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"rbd","image":"vm-8006-disk-0","node-name":"eef923d5dfcee93fbc712b03f9f21af","pool":"cpool","read-only":false,"server":[{"host":"127.0.0.42","port":"3300"},{"host":"127.0.0.21","port":"3300"},{"host":"::1","port":"3300"}]},"node-name":"fef923d5dfcee93fbc712b03f9f21af","read-only":false},"node-name":"drive-scsi3","read-only":false,"throttle-group":"throttle-drive-scsi3"}' \
+  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"auth-client-required":["none"],"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"rbd","image":"vol-vm-8006-disk-0","node-name":"eef923d5dfcee93fbc712b03f9f21af","pool":"cpool","read-only":false,"server":[{"host":"127.0.0.42","port":"3300"},{"host":"127.0.0.21","port":"3300"},{"host":"::1","port":"3300"}]},"node-name":"fef923d5dfcee93fbc712b03f9f21af","read-only":false},"node-name":"drive-scsi3","read-only":false,"throttle-group":"throttle-drive-scsi3"}' \
   -device 'scsi-hd,bus=scsihw0.0,channel=0,scsi-id=0,lun=3,drive=drive-scsi3,id=scsi3,device_id=drive-scsi3,write-cache=off' \
-  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"host_device","filename":"/dev/rbd-pve/fc4181a6-56eb-4f68-b452-8ba1f381ca2a/cpool/vm-8006-disk-0","node-name":"eb2c7a292f03b9f6d015cf83ae79730","read-only":false},"node-name":"fb2c7a292f03b9f6d015cf83ae79730","read-only":false},"node-name":"drive-scsi4","read-only":false,"throttle-group":"throttle-drive-scsi4"}' \
+  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"host_device","filename":"/dev/rbd-pve/fc4181a6-56eb-4f68-b452-8ba1f381ca2a/cpool/vol-vm-8006-disk-0","node-name":"eb2c7a292f03b9f6d015cf83ae79730","read-only":false},"node-name":"fb2c7a292f03b9f6d015cf83ae79730","read-only":false},"node-name":"drive-scsi4","read-only":false,"throttle-group":"throttle-drive-scsi4"}' \
   -device 'scsi-hd,bus=scsihw0.0,channel=0,scsi-id=0,lun=4,drive=drive-scsi4,id=scsi4,device_id=drive-scsi4,write-cache=on' \
-  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"threads","cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"host_device","filename":"/dev/rbd-pve/fc4181a6-56eb-4f68-b452-8ba1f381ca2a/cpool/vm-8006-disk-0","node-name":"e5258ec75558b1f102af1e20e677fd0","read-only":false},"node-name":"f5258ec75558b1f102af1e20e677fd0","read-only":false},"node-name":"drive-scsi5","read-only":false,"throttle-group":"throttle-drive-scsi5"}' \
+  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"threads","cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"host_device","filename":"/dev/rbd-pve/fc4181a6-56eb-4f68-b452-8ba1f381ca2a/cpool/vol-vm-8006-disk-0","node-name":"e5258ec75558b1f102af1e20e677fd0","read-only":false},"node-name":"f5258ec75558b1f102af1e20e677fd0","read-only":false},"node-name":"drive-scsi5","read-only":false,"throttle-group":"throttle-drive-scsi5"}' \
   -device 'scsi-hd,bus=scsihw0.0,channel=0,scsi-id=0,lun=5,drive=drive-scsi5,id=scsi5,device_id=drive-scsi5,write-cache=on' \
-  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"threads","cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"host_device","filename":"/dev/rbd-pve/fc4181a6-56eb-4f68-b452-8ba1f381ca2a/cpool/vm-8006-disk-0","node-name":"edb33cdcea8ec3e2225509c4945227e","read-only":false},"node-name":"fdb33cdcea8ec3e2225509c4945227e","read-only":false},"node-name":"drive-scsi6","read-only":false,"throttle-group":"throttle-drive-scsi6"}' \
+  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"threads","cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"host_device","filename":"/dev/rbd-pve/fc4181a6-56eb-4f68-b452-8ba1f381ca2a/cpool/vol-vm-8006-disk-0","node-name":"edb33cdcea8ec3e2225509c4945227e","read-only":false},"node-name":"fdb33cdcea8ec3e2225509c4945227e","read-only":false},"node-name":"drive-scsi6","read-only":false,"throttle-group":"throttle-drive-scsi6"}' \
   -device 'scsi-hd,bus=scsihw0.0,channel=0,scsi-id=0,lun=6,drive=drive-scsi6,id=scsi6,device_id=drive-scsi6,write-cache=off' \
-  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"host_device","filename":"/dev/rbd-pve/fc4181a6-56eb-4f68-b452-8ba1f381ca2a/cpool/vm-8006-disk-0","node-name":"eb0b017124a47505c97a5da052e0141","read-only":false},"node-name":"fb0b017124a47505c97a5da052e0141","read-only":false},"node-name":"drive-scsi7","read-only":false,"throttle-group":"throttle-drive-scsi7"}' \
+  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"host_device","filename":"/dev/rbd-pve/fc4181a6-56eb-4f68-b452-8ba1f381ca2a/cpool/vol-vm-8006-disk-0","node-name":"eb0b017124a47505c97a5da052e0141","read-only":false},"node-name":"fb0b017124a47505c97a5da052e0141","read-only":false},"node-name":"drive-scsi7","read-only":false,"throttle-group":"throttle-drive-scsi7"}' \
   -device 'scsi-hd,bus=scsihw0.0,channel=0,scsi-id=0,lun=7,drive=drive-scsi7,id=scsi7,device_id=drive-scsi7,write-cache=off' \
   -netdev 'type=tap,id=net0,ifname=tap8006i0,script=/usr/libexec/qemu-server/pve-bridge,downscript=/usr/libexec/qemu-server/pve-bridgedown,vhost=on' \
   -device 'virtio-net-pci,mac=A2:C0:43:77:08:A0,netdev=net0,bus=pci.0,addr=0x12,id=net0,rx_queue_size=1024,tx_queue_size=256,bootindex=300' \
diff --git a/src/test/cfg2cmd/simple-virtio-blk.conf b/src/test/cfg2cmd/simple-virtio-blk.conf
index d9db7580..c5582792 100644
--- a/src/test/cfg2cmd/simple-virtio-blk.conf
+++ b/src/test/cfg2cmd/simple-virtio-blk.conf
@@ -9,5 +9,5 @@ numa: 0
 ostype: l26
 smbios1: uuid=7b10d7af-b932-4c66-b2c3-3996152ec465
 sockets: 1
-virtio0: local:8006/vm-8006-disk-0.qcow2,discard=on,iothread=1,size=104858K
+virtio0: local:8006/vol-vm-8006-disk-0.qcow2,discard=on,iothread=1,size=104858K
 vmgenid: c773c261-d800-4348-9f5d-167fadd53cf8
diff --git a/src/test/cfg2cmd/simple-virtio-blk.conf.cmd b/src/test/cfg2cmd/simple-virtio-blk.conf.cmd
index a9acb0cf..6eae2c1b 100644
--- a/src/test/cfg2cmd/simple-virtio-blk.conf.cmd
+++ b/src/test/cfg2cmd/simple-virtio-blk.conf.cmd
@@ -28,7 +28,7 @@
   -device 'virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3,free-page-reporting=on' \
   -iscsi 'initiator-name=iqn.1993-08.org.debian:01:aabbccddeeff' \
   -device 'ide-cd,bus=ide.1,unit=0,id=ide2,bootindex=200' \
-  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/var/lib/vz/images/8006/vm-8006-disk-0.qcow2","node-name":"edd19f6c1b3a6d5a6248c3376a91a16","read-only":false},"node-name":"fdd19f6c1b3a6d5a6248c3376a91a16","read-only":false},"node-name":"drive-virtio0","read-only":false,"throttle-group":"throttle-drive-virtio0"}' \
+  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/var/lib/vz/vms/8006/vol-vm-8006-disk-0.qcow2","node-name":"edd19f6c1b3a6d5a6248c3376a91a16","read-only":false},"node-name":"fdd19f6c1b3a6d5a6248c3376a91a16","read-only":false},"node-name":"drive-virtio0","read-only":false,"throttle-group":"throttle-drive-virtio0"}' \
   -device 'virtio-blk-pci,drive=drive-virtio0,id=virtio0,bus=pci.0,addr=0xa,iothread=iothread-virtio0,bootindex=100,write-cache=on' \
   -netdev 'type=tap,id=net0,ifname=tap8006i0,script=/usr/libexec/qemu-server/pve-bridge,downscript=/usr/libexec/qemu-server/pve-bridgedown,vhost=on' \
   -device 'virtio-net-pci,mac=A2:C0:43:77:08:A0,netdev=net0,bus=pci.0,addr=0x12,id=net0,rx_queue_size=1024,tx_queue_size=256,bootindex=300' \
diff --git a/src/test/cfg2cmd/simple-zfs-over-iscsi.conf b/src/test/cfg2cmd/simple-zfs-over-iscsi.conf
index 4dbf2b7c..0e76dbb5 100644
--- a/src/test/cfg2cmd/simple-zfs-over-iscsi.conf
+++ b/src/test/cfg2cmd/simple-zfs-over-iscsi.conf
@@ -7,10 +7,10 @@ name: simple
 net0: virtio=A2:C0:43:77:08:A0,bridge=vmbr0
 numa: 0
 ostype: l26
-scsi0: zfs-over-iscsi-store:vm-8006-disk-0,discard=on,size=104858K
-scsi1: zfs-over-iscsi-store:vm-8006-disk-0,cache=writeback,discard=on,size=104858K
-scsi2: zfs-over-iscsi-store:vm-8006-disk-0,cache=writethrough,discard=on,size=104858K
-scsi3: zfs-over-iscsi-store:vm-8006-disk-0,cache=directsync,discard=on,size=104858K
+scsi0: zfs-over-iscsi-store:vol-vm-8006-disk-0,discard=on,size=104858K
+scsi1: zfs-over-iscsi-store:vol-vm-8006-disk-0,cache=writeback,discard=on,size=104858K
+scsi2: zfs-over-iscsi-store:vol-vm-8006-disk-0,cache=writethrough,discard=on,size=104858K
+scsi3: zfs-over-iscsi-store:vol-vm-8006-disk-0,cache=directsync,discard=on,size=104858K
 scsihw: virtio-scsi-pci
 smbios1: uuid=7b10d7af-b932-4c66-b2c3-3996152ec465
 sockets: 1
diff --git a/src/test/cfg2cmd/simple1.conf b/src/test/cfg2cmd/simple1.conf
index 9feb9d26..a887e736 100644
--- a/src/test/cfg2cmd/simple1.conf
+++ b/src/test/cfg2cmd/simple1.conf
@@ -7,7 +7,7 @@ name: simple
 net0: virtio=A2:C0:43:77:08:A0,bridge=vmbr0
 numa: 0
 ostype: l26
-scsi0: local:8006/vm-8006-disk-0.qcow2,discard=on,size=104858K
+scsi0: local:8006/vol-vm-8006-disk-0.qcow2,discard=on,size=104858K
 scsihw: virtio-scsi-pci
 smbios1: uuid=7b10d7af-b932-4c66-b2c3-3996152ec465
 sockets: 1
diff --git a/src/test/cfg2cmd/simple1.conf.cmd b/src/test/cfg2cmd/simple1.conf.cmd
index 49b848f2..c17d3262 100644
--- a/src/test/cfg2cmd/simple1.conf.cmd
+++ b/src/test/cfg2cmd/simple1.conf.cmd
@@ -28,7 +28,7 @@
   -iscsi 'initiator-name=iqn.1993-08.org.debian:01:aabbccddeeff' \
   -device 'ide-cd,bus=ide.1,unit=0,id=ide2,bootindex=200' \
   -device 'virtio-scsi-pci,id=scsihw0,bus=pci.0,addr=0x5' \
-  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/var/lib/vz/images/8006/vm-8006-disk-0.qcow2","node-name":"ecd04be4259153b8293415fefa2a84c","read-only":false},"node-name":"fcd04be4259153b8293415fefa2a84c","read-only":false},"node-name":"drive-scsi0","read-only":false,"throttle-group":"throttle-drive-scsi0"}' \
+  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/var/lib/vz/vms/8006/vol-vm-8006-disk-0.qcow2","node-name":"ecd04be4259153b8293415fefa2a84c","read-only":false},"node-name":"fcd04be4259153b8293415fefa2a84c","read-only":false},"node-name":"drive-scsi0","read-only":false,"throttle-group":"throttle-drive-scsi0"}' \
   -device 'scsi-hd,bus=scsihw0.0,channel=0,scsi-id=0,lun=0,drive=drive-scsi0,id=scsi0,device_id=drive-scsi0,bootindex=100,write-cache=on' \
   -netdev 'type=tap,id=net0,ifname=tap8006i0,script=/usr/libexec/qemu-server/pve-bridge,downscript=/usr/libexec/qemu-server/pve-bridgedown,vhost=on' \
   -device 'virtio-net-pci,mac=A2:C0:43:77:08:A0,netdev=net0,bus=pci.0,addr=0x12,id=net0,rx_queue_size=1024,tx_queue_size=256,bootindex=300' \
diff --git a/src/test/cfg2cmd/unsupported-storage-content-type.conf b/src/test/cfg2cmd/unsupported-storage-content-type.conf
index e33165a8..b2da3084 100644
--- a/src/test/cfg2cmd/unsupported-storage-content-type.conf
+++ b/src/test/cfg2cmd/unsupported-storage-content-type.conf
@@ -1,3 +1,3 @@
 # TEST: Unsupported storage content type in a volume disk
 # EXPECT_ERROR: storage 'noimages' does not support content-type 'images'
-scsi0: noimages:8006/vm-8006-disk-0.raw,iothread=1,size=32G
+scsi0: noimages:8006/vol-vm-8006-disk-0.raw,iothread=1,size=32G
diff --git a/src/test/parse-config-expected/cloudinit-snapshot.conf b/src/test/parse-config-expected/cloudinit-snapshot.conf
index bc01f975..b9ec855b 100644
--- a/src/test/parse-config-expected/cloudinit-snapshot.conf
+++ b/src/test/parse-config-expected/cloudinit-snapshot.conf
@@ -10,11 +10,11 @@ net0: vmxnet3=BC:24:11:2C:69:EC,bridge=vnet0,firewall=1
 numa: 0
 ostype: l26
 parent: cloudinit
-scsi0: nfs:120/vm-120-disk-0.qcow2,iothread=1,size=4G
+scsi0: nfs:120/vol-vm-120-disk-0.qcow2,iothread=1,size=4G
 scsihw: virtio-scsi-single
 smbios1: uuid=b3247ab1-1fe6-428e-965b-08a1b64a8746
 sockets: 1
-unused0: rbd:vm-120-disk-0
+unused0: rbd:vol-vm-120-disk-0
 vmgenid: 7079e97c-50e3-4079-afe7-23e67566b946
 
 [special:cloudinit]
@@ -32,7 +32,7 @@ meta: creation-qemu=9.0.2,ctime=1725975013
 name: deb1223
 net0: vmxnet3=BC:24:11:2C:69:EC,bridge=vnet0,firewall=1
 ostype: l26
-scsi0: nfs:120/vm-120-disk-0.qcow2,iothread=1,size=4G
+scsi0: nfs:120/vol-vm-120-disk-0.qcow2,iothread=1,size=4G
 scsihw: virtio-scsi-single
 smbios1: uuid=b3247ab1-1fe6-428e-965b-08a1b64a8746
 snaptime: 1737549549
diff --git a/src/test/parse-config-expected/duplicate-sections.conf b/src/test/parse-config-expected/duplicate-sections.conf
index 1cb7a88a..ae6aaaa1 100644
--- a/src/test/parse-config-expected/duplicate-sections.conf
+++ b/src/test/parse-config-expected/duplicate-sections.conf
@@ -10,11 +10,11 @@ net0: vmxnet3=BC:24:11:2C:69:EC,bridge=vnet0,firewall=1
 numa: 0
 ostype: l26
 parent: foo
-scsi0: nfs:120/vm-120-disk-0.qcow2,iothread=1,size=4G
+scsi0: nfs:120/vol-vm-120-disk-0.qcow2,iothread=1,size=4G
 scsihw: virtio-scsi-single
 smbios1: uuid=b3247ab1-1fe6-428e-965b-08a1b64a8746
 sockets: 1
-unused0: rbd:vm-120-disk-0
+unused0: rbd:vol-vm-120-disk-0
 vmgenid: 7079e97c-50e3-4079-afe7-23e67566b946
 
 [PENDING]
@@ -35,7 +35,7 @@ name: deb1223
 net0: vmxnet3=BC:24:11:2C:69:EC,bridge=vnet0,firewall=1
 numa: 0
 ostype: l26
-scsi0: nfs:120/vm-120-disk-0.qcow2,iothread=1,size=4G
+scsi0: nfs:120/vol-vm-120-disk-0.qcow2,iothread=1,size=4G
 scsihw: virtio-scsi-single
 smbios1: uuid=b3247ab1-1fe6-428e-965b-08a1b64a8746
 snaptime: 1737548747
diff --git a/src/test/parse-config-expected/unknown-sections.conf b/src/test/parse-config-expected/unknown-sections.conf
index 6329c33a..57e8a14f 100644
--- a/src/test/parse-config-expected/unknown-sections.conf
+++ b/src/test/parse-config-expected/unknown-sections.conf
@@ -10,11 +10,11 @@ net0: vmxnet3=BC:24:11:2C:69:EC,bridge=vnet0,firewall=1
 numa: 0
 ostype: l26
 parent: foo
-scsi0: nfs:120/vm-120-disk-0.qcow2,iothread=1,size=4G
+scsi0: nfs:120/vol-vm-120-disk-0.qcow2,iothread=1,size=4G
 scsihw: virtio-scsi-single
 smbios1: uuid=b3247ab1-1fe6-428e-965b-08a1b64a8746
 sockets: 1
-unused0: rbd:vm-120-disk-0
+unused0: rbd:vol-vm-120-disk-0
 vmgenid: 7079e97c-50e3-4079-afe7-23e67566b946
 
 [PENDING]
@@ -36,7 +36,7 @@ name: deb1223
 net0: vmxnet3=BC:24:11:2C:69:EC,bridge=vnet0,firewall=1
 numa: 0
 ostype: l26
-scsi0: nfs:120/vm-120-disk-0.qcow2,iothread=1,size=4G
+scsi0: nfs:120/vol-vm-120-disk-0.qcow2,iothread=1,size=4G
 scsihw: virtio-scsi-single
 smbios1: uuid=b3247ab1-1fe6-428e-965b-08a1b64a8746
 snaptime: 1737548747
diff --git a/src/test/parse-config-expected/verify-snapshot.conf b/src/test/parse-config-expected/verify-snapshot.conf
index cd503f86..04fa1ee1 100644
--- a/src/test/parse-config-expected/verify-snapshot.conf
+++ b/src/test/parse-config-expected/verify-snapshot.conf
@@ -10,11 +10,11 @@ net0: vmxnet3=BC:24:11:2C:69:EC,bridge=vnet0,firewall=1
 numa: 0
 ostype: l26
 parent: snap
-scsi0: nfs:120/vm-120-disk-0.qcow2,iothread=1,size=4G
+scsi0: nfs:120/vol-vm-120-disk-0.qcow2,iothread=1,size=4G
 scsihw: virtio-scsi-single
 smbios1: uuid=b3247ab1-1fe6-428e-965b-08a1b64a8746
 sockets: 1
-unused0: rbd:vm-120-disk-0
+unused0: rbd:vol-vm-120-disk-0
 vmgenid: 7079e97c-50e3-4079-afe7-23e67566b946
 
 [snap]
@@ -28,7 +28,7 @@ meta: creation-qemu=9.0.2,ctime=1725975013
 name: deb1223
 net0: vmxnet3=BC:24:11:2C:69:EC,bridge=vnet0,firewall=1
 ostype: l26
-scsi0: nfs:120/vm-120-disk-0.qcow2,iothread=1,size=4G
+scsi0: nfs:120/vol-vm-120-disk-0.qcow2,iothread=1,size=4G
 scsihw: virtio-scsi-single
 smbios1: uuid=b3247ab1-1fe6-428e-965b-08a1b64a8746
 snaptime: 1737549549
diff --git a/src/test/parse-config-input/cloudinit-snapshot.conf b/src/test/parse-config-input/cloudinit-snapshot.conf
index 9be05b1c..98ba017f 100644
--- a/src/test/parse-config-input/cloudinit-snapshot.conf
+++ b/src/test/parse-config-input/cloudinit-snapshot.conf
@@ -10,11 +10,11 @@ net0: vmxnet3=BC:24:11:2C:69:EC,bridge=vnet0,firewall=1
 numa: 0
 ostype: l26
 parent: cloudinit
-scsi0: nfs:120/vm-120-disk-0.qcow2,iothread=1,size=4G
+scsi0: nfs:120/vol-vm-120-disk-0.qcow2,iothread=1,size=4G
 scsihw: virtio-scsi-single
 smbios1: uuid=b3247ab1-1fe6-428e-965b-08a1b64a8746
 sockets: 1
-unused0: rbd:vm-120-disk-0
+unused0: rbd:vol-vm-120-disk-0
 vmgenid: 7079e97c-50e3-4079-afe7-23e67566b946
 
 [special:cloudinit]
@@ -33,7 +33,7 @@ name: deb1223
 net0: vmxnet3=BC:24:11:2C:69:EC,bridge=vnet0,firewall=1
 numa: verify meee~ :)
 ostype: l26
-scsi0: nfs:120/vm-120-disk-0.qcow2,iothread=1,size=4G
+scsi0: nfs:120/vol-vm-120-disk-0.qcow2,iothread=1,size=4G
 scsihw: virtio-scsi-single
 smbios1: uuid=b3247ab1-1fe6-428e-965b-08a1b64a8746
 snaptime: 1737549549
diff --git a/src/test/parse-config-input/duplicate-sections.conf b/src/test/parse-config-input/duplicate-sections.conf
index 41e90e37..064a7b33 100644
--- a/src/test/parse-config-input/duplicate-sections.conf
+++ b/src/test/parse-config-input/duplicate-sections.conf
@@ -10,11 +10,11 @@ net0: vmxnet3=BC:24:11:2C:69:EC,bridge=vnet0,firewall=1
 numa: 0
 ostype: l26
 parent: foo
-scsi0: nfs:120/vm-120-disk-0.qcow2,iothread=1,size=4G
+scsi0: nfs:120/vol-vm-120-disk-0.qcow2,iothread=1,size=4G
 scsihw: virtio-scsi-single
 smbios1: uuid=b3247ab1-1fe6-428e-965b-08a1b64a8746
 sockets: 1
-unused0: rbd:vm-120-disk-0
+unused0: rbd:vol-vm-120-disk-0
 vmgenid: 7079e97c-50e3-4079-afe7-23e67566b946
 
 [PENDING]
@@ -41,7 +41,7 @@ name: deb1223
 net0: vmxnet3=BC:24:11:2C:69:EC,bridge=vnet0,firewall=1
 numa: 0
 ostype: l26
-scsi0: nfs:120/vm-120-disk-0.qcow2,iothread=1,size=4G
+scsi0: nfs:120/vol-vm-120-disk-0.qcow2,iothread=1,size=4G
 scsihw: virtio-scsi-single
 smbios1: uuid=b3247ab1-1fe6-428e-965b-08a1b64a8746
 snaptime: 1737548747
@@ -60,7 +60,7 @@ name: deb1223
 net0: vmxnet3=BC:24:11:2C:69:EC,bridge=vnet0,firewall=1
 numa: 0
 ostype: l26
-scsi0: nfs:120/vm-120-disk-0.qcow2,iothread=1,size=4G
+scsi0: nfs:120/vol-vm-120-disk-0.qcow2,iothread=1,size=4G
 scsihw: virtio-scsi-single
 smbios1: uuid=b3247ab1-1fe6-428e-965b-08a1b64a8746
 snaptime: 1737548747
diff --git a/src/test/parse-config-input/fleecing-section.conf b/src/test/parse-config-input/fleecing-section.conf
index ee89dc56..30c65ede 100644
--- a/src/test/parse-config-input/fleecing-section.conf
+++ b/src/test/parse-config-input/fleecing-section.conf
@@ -9,11 +9,11 @@ name: deb1223
 net0: vmxnet3=BC:24:11:2C:69:EC,bridge=vnet0,firewall=1
 numa: 0
 ostype: l26
-scsi0: nfs:120/vm-120-disk-0.qcow2,iothread=1,size=4G
+scsi0: nfs:120/vol-vm-120-disk-0.qcow2,iothread=1,size=4G
 scsihw: virtio-scsi-single
 smbios1: uuid=b3247ab1-1fe6-428e-965b-08a1b64a8746
 sockets: 1
-unused0: rbd:vm-120-disk-0
+unused0: rbd:vol-vm-120-disk-0
 vmgenid: 7079e97c-50e3-4079-afe7-23e67566b946
 
 [special:fleecing]
diff --git a/src/test/parse-config-input/locked.conf b/src/test/parse-config-input/locked.conf
index 38b6e36c..610026b7 100644
--- a/src/test/parse-config-input/locked.conf
+++ b/src/test/parse-config-input/locked.conf
@@ -8,9 +8,9 @@ name: apache
 net0: virtio=92:38:11:FD:ED:87,bridge=vmbr0,firewall=1
 numa: 0
 ostype: l26
-scsi0: mydir:1422/vm-1422-disk-0.qcow2,size=4G
+scsi0: mydir:1422/vol-vm-1422-disk-0.qcow2,size=4G
 scsihw: virtio-scsi-pci
 smbios1: uuid=ddf91b3f-a597-42be-9a7e-fb6421dcd5cd
 sockets: 1
-unused7: mydir:1422/vm-1422-disk-8.qcow2
+unused7: mydir:1422/vol-vm-1422-disk-8.qcow2
 vmgenid: 0
diff --git a/src/test/parse-config-input/plain.conf b/src/test/parse-config-input/plain.conf
index 63449b9e..8e36cc5a 100644
--- a/src/test/parse-config-input/plain.conf
+++ b/src/test/parse-config-input/plain.conf
@@ -7,7 +7,7 @@ name: apache
 net0: virtio=92:38:11:FD:ED:87,bridge=vmbr0,firewall=1
 numa: 0
 ostype: l26
-scsi0: mydir:142/vm-142-disk-0.qcow2,size=4G
+scsi0: mydir:142/vol-vm-142-disk-0.qcow2,size=4G
 scsihw: virtio-scsi-pci
 smbios1: uuid=ddf91b3f-a597-42be-9a7e-fb6421dcd5cd
 sockets: 1
diff --git a/src/test/parse-config-input/regular-vm-efi.conf b/src/test/parse-config-input/regular-vm-efi.conf
index 9d75fff2..91c9528e 100644
--- a/src/test/parse-config-input/regular-vm-efi.conf
+++ b/src/test/parse-config-input/regular-vm-efi.conf
@@ -2,14 +2,14 @@
 bios: ovmf
 boot: order=scsi0;ide2;net0
 cores: 1
-efidisk0: mydir:139/vm-139-disk-0.qcow2,size=128K
+efidisk0: mydir:139/vol-vm-139-disk-0.qcow2,size=128K
 ide2: local:iso/debian-10.6.0-amd64-netinst.iso,media=cdrom
 memory: 2048
 name: eficloneclone
 net0: virtio=7A:6C:A5:8B:11:93,bridge=vmbr0,firewall=1
 numa: 0
 ostype: l26
-scsi0: rbdkvm:vm-139-disk-1,size=4G
+scsi0: rbdkvm:vol-vm-139-disk-1,size=4G
 scsihw: virtio-scsi-pci
 smbios1: uuid=21a7e7bc-3cd2-4232-a009-a41f4ee992ae
 sockets: 1
diff --git a/src/test/parse-config-input/sections.conf b/src/test/parse-config-input/sections.conf
index 6329c33a..57e8a14f 100644
--- a/src/test/parse-config-input/sections.conf
+++ b/src/test/parse-config-input/sections.conf
@@ -10,11 +10,11 @@ net0: vmxnet3=BC:24:11:2C:69:EC,bridge=vnet0,firewall=1
 numa: 0
 ostype: l26
 parent: foo
-scsi0: nfs:120/vm-120-disk-0.qcow2,iothread=1,size=4G
+scsi0: nfs:120/vol-vm-120-disk-0.qcow2,iothread=1,size=4G
 scsihw: virtio-scsi-single
 smbios1: uuid=b3247ab1-1fe6-428e-965b-08a1b64a8746
 sockets: 1
-unused0: rbd:vm-120-disk-0
+unused0: rbd:vol-vm-120-disk-0
 vmgenid: 7079e97c-50e3-4079-afe7-23e67566b946
 
 [PENDING]
@@ -36,7 +36,7 @@ name: deb1223
 net0: vmxnet3=BC:24:11:2C:69:EC,bridge=vnet0,firewall=1
 numa: 0
 ostype: l26
-scsi0: nfs:120/vm-120-disk-0.qcow2,iothread=1,size=4G
+scsi0: nfs:120/vol-vm-120-disk-0.qcow2,iothread=1,size=4G
 scsihw: virtio-scsi-single
 smbios1: uuid=b3247ab1-1fe6-428e-965b-08a1b64a8746
 snaptime: 1737548747
diff --git a/src/test/parse-config-input/snapshots.conf b/src/test/parse-config-input/snapshots.conf
index 4f4f8675..a0ea59ac 100644
--- a/src/test/parse-config-input/snapshots.conf
+++ b/src/test/parse-config-input/snapshots.conf
@@ -1,7 +1,7 @@
 boot: order=scsi1;ide2;net0;ide1
 cores: 4
 cpu: x86-64-v2-AES
-ide0: dir:111/vm-111-disk-2.qcow2,size=1G
+ide0: dir:111/vol-vm-111-disk-2.qcow2,size=1G
 ide1: sani:iso/virtio-win-0.1.266.iso,media=cdrom,size=707456K
 ide2: sani:iso/Win2019-evaluation.iso,media=cdrom,size=4985424K
 machine: pc-i440fx-9.1
@@ -13,21 +13,21 @@ net1: e1000=BC:24:11:79:D5:65,bridge=vnet0,firewall=1
 numa: 0
 ostype: win10
 parent: win19_5_2_plus_stuff
-scsi0: dir:111/vm-111-disk-1.qcow2,iothread=1,size=1G
-scsi1: lvmthinbig:vm-111-disk-0,iothread=1,size=32G
+scsi0: dir:111/vol-vm-111-disk-1.qcow2,iothread=1,size=1G
+scsi1: lvmthinbig:vol-vm-111-disk-0,iothread=1,size=32G
 scsihw: virtio-scsi-single
 smbios1: uuid=2c4a2cda-712b-44ab-8728-51f5e734b658
 sockets: 1
-unused0: rbd:vm-111-disk-0
+unused0: rbd:vol-vm-111-disk-0
 vga: qxl
-virtio0: dir:111/vm-111-disk-0.qcow2,iothread=1,size=1G
+virtio0: dir:111/vol-vm-111-disk-0.qcow2,iothread=1,size=1G
 vmgenid: 713da648-38a6-489e-b0b2-dd9cef419f33
 
 [machine_version_5_1]
 boot: order=ide0;ide2;net0
 cores: 4
 cpu: x86-64-v2-AES
-ide0: lvmthinbig:vm-111-disk-0,size=32G
+ide0: lvmthinbig:vol-vm-111-disk-0,size=32G
 ide2: sani:iso/Win2016-1616-evaluation.ISO,media=cdrom,size=5198078K
 memory: 4096
 meta: creation-qemu=9.1.2,ctime=1736349024
@@ -45,7 +45,7 @@ vmgenid: 1f314a76-50a3-4b92-9307-c8c6e313d3ca
 boot: order=ide0;ide2;net0;ide1
 cores: 4
 cpu: x86-64-v2-AES
-ide0: lvmthinbig:vm-111-disk-0,size=32G
+ide0: lvmthinbig:vol-vm-111-disk-0,size=32G
 ide1: sani:iso/virtio-win-0.1.266.iso,media=cdrom,size=707456K
 ide2: sani:iso/Win2016-1616-evaluation.ISO,media=cdrom,size=5198078K
 memory: 4096
@@ -55,12 +55,12 @@ net0: virtio=BC:24:11:A3:DA:B1,bridge=vnet0,firewall=1
 numa: 0
 ostype: win10
 parent: machine_version_5_1
-scsi0: dir:111/vm-111-disk-1.qcow2,iothread=1,size=1G
+scsi0: dir:111/vol-vm-111-disk-1.qcow2,iothread=1,size=1G
 scsihw: virtio-scsi-single
 smbios1: uuid=2c4a2cda-712b-44ab-8728-51f5e734b658
 snaptime: 1736940462
 sockets: 1
-virtio0: dir:111/vm-111-disk-0.qcow2,iothread=1,size=1G
+virtio0: dir:111/vol-vm-111-disk-0.qcow2,iothread=1,size=1G
 vmgenid: 4f602356-cb9c-45ad-a554-d76d95c7c0f8
 
 [ovmf_machine_version_5_1]
@@ -68,8 +68,8 @@ bios: ovmf
 boot: order=ide0;ide2;net0;ide1
 cores: 4
 cpu: x86-64-v2-AES
-efidisk0: rbd:vm-111-disk-0,efitype=4m,pre-enrolled-keys=1,size=1M
-ide0: lvmthinbig:vm-111-disk-0,size=32G
+efidisk0: rbd:vol-vm-111-disk-0,efitype=4m,pre-enrolled-keys=1,size=1M
+ide0: lvmthinbig:vol-vm-111-disk-0,size=32G
 ide1: sani:iso/virtio-win-0.1.266.iso,media=cdrom,size=707456K
 ide2: sani:iso/Win2016-1616-evaluation.ISO,media=cdrom,size=5198078K
 machine: pc-q35-5.1
@@ -80,12 +80,12 @@ net0: e1000=BC:24:11:A3:DA:B1,bridge=vnet0,firewall=1
 numa: 0
 ostype: win10
 parent: machine_version_5_1_with_virtio
-scsi0: dir:111/vm-111-disk-1.qcow2,iothread=1,size=1G
+scsi0: dir:111/vol-vm-111-disk-1.qcow2,iothread=1,size=1G
 scsihw: virtio-scsi-single
 smbios1: uuid=2c4a2cda-712b-44ab-8728-51f5e734b658
 snaptime: 1736943308
 sockets: 1
-virtio0: dir:111/vm-111-disk-0.qcow2,iothread=1,size=1G
+virtio0: dir:111/vol-vm-111-disk-0.qcow2,iothread=1,size=1G
 vmgenid: 4f602356-cb9c-45ad-a554-d76d95c7c0f8
 
 [ovmf_machine_version_5_1_virtio]
@@ -93,8 +93,8 @@ bios: ovmf
 boot: order=ide0;ide2;net0;ide1
 cores: 4
 cpu: x86-64-v2-AES
-efidisk0: rbd:vm-111-disk-0,efitype=4m,pre-enrolled-keys=1,size=1M
-ide0: lvmthinbig:vm-111-disk-0,size=32G
+efidisk0: rbd:vol-vm-111-disk-0,efitype=4m,pre-enrolled-keys=1,size=1M
+ide0: lvmthinbig:vol-vm-111-disk-0,size=32G
 ide1: sani:iso/virtio-win-0.1.266.iso,media=cdrom,size=707456K
 ide2: sani:iso/Win2016-1616-evaluation.ISO,media=cdrom,size=5198078K
 machine: pc-q35-5.1
@@ -105,12 +105,12 @@ net0: virtio=BC:24:11:A3:DA:B1,bridge=vnet0,firewall=1
 numa: 0
 ostype: win10
 parent: ovmf_machine_version_5_1
-scsi0: dir:111/vm-111-disk-1.qcow2,iothread=1,size=1G
+scsi0: dir:111/vol-vm-111-disk-1.qcow2,iothread=1,size=1G
 scsihw: virtio-scsi-single
 smbios1: uuid=2c4a2cda-712b-44ab-8728-51f5e734b658
 snaptime: 1736944525
 sockets: 1
-virtio0: dir:111/vm-111-disk-0.qcow2,iothread=1,size=1G
+virtio0: dir:111/vol-vm-111-disk-0.qcow2,iothread=1,size=1G
 vmgenid: 00b95468-4f34-4faa-b0af-b214ff5bbcdf
 
 [static-network]
@@ -118,8 +118,8 @@ bios: ovmf
 boot: order=ide0;ide2;net0;ide1
 cores: 4
 cpu: x86-64-v2-AES
-efidisk0: rbd:vm-111-disk-0,efitype=4m,pre-enrolled-keys=1,size=1M
-ide0: lvmthinbig:vm-111-disk-0,size=32G
+efidisk0: rbd:vol-vm-111-disk-0,efitype=4m,pre-enrolled-keys=1,size=1M
+ide0: lvmthinbig:vol-vm-111-disk-0,size=32G
 ide1: sani:iso/virtio-win-0.1.266.iso,media=cdrom,size=707456K
 ide2: sani:iso/Win2016-1616-evaluation.ISO,media=cdrom,size=5198078K
 machine: pc-q35-5.1
@@ -130,12 +130,12 @@ net0: virtio=BC:24:11:A3:DA:B1,bridge=vnet0,firewall=1
 numa: 0
 ostype: win10
 parent: ovmf_machine_version_5_1_virtio
-scsi0: dir:111/vm-111-disk-1.qcow2,iothread=1,size=1G
+scsi0: dir:111/vol-vm-111-disk-1.qcow2,iothread=1,size=1G
 scsihw: virtio-scsi-single
 smbios1: uuid=2c4a2cda-712b-44ab-8728-51f5e734b658
 snaptime: 1736945713
 sockets: 1
-virtio0: dir:111/vm-111-disk-0.qcow2,iothread=1,size=1G
+virtio0: dir:111/vol-vm-111-disk-0.qcow2,iothread=1,size=1G
 vmgenid: 5d65fc62-2cb1-4945-9641-631b37c265a5
 
 [win19_5_2]
@@ -153,20 +153,20 @@ net1: e1000=BC:24:11:79:D5:65,bridge=vnet0,firewall=1
 numa: 0
 ostype: win10
 parent: machine_version_5_1_with_virtio
-scsi0: dir:111/vm-111-disk-1.qcow2,iothread=1,size=1G
-scsi1: lvmthinbig:vm-111-disk-0,iothread=1,size=32G
+scsi0: dir:111/vol-vm-111-disk-1.qcow2,iothread=1,size=1G
+scsi1: lvmthinbig:vol-vm-111-disk-0,iothread=1,size=32G
 scsihw: virtio-scsi-single
 smbios1: uuid=2c4a2cda-712b-44ab-8728-51f5e734b658
 snaptime: 1736950690
 sockets: 1
-virtio0: dir:111/vm-111-disk-0.qcow2,iothread=1,size=1G
+virtio0: dir:111/vol-vm-111-disk-0.qcow2,iothread=1,size=1G
 vmgenid: f259de06-fa08-4ff7-8ba9-b1233a726ac4
 
 [win19_5_2_plus_stuff]
 boot: order=scsi1;ide2;net0;ide1
 cores: 4
 cpu: x86-64-v2-AES
-ide0: dir:111/vm-111-disk-2.qcow2,size=1G
+ide0: dir:111/vol-vm-111-disk-2.qcow2,size=1G
 ide1: sani:iso/virtio-win-0.1.266.iso,media=cdrom,size=707456K
 ide2: sani:iso/Win2019-evaluation.iso,media=cdrom,size=4985424K
 machine: pc-i440fx-5.2
@@ -178,12 +178,12 @@ net1: e1000=BC:24:11:79:D5:65,bridge=vnet0,firewall=1
 numa: 0
 ostype: win10
 parent: win19_5_2
-scsi0: dir:111/vm-111-disk-1.qcow2,iothread=1,size=1G
-scsi1: lvmthinbig:vm-111-disk-0,iothread=1,size=32G
+scsi0: dir:111/vol-vm-111-disk-1.qcow2,iothread=1,size=1G
+scsi1: lvmthinbig:vol-vm-111-disk-0,iothread=1,size=32G
 scsihw: virtio-scsi-single
 smbios1: uuid=2c4a2cda-712b-44ab-8728-51f5e734b658
 snaptime: 1736951300
 sockets: 1
 vga: qxl
-virtio0: dir:111/vm-111-disk-0.qcow2,iothread=1,size=1G
+virtio0: dir:111/vol-vm-111-disk-0.qcow2,iothread=1,size=1G
 vmgenid: 713da648-38a6-489e-b0b2-dd9cef419f33
diff --git a/src/test/parse-config-input/unknown-sections.conf b/src/test/parse-config-input/unknown-sections.conf
index 0dcd5951..0c86feee 100644
--- a/src/test/parse-config-input/unknown-sections.conf
+++ b/src/test/parse-config-input/unknown-sections.conf
@@ -10,11 +10,11 @@ net0: vmxnet3=BC:24:11:2C:69:EC,bridge=vnet0,firewall=1
 numa: 0
 ostype: l26
 parent: foo
-scsi0: nfs:120/vm-120-disk-0.qcow2,iothread=1,size=4G
+scsi0: nfs:120/vol-vm-120-disk-0.qcow2,iothread=1,size=4G
 scsihw: virtio-scsi-single
 smbios1: uuid=b3247ab1-1fe6-428e-965b-08a1b64a8746
 sockets: 1
-unused0: rbd:vm-120-disk-0
+unused0: rbd:vol-vm-120-disk-0
 vmgenid: 7079e97c-50e3-4079-afe7-23e67566b946
 
 [special:unknown123]
@@ -45,7 +45,7 @@ name: deb1223
 net0: vmxnet3=BC:24:11:2C:69:EC,bridge=vnet0,firewall=1
 numa: 0
 ostype: l26
-scsi0: nfs:120/vm-120-disk-0.qcow2,iothread=1,size=4G
+scsi0: nfs:120/vol-vm-120-disk-0.qcow2,iothread=1,size=4G
 scsihw: virtio-scsi-single
 smbios1: uuid=b3247ab1-1fe6-428e-965b-08a1b64a8746
 snaptime: 1737548747
diff --git a/src/test/parse-config-input/verify-snapshot.conf b/src/test/parse-config-input/verify-snapshot.conf
index 5f52272d..4ad27782 100644
--- a/src/test/parse-config-input/verify-snapshot.conf
+++ b/src/test/parse-config-input/verify-snapshot.conf
@@ -10,11 +10,11 @@ net0: vmxnet3=BC:24:11:2C:69:EC,bridge=vnet0,firewall=1
 numa: 0
 ostype: l26
 parent: snap
-scsi0: nfs:120/vm-120-disk-0.qcow2,iothread=1,size=4G
+scsi0: nfs:120/vol-vm-120-disk-0.qcow2,iothread=1,size=4G
 scsihw: virtio-scsi-single
 smbios1: uuid=b3247ab1-1fe6-428e-965b-08a1b64a8746
 sockets: 1
-unused0: rbd:vm-120-disk-0
+unused0: rbd:vol-vm-120-disk-0
 vmgenid: 7079e97c-50e3-4079-afe7-23e67566b946
 
 [snap]
@@ -29,7 +29,7 @@ name: deb1223
 net0: vmxnet3=BC:24:11:2C:69:EC,bridge=vnet0,firewall=1
 numa: verify meee~ :)
 ostype: l26
-scsi0: nfs:120/vm-120-disk-0.qcow2,iothread=1,size=4G
+scsi0: nfs:120/vol-vm-120-disk-0.qcow2,iothread=1,size=4G
 scsihw: virtio-scsi-single
 smbios1: uuid=b3247ab1-1fe6-428e-965b-08a1b64a8746
 snaptime: 1737549549
diff --git a/src/test/restore-config-expected/139.conf b/src/test/restore-config-expected/139.conf
index 94425f7e..9f47afa5 100644
--- a/src/test/restore-config-expected/139.conf
+++ b/src/test/restore-config-expected/139.conf
@@ -2,14 +2,14 @@
 bios: ovmf
 boot: order=scsi0;ide2;net0
 cores: 1
-efidisk0: target:139/vm-139-disk-0.qcow2,size=128K
+efidisk0: target:139/vol-vm-139-disk-0.qcow2,size=128K
 ide2: local:iso/debian-10.6.0-amd64-netinst.iso,media=cdrom
 memory: 2048
 name: eficloneclone
 net0: virtio=7A:6C:A5:8B:11:93,bridge=vmbr0,firewall=1
 numa: 0
 ostype: l26
-scsi0: target:139/vm-139-disk-1.raw,size=4G
+scsi0: target:139/vol-vm-139-disk-1.raw,size=4G
 scsihw: virtio-scsi-pci
 smbios1: uuid=21a7e7bc-3cd2-4232-a009-a41f4ee992ae
 sockets: 1
diff --git a/src/test/restore-config-expected/142.conf b/src/test/restore-config-expected/142.conf
index ac2d2ad2..e59b40b4 100644
--- a/src/test/restore-config-expected/142.conf
+++ b/src/test/restore-config-expected/142.conf
@@ -7,7 +7,7 @@ name: apache
 net0: virtio=92:38:11:FD:ED:87,bridge=vmbr0,firewall=1
 numa: 0
 ostype: l26
-scsi0: target:142/vm-142-disk-0.qcow2,size=4G
+scsi0: target:142/vol-vm-142-disk-0.qcow2,size=4G
 scsihw: virtio-scsi-pci
 smbios1: uuid=ddf91b3f-a597-42be-9a7e-fb6421dcd5cd
 sockets: 1
diff --git a/src/test/restore-config-expected/1422.conf b/src/test/restore-config-expected/1422.conf
index 2d77a44a..688a9b7b 100644
--- a/src/test/restore-config-expected/1422.conf
+++ b/src/test/restore-config-expected/1422.conf
@@ -7,7 +7,7 @@ name: apache
 net0: virtio=92:38:11:FD:ED:87,bridge=vmbr0,firewall=1
 numa: 0
 ostype: l26
-scsi0: target:1422/vm-1422-disk-0.qcow2,size=4G
+scsi0: target:1422/vol-vm-1422-disk-0.qcow2,size=4G
 scsihw: virtio-scsi-pci
 smbios1: uuid=ddf91b3f-a597-42be-9a7e-fb6421dcd5cd
 sockets: 1
diff --git a/src/test/restore-config-expected/179.conf b/src/test/restore-config-expected/179.conf
index 4444efb5..6d5a7242 100644
--- a/src/test/restore-config-expected/179.conf
+++ b/src/test/restore-config-expected/179.conf
@@ -6,11 +6,11 @@ memory: 2048
 net0: virtio=26:15:5B:73:3F:7C,bridge=vmbr0,firewall=1
 numa: 0
 ostype: l26
-scsi0: target:179/vm-179-disk-0.qcow2,cache=none,discard=on,size=32G,ssd=1
-scsi1: target:179/vm-179-disk-1.qcow2,cache=writethrough,size=32G
-scsi2: target:179/vm-179-disk-2.qcow2,mbps_rd=7,mbps_wr=7,replicate=0,size=32G
-scsi3: target:179/vm-179-disk-3.vmdk,size=32G
-#scsi4: myfs:179/vm-179-disk-1.qcow2,backup=0,size=32G
+scsi0: target:179/vol-vm-179-disk-0.qcow2,cache=none,discard=on,size=32G,ssd=1
+scsi1: target:179/vol-vm-179-disk-1.qcow2,cache=writethrough,size=32G
+scsi2: target:179/vol-vm-179-disk-2.qcow2,mbps_rd=7,mbps_wr=7,replicate=0,size=32G
+scsi3: target:179/vol-vm-179-disk-3.vmdk,size=32G
+#scsi4: myfs:179/vol-vm-179-disk-1.qcow2,backup=0,size=32G
 scsihw: virtio-scsi-pci
 smbios1: uuid=1819ead7-a55d-4544-8d38-29ca94869a9c
 sockets: 1
diff --git a/src/test/restore-config-input/139.conf b/src/test/restore-config-input/139.conf
index 5acb4d4d..b5926453 100644
--- a/src/test/restore-config-input/139.conf
+++ b/src/test/restore-config-input/139.conf
@@ -2,14 +2,14 @@
 bios: ovmf
 boot: order=scsi0;ide2;net0
 cores: 1
-efidisk0: mydir:139/vm-139-disk-0.qcow2,size=128K
+efidisk0: mydir:139/vol-vm-139-disk-0.qcow2,size=128K
 ide2: local:iso/debian-10.6.0-amd64-netinst.iso,media=cdrom
 memory: 2048
 name: eficloneclone
 net0: virtio=7A:6C:A5:8B:11:93,bridge=vmbr0,firewall=1
 numa: 0
 ostype: l26
-scsi0: rbdkvm:vm-139-disk-1,size=4G
+scsi0: rbdkvm:vol-vm-139-disk-1,size=4G
 scsihw: virtio-scsi-pci
 smbios1: uuid=21a7e7bc-3cd2-4232-a009-a41f4ee992ae
 sockets: 1
diff --git a/src/test/restore-config-input/142.conf b/src/test/restore-config-input/142.conf
index f3633aaf..82c0a781 100644
--- a/src/test/restore-config-input/142.conf
+++ b/src/test/restore-config-input/142.conf
@@ -7,7 +7,7 @@ name: apache
 net0: virtio=92:38:11:FD:ED:87,bridge=vmbr0,firewall=1
 numa: 0
 ostype: l26
-scsi0: mydir:142/vm-142-disk-0.qcow2,size=4G
+scsi0: mydir:142/vol-vm-142-disk-0.qcow2,size=4G
 scsihw: virtio-scsi-pci
 smbios1: uuid=ddf91b3f-a597-42be-9a7e-fb6421dcd5cd
 sockets: 1
diff --git a/src/test/restore-config-input/1422.conf b/src/test/restore-config-input/1422.conf
index d3155023..325ad557 100644
--- a/src/test/restore-config-input/1422.conf
+++ b/src/test/restore-config-input/1422.conf
@@ -7,8 +7,8 @@ name: apache
 net0: virtio=92:38:11:FD:ED:87,bridge=vmbr0,firewall=1
 numa: 0
 ostype: l26
-scsi0: mydir:1422/vm-1422-disk-0.qcow2,size=4G
-unused7: mydir:1422/vm-1422-disk-8.qcow2
+scsi0: mydir:1422/vol-vm-1422-disk-0.qcow2,size=4G
+unused7: mydir:1422/vol-vm-1422-disk-8.qcow2
 parent: snap
 lock: backup
 scsihw: virtio-scsi-pci
diff --git a/src/test/restore-config-input/179.conf b/src/test/restore-config-input/179.conf
index e1ee01a5..ca3c68e6 100644
--- a/src/test/restore-config-input/179.conf
+++ b/src/test/restore-config-input/179.conf
@@ -6,11 +6,11 @@ memory: 2048
 net0: virtio=26:15:5B:73:3F:7C,bridge=vmbr0,firewall=1
 numa: 0
 ostype: l26
-scsi0: myfs:179/vm-179-disk-4.qcow2,cache=none,discard=on,size=32G,ssd=1
-scsi1: myfs:179/vm-179-disk-0.qcow2,cache=writethrough,size=32G
-scsi2: myfs:179/vm-179-disk-2.qcow2,mbps_rd=7,mbps_wr=7,replicate=0,size=32G
-scsi3: myfs:179/vm-179-disk-3.vmdk,size=32G
-scsi4: myfs:179/vm-179-disk-1.qcow2,backup=0,size=32G
+scsi0: myfs:179/vol-vm-179-disk-4.qcow2,cache=none,discard=on,size=32G,ssd=1
+scsi1: myfs:179/vol-vm-179-disk-0.qcow2,cache=writethrough,size=32G
+scsi2: myfs:179/vol-vm-179-disk-2.qcow2,mbps_rd=7,mbps_wr=7,replicate=0,size=32G
+scsi3: myfs:179/vol-vm-179-disk-3.vmdk,size=32G
+scsi4: myfs:179/vol-vm-179-disk-1.qcow2,backup=0,size=32G
 scsihw: virtio-scsi-pci
 smbios1: uuid=1819ead7-a55d-4544-8d38-29ca94869a9c
 sockets: 1
diff --git a/src/test/run_config2command_tests.pl b/src/test/run_config2command_tests.pl
index 0623b5c1..eee72d77 100755
--- a/src/test/run_config2command_tests.pl
+++ b/src/test/run_config2command_tests.pl
@@ -283,29 +283,29 @@ $storage_module->mock(
         if ($storeid eq 'localsnapext') {
             $snapshots = {
                 current => {
-                    file => 'var/lib/vzsnapext/images/8006/vm-8006-disk-0.qcow2',
+                    file => 'var/lib/vzsnapext/vms/8006/vol-vm-8006-disk-0.qcow2',
                     parent => 'snap2',
                 },
                 snap2 => {
-                    file => '/var/lib/vzsnapext/images/8006/snap2-vm-8006-disk-0.qcow2',
+                    file => '/var/lib/vzsnapext/images/8006/snap2-vol-vm-8006-disk-0.qcow2',
                     parent => 'snap1',
                 },
                 snap1 => {
-                    file => '/var/lib/vzsnapext/images/8006/snap1-vm-8006-disk-0.qcow2',
+                    file => '/var/lib/vzsnapext/images/8006/snap1-vol-vm-8006-disk-0.qcow2',
                 },
             };
         } elsif ($storeid eq 'lvm-store') {
             $snapshots = {
                 current => {
-                    file => '/dev/veegee/vm-8006-disk-0.qcow2',
+                    file => '/dev/veegee/vol-vm-8006-disk-0.qcow2',
                     parent => 'snap2',
                 },
                 snap2 => {
-                    file => '/dev/veegee/snap2-vm-8006-disk-0.qcow2',
+                    file => '/dev/veegee/snap2-vol-vm-8006-disk-0.qcow2',
                     parent => 'snap1',
                 },
                 snap1 => {
-                    file => '/dev/veegee/snap1-vm-8006-disk-0.qcow2',
+                    file => '/dev/veegee/snap1-vol-vm-8006-disk-0.qcow2',
                 },
             };
         }
diff --git a/src/test/run_qemu_img_convert_tests.pl b/src/test/run_qemu_img_convert_tests.pl
index 3c8f09f0..2acbbef4 100755
--- a/src/test/run_qemu_img_convert_tests.pl
+++ b/src/test/run_qemu_img_convert_tests.pl
@@ -93,7 +93,7 @@ my $tests = [
     {
         name => 'qcow2raw',
         parameters =>
-            ["local:$vmid/vm-$vmid-disk-0.qcow2", "local:$vmid/vm-$vmid-disk-0.raw", 1024 * 10],
+            ["local:$vmid/vol-vm-$vmid-disk-0.qcow2", "local:$vmid/vol-vm-$vmid-disk-0.raw", 1024 * 10],
         expected => [
             "/usr/bin/qemu-img",
             "convert",
@@ -103,14 +103,14 @@ my $tests = [
             "qcow2",
             "-O",
             "raw",
-            "/var/lib/vz/images/$vmid/vm-$vmid-disk-0.qcow2",
-            "/var/lib/vz/images/$vmid/vm-$vmid-disk-0.raw",
+            "/var/lib/vz/vms/$vmid/vol-vm-$vmid-disk-0.qcow2",
+            "/var/lib/vz/vms/$vmid/vol-vm-$vmid-disk-0.raw",
         ],
     },
     {
         name => "raw2qcow2",
         parameters =>
-            ["local:$vmid/vm-$vmid-disk-0.raw", "local:$vmid/vm-$vmid-disk-0.qcow2", 1024 * 10],
+            ["local:$vmid/vol-vm-$vmid-disk-0.raw", "local:$vmid/vol-vm-$vmid-disk-0.qcow2", 1024 * 10],
         expected => [
             "/usr/bin/qemu-img",
             "convert",
@@ -120,14 +120,14 @@ my $tests = [
             "raw",
             "-O",
             "qcow2",
-            "/var/lib/vz/images/$vmid/vm-$vmid-disk-0.raw",
-            "/var/lib/vz/images/$vmid/vm-$vmid-disk-0.qcow2",
+            "/var/lib/vz/vms/$vmid/vol-vm-$vmid-disk-0.raw",
+            "/var/lib/vz/vms/$vmid/vol-vm-$vmid-disk-0.qcow2",
         ],
     },
     {
         name => "local2rbd",
         parameters =>
-            ["local:$vmid/vm-$vmid-disk-0.raw", "rbd-store:vm-$vmid-disk-0", 1024 * 10],
+            ["local:$vmid/vol-vm-$vmid-disk-0.raw", "rbd-store:vol-vm-$vmid-disk-0", 1024 * 10],
         expected => [
             "/usr/bin/qemu-img",
             "convert",
@@ -137,14 +137,14 @@ my $tests = [
             "raw",
             "-O",
             "raw",
-            "/var/lib/vz/images/$vmid/vm-$vmid-disk-0.raw",
-            "rbd:cpool/vm-$vmid-disk-0:mon_host=127.0.0.42;127.0.0.21;[\\:\\:1]:auth_supported=none",
+            "/var/lib/vz/vms/$vmid/vol-vm-$vmid-disk-0.raw",
+            "rbd:cpool/vol-vm-$vmid-disk-0:mon_host=127.0.0.42;127.0.0.21;[\\:\\:1]:auth_supported=none",
         ],
     },
     {
         name => "rbd2local",
         parameters =>
-            ["rbd-store:vm-$vmid-disk-0", "local:$vmid/vm-$vmid-disk-0.raw", 1024 * 10],
+            ["rbd-store:vol-vm-$vmid-disk-0", "local:$vmid/vol-vm-$vmid-disk-0.raw", 1024 * 10],
         expected => [
             "/usr/bin/qemu-img",
             "convert",
@@ -154,14 +154,14 @@ my $tests = [
             "raw",
             "-O",
             "raw",
-            "rbd:cpool/vm-$vmid-disk-0:mon_host=127.0.0.42;127.0.0.21;[\\:\\:1]:auth_supported=none",
-            "/var/lib/vz/images/$vmid/vm-$vmid-disk-0.raw",
+            "rbd:cpool/vol-vm-$vmid-disk-0:mon_host=127.0.0.42;127.0.0.21;[\\:\\:1]:auth_supported=none",
+            "/var/lib/vz/vms/$vmid/vol-vm-$vmid-disk-0.raw",
         ],
     },
     {
         name => "local2zos",
         parameters =>
-            ["local:$vmid/vm-$vmid-disk-0.raw", "zfs-over-iscsi:vm-$vmid-disk-0", 1024 * 10],
+            ["local:$vmid/vol-vm-$vmid-disk-0.raw", "zfs-over-iscsi:vol-vm-$vmid-disk-0", 1024 * 10],
         expected => [
             "/usr/bin/qemu-img",
             "convert",
@@ -170,14 +170,14 @@ my $tests = [
             "-f",
             "raw",
             "--target-image-opts",
-            "/var/lib/vz/images/$vmid/vm-$vmid-disk-0.raw",
+            "/var/lib/vz/vms/$vmid/vol-vm-$vmid-disk-0.raw",
             "file.driver=iscsi,file.transport=tcp,file.initiator-name=foobar,file.portal=127.0.0.1,file.target=iqn.2019-10.org.test:foobar,file.lun=1,driver=raw",
         ],
     },
     {
         name => "zos2local",
         parameters =>
-            ["zfs-over-iscsi:vm-$vmid-disk-0", "local:$vmid/vm-$vmid-disk-0.raw", 1024 * 10],
+            ["zfs-over-iscsi:vol-vm-$vmid-disk-0", "local:$vmid/vol-vm-$vmid-disk-0.raw", 1024 * 10],
         expected => [
             "/usr/bin/qemu-img",
             "convert",
@@ -187,13 +187,13 @@ my $tests = [
             "-O",
             "raw",
             "file.driver=iscsi,file.transport=tcp,file.initiator-name=foobar,file.portal=127.0.0.1,file.target=iqn.2019-10.org.test:foobar,file.lun=1,driver=raw",
-            "/var/lib/vz/images/$vmid/vm-$vmid-disk-0.raw",
+            "/var/lib/vz/vms/$vmid/vol-vm-$vmid-disk-0.raw",
         ],
     },
     {
         name => "zos2rbd",
         parameters =>
-            ["zfs-over-iscsi:vm-$vmid-disk-0", "rbd-store:vm-$vmid-disk-0", 1024 * 10],
+            ["zfs-over-iscsi:vol-vm-$vmid-disk-0", "rbd-store:vol-vm-$vmid-disk-0", 1024 * 10],
         expected => [
             "/usr/bin/qemu-img",
             "convert",
@@ -203,13 +203,13 @@ my $tests = [
             "-O",
             "raw",
             "file.driver=iscsi,file.transport=tcp,file.initiator-name=foobar,file.portal=127.0.0.1,file.target=iqn.2019-10.org.test:foobar,file.lun=1,driver=raw",
-            "rbd:cpool/vm-$vmid-disk-0:mon_host=127.0.0.42;127.0.0.21;[\\:\\:1]:auth_supported=none",
+            "rbd:cpool/vol-vm-$vmid-disk-0:mon_host=127.0.0.42;127.0.0.21;[\\:\\:1]:auth_supported=none",
         ],
     },
     {
         name => "rbd2zos",
         parameters =>
-            ["rbd-store:vm-$vmid-disk-0", "zfs-over-iscsi:vm-$vmid-disk-0", 1024 * 10],
+            ["rbd-store:vol-vm-$vmid-disk-0", "zfs-over-iscsi:vol-vm-$vmid-disk-0", 1024 * 10],
         expected => [
             "/usr/bin/qemu-img",
             "convert",
@@ -218,14 +218,14 @@ my $tests = [
             "-f",
             "raw",
             "--target-image-opts",
-            "rbd:cpool/vm-$vmid-disk-0:mon_host=127.0.0.42;127.0.0.21;[\\:\\:1]:auth_supported=none",
+            "rbd:cpool/vol-vm-$vmid-disk-0:mon_host=127.0.0.42;127.0.0.21;[\\:\\:1]:auth_supported=none",
             "file.driver=iscsi,file.transport=tcp,file.initiator-name=foobar,file.portal=127.0.0.1,file.target=iqn.2019-10.org.test:foobar,file.lun=1,driver=raw",
         ],
     },
     {
         name => "local2lvmthin",
         parameters =>
-            ["local:$vmid/vm-$vmid-disk-0.raw", "local-lvm:vm-$vmid-disk-0", 1024 * 10],
+            ["local:$vmid/vol-vm-$vmid-disk-0.raw", "local-lvm:vol-vm-$vmid-disk-0", 1024 * 10],
         expected => [
             "/usr/bin/qemu-img",
             "convert",
@@ -235,14 +235,14 @@ my $tests = [
             "raw",
             "-O",
             "raw",
-            "/var/lib/vz/images/$vmid/vm-$vmid-disk-0.raw",
-            "/dev/pve/vm-$vmid-disk-0",
+            "/var/lib/vz/vms/$vmid/vol-vm-$vmid-disk-0.raw",
+            "/dev/pve/vol-vm-$vmid-disk-0",
         ],
     },
     {
         name => "lvmthin2local",
         parameters =>
-            ["local-lvm:vm-$vmid-disk-0", "local:$vmid/vm-$vmid-disk-0.raw", 1024 * 10],
+            ["local-lvm:vol-vm-$vmid-disk-0", "local:$vmid/vol-vm-$vmid-disk-0.raw", 1024 * 10],
         expected => [
             "/usr/bin/qemu-img",
             "convert",
@@ -252,15 +252,15 @@ my $tests = [
             "raw",
             "-O",
             "raw",
-            "/dev/pve/vm-$vmid-disk-0",
-            "/var/lib/vz/images/$vmid/vm-$vmid-disk-0.raw",
+            "/dev/pve/vol-vm-$vmid-disk-0",
+            "/var/lib/vz/vms/$vmid/vol-vm-$vmid-disk-0.raw",
         ],
     },
     {
         name => "zeroinit",
         parameters => [
-            "local-lvm:vm-$vmid-disk-0",
-            "local:$vmid/vm-$vmid-disk-0.raw",
+            "local-lvm:vol-vm-$vmid-disk-0",
+            "local:$vmid/vol-vm-$vmid-disk-0.raw",
             1024 * 10,
             { 'is-zero-initialized' => 1 },
         ],
@@ -273,19 +273,19 @@ my $tests = [
             "raw",
             "-O",
             "raw",
-            "/dev/pve/vm-$vmid-disk-0",
-            "zeroinit:/var/lib/vz/images/$vmid/vm-$vmid-disk-0.raw",
+            "/dev/pve/vol-vm-$vmid-disk-0",
+            "zeroinit:/var/lib/vz/vms/$vmid/vol-vm-$vmid-disk-0.raw",
         ],
     },
     {
         name => "notexistingstorage",
         parameters =>
-            ["local-lvm:vm-$vmid-disk-0", "not-existing:$vmid/vm-$vmid-disk-0.raw", 1024 * 10],
+            ["local-lvm:vol-vm-$vmid-disk-0", "not-existing:$vmid/vol-vm-$vmid-disk-0.raw", 1024 * 10],
         expected => "storage 'not-existing' does not exist\n",
     },
     {
         name => "vmdkfile",
-        parameters => ["./test.vmdk", "local:$vmid/vm-$vmid-disk-0.raw", 1024 * 10],
+        parameters => ["./test.vmdk", "local:$vmid/vol-vm-$vmid-disk-0.raw", 1024 * 10],
         expected => [
             "/usr/bin/qemu-img",
             "convert",
@@ -296,18 +296,18 @@ my $tests = [
             "-O",
             "raw",
             "./test.vmdk",
-            "/var/lib/vz/images/$vmid/vm-$vmid-disk-0.raw",
+            "/var/lib/vz/vms/$vmid/vol-vm-$vmid-disk-0.raw",
         ],
     },
     {
         name => "notexistingfile",
-        parameters => ["/foo/bar", "local:$vmid/vm-$vmid-disk-0.raw", 1024 * 10],
+        parameters => ["/foo/bar", "local:$vmid/vol-vm-$vmid-disk-0.raw", 1024 * 10],
         expected => "source '/foo/bar' is not a valid volid nor path for qemu-img convert\n",
     },
     {
         name => "efidisk",
         parameters =>
-            ["/usr/share/kvm/OVMF_VARS-pure-efi.fd", "local:$vmid/vm-$vmid-disk-0.raw", 1024 * 10],
+            ["/usr/share/kvm/OVMF_VARS-pure-efi.fd", "local:$vmid/vol-vm-$vmid-disk-0.raw", 1024 * 10],
         expected => [
             "/usr/bin/qemu-img",
             "convert",
@@ -316,13 +316,13 @@ my $tests = [
             "-O",
             "raw",
             "/usr/share/kvm/OVMF_VARS-pure-efi.fd",
-            "/var/lib/vz/images/$vmid/vm-$vmid-disk-0.raw",
+            "/var/lib/vz/vms/$vmid/vol-vm-$vmid-disk-0.raw",
         ],
     },
     {
         name => "efi2zos",
         parameters =>
-            ["/usr/share/kvm/OVMF_VARS-pure-efi.fd", "zfs-over-iscsi:vm-$vmid-disk-0", 1024 * 10],
+            ["/usr/share/kvm/OVMF_VARS-pure-efi.fd", "zfs-over-iscsi:vol-vm-$vmid-disk-0", 1024 * 10],
         expected => [
             "/usr/bin/qemu-img",
             "convert",
@@ -336,8 +336,8 @@ my $tests = [
     {
         name => "bwlimit",
         parameters => [
-            "local-lvm:vm-$vmid-disk-0",
-            "local:$vmid/vm-$vmid-disk-0.raw",
+            "local-lvm:vol-vm-$vmid-disk-0",
+            "local:$vmid/vol-vm-$vmid-disk-0.raw",
             1024 * 10,
             { bwlimit => 1024 },
         ],
@@ -352,15 +352,15 @@ my $tests = [
             "raw",
             "-O",
             "raw",
-            "/dev/pve/vm-$vmid-disk-0",
-            "/var/lib/vz/images/$vmid/vm-$vmid-disk-0.raw",
+            "/dev/pve/vol-vm-$vmid-disk-0",
+            "/var/lib/vz/vms/$vmid/vol-vm-$vmid-disk-0.raw",
         ],
     },
     {
         name => "krbdsnapshot",
         parameters => [
-            "krbd-store:vm-$vmid-disk-0",
-            "local:$vmid/vm-$vmid-disk-0.raw",
+            "krbd-store:vol-vm-$vmid-disk-0",
+            "local:$vmid/vol-vm-$vmid-disk-0.raw",
             1024 * 10,
             { snapname => 'foo' },
         ],
@@ -373,15 +373,15 @@ my $tests = [
             "raw",
             "-O",
             "raw",
-            "/dev/rbd-pve/fc4181a6-56eb-4f68-b452-8ba1f381ca2a/apool/vm-$vmid-disk-0\@foo",
-            "/var/lib/vz/images/$vmid/vm-$vmid-disk-0.raw",
+            "/dev/rbd-pve/fc4181a6-56eb-4f68-b452-8ba1f381ca2a/apool/vol-vm-$vmid-disk-0\@foo",
+            "/var/lib/vz/vms/$vmid/vol-vm-$vmid-disk-0.raw",
         ],
     },
     {
         name => "rbdsnapshot",
         parameters => [
-            "rbd-store:vm-$vmid-disk-0",
-            "local:$vmid/vm-$vmid-disk-0.raw",
+            "rbd-store:vol-vm-$vmid-disk-0",
+            "local:$vmid/vol-vm-$vmid-disk-0.raw",
             1024 * 10,
             { snapname => 'foo' },
         ],
@@ -394,15 +394,15 @@ my $tests = [
             "raw",
             "-O",
             "raw",
-            "rbd:cpool/vm-$vmid-disk-0\@foo:mon_host=127.0.0.42;127.0.0.21;[\\:\\:1]:auth_supported=none",
-            "/var/lib/vz/images/$vmid/vm-$vmid-disk-0.raw",
+            "rbd:cpool/vol-vm-$vmid-disk-0\@foo:mon_host=127.0.0.42;127.0.0.21;[\\:\\:1]:auth_supported=none",
+            "/var/lib/vz/vms/$vmid/vol-vm-$vmid-disk-0.raw",
         ],
     },
     {
         name => "btrfs_raw_snapshots",
         parameters => [
-            "btrfs:$vmid/vm-$vmid-disk-0.raw",
-            "local:$vmid/vm-$vmid-disk-0.raw",
+            "btrfs:$vmid/vol-vm-$vmid-disk-0.raw",
+            "local:$vmid/vol-vm-$vmid-disk-0.raw",
             1024 * 10,
             { snapname => 'foo' },
         ],
@@ -415,15 +415,15 @@ my $tests = [
             "raw",
             "-O",
             "raw",
-            "/var/lib/btrfs/images/$vmid/vm-$vmid-disk-0\@foo/disk.raw",
-            "/var/lib/vz/images/$vmid/vm-$vmid-disk-0.raw",
+            "/var/lib/btrfs/vms/$vmid/vol-vm-$vmid-disk-0\@foo/disk.raw",
+            "/var/lib/vz/vms/$vmid/vol-vm-$vmid-disk-0.raw",
         ],
     },
     {
         name => "btrfs_qcow2_snapshots",
         parameters => [
-            "btrfs:$vmid/vm-$vmid-disk-0.qcow2",
-            "local:$vmid/vm-$vmid-disk-0.raw",
+            "btrfs:$vmid/vol-vm-$vmid-disk-0.qcow2",
+            "local:$vmid/vol-vm-$vmid-disk-0.raw",
             1024 * 10,
             { snapname => 'snap' },
         ],
@@ -438,15 +438,15 @@ my $tests = [
             "qcow2",
             "-O",
             "raw",
-            "/var/lib/btrfs/images/$vmid/vm-$vmid-disk-0.qcow2",
-            "/var/lib/vz/images/$vmid/vm-$vmid-disk-0.raw",
+            "/var/lib/btrfs/vms/$vmid/vol-vm-$vmid-disk-0.qcow2",
+            "/var/lib/vz/vms/$vmid/vol-vm-$vmid-disk-0.raw",
         ],
     },
     {
         name => "lvmsnapshot",
         parameters => [
-            "local-lvm:vm-$vmid-disk-0",
-            "local:$vmid/vm-$vmid-disk-0.raw",
+            "local-lvm:vol-vm-$vmid-disk-0",
+            "local:$vmid/vol-vm-$vmid-disk-0.raw",
             1024 * 10,
             { snapname => 'foo' },
         ],
@@ -459,15 +459,15 @@ my $tests = [
             "raw",
             "-O",
             "raw",
-            "/dev/pve/snap_vm-$vmid-disk-0_foo",
-            "/var/lib/vz/images/$vmid/vm-$vmid-disk-0.raw",
+            "/dev/pve/snap_vol-vm-$vmid-disk-0_foo",
+            "/var/lib/vz/vms/$vmid/vol-vm-$vmid-disk-0.raw",
         ],
     },
     {
         name => "qcow2snapshot",
         parameters => [
-            "local:$vmid/vm-$vmid-disk-0.qcow2",
-            "local:$vmid/vm-$vmid-disk-0.raw",
+            "local:$vmid/vol-vm-$vmid-disk-0.qcow2",
+            "local:$vmid/vol-vm-$vmid-disk-0.raw",
             1024 * 10,
             { snapname => 'snap' },
         ],
@@ -482,15 +482,15 @@ my $tests = [
             "qcow2",
             "-O",
             "raw",
-            "/var/lib/vz/images/$vmid/vm-$vmid-disk-0.qcow2",
-            "/var/lib/vz/images/$vmid/vm-$vmid-disk-0.raw",
+            "/var/lib/vz/vms/$vmid/vol-vm-$vmid-disk-0.qcow2",
+            "/var/lib/vz/vms/$vmid/vol-vm-$vmid-disk-0.raw",
         ],
     },
     {
         name => "qcow2_external_snapshot",
         parameters => [
-            "localsnapext:$vmid/vm-$vmid-disk-0.qcow2",
-            "local:$vmid/vm-$vmid-disk-0.raw",
+            "localsnapext:$vmid/vol-vm-$vmid-disk-0.qcow2",
+            "local:$vmid/vol-vm-$vmid-disk-0.raw",
             1024 * 10,
             { snapname => 'foo' },
         ],
@@ -503,15 +503,15 @@ my $tests = [
             "qcow2",
             "-O",
             "raw",
-            "/var/lib/vzsnapext/images/$vmid/snap-foo-vm-$vmid-disk-0.qcow2",
-            "/var/lib/vz/images/$vmid/vm-$vmid-disk-0.raw",
+            "/var/lib/vzsnapext/images/$vmid/snap-foo-vol-vm-$vmid-disk-0.qcow2",
+            "/var/lib/vz/vms/$vmid/vol-vm-$vmid-disk-0.raw",
         ],
     },
     {
         name => "lvmqcow2_external_snapshot",
         parameters => [
-            "lvm-store:vm-$vmid-disk-0.qcow2",
-            "local:$vmid/vm-$vmid-disk-0.raw",
+            "lvm-store:vol-vm-$vmid-disk-0.qcow2",
+            "local:$vmid/vol-vm-$vmid-disk-0.raw",
             1024 * 10,
             { snapname => 'foo' },
         ],
@@ -524,15 +524,15 @@ my $tests = [
             "qcow2",
             "-O",
             "raw",
-            "/dev/pve/snap_vm-$vmid-disk-0_foo.qcow2",
-            "/var/lib/vz/images/$vmid/vm-$vmid-disk-0.raw",
+            "/dev/pve/snap_vol-vm-$vmid-disk-0_foo.qcow2",
+            "/var/lib/vz/vms/$vmid/vol-vm-$vmid-disk-0.raw",
         ],
     },
     {
         name => "qcow2_external_snapshot_target",
         parameters => [
-            "local:$vmid/vm-$vmid-disk-0.raw",
-            "localsnapext:$vmid/vm-$vmid-disk-0.qcow2",
+            "local:$vmid/vol-vm-$vmid-disk-0.raw",
+            "localsnapext:$vmid/vol-vm-$vmid-disk-0.qcow2",
             1024 * 10,
         ],
         expected => [
@@ -543,15 +543,15 @@ my $tests = [
             "-f",
             "raw",
             "--target-image-opts",
-            "/var/lib/vz/images/$vmid/vm-$vmid-disk-0.raw",
+            "/var/lib/vz/vms/$vmid/vol-vm-$vmid-disk-0.raw",
             "driver=qcow2,discard-no-unref=true,file.driver=file,"
-                . "file.filename=/var/lib/vzsnapext/images/$vmid/vm-$vmid-disk-0.qcow2",
+                . "file.filename=/var/lib/vzsnapext/vms/$vmid/vol-vm-$vmid-disk-0.qcow2",
         ],
     },
     {
         name => "lvmqcow2_external_snapshot_target",
         parameters => [
-            "local:$vmid/vm-$vmid-disk-0.raw", "lvm-store:vm-$vmid-disk-0.qcow2", 1024 * 10,
+            "local:$vmid/vol-vm-$vmid-disk-0.raw", "lvm-store:vol-vm-$vmid-disk-0.qcow2", 1024 * 10,
         ],
         expected => [
             "/usr/bin/qemu-img",
@@ -561,9 +561,9 @@ my $tests = [
             "-f",
             "raw",
             "--target-image-opts",
-            "/var/lib/vz/images/$vmid/vm-$vmid-disk-0.raw",
+            "/var/lib/vz/vms/$vmid/vol-vm-$vmid-disk-0.raw",
             "driver=qcow2,discard-no-unref=true,file.driver=host_device,"
-                . "file.filename=/dev/pve/vm-$vmid-disk-0.qcow2",
+                . "file.filename=/dev/pve/vol-vm-$vmid-disk-0.qcow2",
         ],
     },
 ];
diff --git a/src/test/run_qemu_migrate_tests.pl b/src/test/run_qemu_migrate_tests.pl
index ed2f38ee..e9de96eb 100755
--- a/src/test/run_qemu_migrate_tests.pl
+++ b/src/test/run_qemu_migrate_tests.pl
@@ -113,7 +113,7 @@ my $vm_configs = {
     105 => {
         'bootdisk' => 'scsi0',
         'cores' => 1,
-        'ide0' => 'local-zfs:vm-105-disk-1,size=103M',
+        'ide0' => 'local-zfs:vol-vm-105-disk-1,size=103M',
         'ide2' => 'none,media=cdrom',
         'memory' => 512,
         'name' => 'Copy-of-VM-newapache',
@@ -122,7 +122,7 @@ my $vm_configs = {
         'ostype' => 'l26',
         'parent' => 'ohsnap',
         'pending' => {},
-        'scsi0' => 'local-zfs:vm-105-disk-0,size=4G',
+        'scsi0' => 'local-zfs:vol-vm-105-disk-0,size=4G',
         'scsihw' => 'virtio-scsi-pci',
         'smbios1' => 'uuid=1ddfe18b-77e0-47f6-a4bd-f1761bf6d763',
         'snapshots' => {
@@ -135,7 +135,7 @@ my $vm_configs = {
                 'net0' => 'virtio=4A:A3:E4:4C:CF:F0,bridge=vmbr0,firewall=1',
                 'numa' => 0,
                 'ostype' => 'l26',
-                'scsi0' => 'local-zfs:vm-105-disk-0,size=4G',
+                'scsi0' => 'local-zfs:vol-vm-105-disk-0,size=4G',
                 'scsihw' => 'virtio-scsi-pci',
                 'smbios1' => 'uuid=1ddfe18b-77e0-47f6-a4bd-f1761bf6d763',
                 'snaptime' => 1580976924,
@@ -151,7 +151,7 @@ my $vm_configs = {
     111 => {
         'bootdisk' => 'scsi0',
         'cores' => 1,
-        'ide0' => 'local-lvm:vm-111-disk-0,size=4096M',
+        'ide0' => 'local-lvm:vol-vm-111-disk-0,size=4096M',
         'ide2' => 'none,media=cdrom',
         'memory' => 512,
         'name' => 'pending-test',
@@ -159,7 +159,7 @@ my $vm_configs = {
         'numa' => 0,
         'ostype' => 'l26',
         'pending' => {
-            'scsi0' => 'local-zfs:vm-111-disk-0,size=103M',
+            'scsi0' => 'local-zfs:vol-vm-111-disk-0,size=103M',
         },
         'scsihw' => 'virtio-scsi-pci',
         'snapshots' => {},
@@ -170,8 +170,8 @@ my $vm_configs = {
     123 => {
         'bootdisk' => 'scsi0',
         'cores' => 1,
-        'scsi0' => 'zfs-alias-1:vm-123-disk-0,size=4096M',
-        'scsi1' => 'zfs-alias-2:vm-123-disk-0,size=4096M',
+        'scsi0' => 'zfs-alias-1:vol-vm-123-disk-0,size=4096M',
+        'scsi1' => 'zfs-alias-2:vol-vm-123-disk-0,size=4096M',
         'ide2' => 'none,media=cdrom',
         'memory' => 512,
         'name' => 'alias-test',
@@ -196,8 +196,8 @@ my $vm_configs = {
         'net0' => 'virtio=52:5D:7E:62:85:97,bridge=vmbr1',
         'numa' => 1,
         'ostype' => 'l26',
-        'scsi0' => 'local-lvm:vm-149-disk-0,format=raw,size=4G',
-        'scsi1' => 'local-dir:149/vm-149-disk-0.qcow2,format=qcow2,size=1G',
+        'scsi0' => 'local-lvm:vol-vm-149-disk-0,format=raw,size=4G',
+        'scsi1' => 'local-dir:149/vol-vm-149-disk-0.qcow2,format=qcow2,size=1G',
         'scsihw' => 'virtio-scsi-pci',
         'snapshots' => {},
         'smbios1' => 'uuid=e980bd43-a405-42e2-b5f4-31efe6517460',
@@ -209,7 +209,7 @@ my $vm_configs = {
         'arch' => 'aarch64',
         'bootdisk' => 'scsi0',
         'cores' => 1,
-        'efidisk0' => 'local-lvm:vm-341-disk-0',
+        'efidisk0' => 'local-lvm:vol-vm-341-disk-0',
         'ide2' => 'none,media=cdrom',
         'ipconfig0' => 'ip=103.214.69.10/25,gw=103.214.69.1',
         'memory' => 4096,
@@ -217,7 +217,7 @@ my $vm_configs = {
         'net0' => 'virtio=4E:F1:82:6D:D7:4B,bridge=vmbr0,firewall=1,rate=10',
         'numa' => 0,
         'ostype' => 'l26',
-        'scsi0' => 'rbd-store:vm-341-disk-0,size=1G',
+        'scsi0' => 'rbd-store:vol-vm-341-disk-0,size=1G',
         'scsihw' => 'virtio-scsi-pci',
         'snapshots' => {},
         'smbios1' => 'uuid=e01e4c73-46f1-47c8-af79-288fdf6b7462',
@@ -235,7 +235,7 @@ my $vm_configs = {
         'net0' => 'virtio=4E:F1:82:6D:D7:4B,bridge=vmbr0,firewall=1,rate=10',
         'numa' => 0,
         'ostype' => 'l26',
-        'scsi0' => 'rbd-store:vm-1033-disk-1,size=1G',
+        'scsi0' => 'rbd-store:vol-vm-1033-disk-1,size=1G',
         'scsihw' => 'virtio-scsi-pci',
         'snapshots' => {},
         'smbios1' => 'uuid=e01e4c73-46f1-47c8-af79-288fdf6b7462',
@@ -253,7 +253,7 @@ my $vm_configs = {
         'ostype' => 'l26',
         'parent' => 'snap1',
         'pending' => {},
-        'scsi0' => 'local-dir:4567/vm-4567-disk-0.qcow2,size=4G',
+        'scsi0' => 'local-dir:4567/vol-vm-4567-disk-0.qcow2,size=4G',
         'scsihw' => 'virtio-scsi-pci',
         'smbios1' => 'uuid=2925fdec-a066-4228-b46b-eef8662f5e74',
         'snapshots' => {
@@ -268,7 +268,7 @@ my $vm_configs = {
                 'ostype' => 'l26',
                 'runningcpu' => 'kvm64,enforce,+kvm_pv_eoi,+kvm_pv_unhalt,+lahf_lm,+sep',
                 'runningmachine' => 'pc-i440fx-10.0+pve0',
-                'scsi0' => 'local-dir:4567/vm-4567-disk-0.qcow2,size=4G',
+                'scsi0' => 'local-dir:4567/vol-vm-4567-disk-0.qcow2,size=4G',
                 'scsihw' => 'virtio-scsi-pci',
                 'smbios1' => 'uuid=2925fdec-a066-4228-b46b-eef8662f5e74',
                 'snaptime' => 1595928799,
@@ -289,8 +289,8 @@ my $vm_configs = {
                 'parent' => 'snap1',
                 'runningcpu' => 'kvm64,enforce,+kvm_pv_eoi,+kvm_pv_unhalt,+lahf_lm,+sep',
                 'runningmachine' => 'pc-i440fx-10.0+pve0',
-                'scsi0' => 'local-dir:4567/vm-4567-disk-0.qcow2,size=4G',
-                'scsi1' => 'local-zfs:vm-4567-disk-0,size=1G',
+                'scsi0' => 'local-dir:4567/vol-vm-4567-disk-0.qcow2,size=4G',
+                'scsi1' => 'local-zfs:vol-vm-4567-disk-0,size=1G',
                 'scsihw' => 'virtio-scsi-pci',
                 'smbios1' => 'uuid=2925fdec-a066-4228-b46b-eef8662f5e74',
                 'snaptime' => 1595928871,
@@ -302,7 +302,7 @@ my $vm_configs = {
         },
         'sockets' => 1,
         'startup' => 'order=2',
-        'unused0' => 'local-zfs:vm-4567-disk-0',
+        'unused0' => 'local-zfs:vol-vm-4567-disk-0',
         'vmgenid' => 'e698e60c-9278-4dd9-941f-416075383f2a',
     },
 };
@@ -316,7 +316,7 @@ my $source_vdisks = {
             'size' => 1073741824,
             'used' => 335872,
             'vmid' => '149',
-            'volid' => 'local-dir:149/vm-149-disk-0.qcow2',
+            'volid' => 'local-dir:149/vol-vm-149-disk-0.qcow2',
         },
         {
             'ctime' => 1595928898,
@@ -325,7 +325,7 @@ my $source_vdisks = {
             'size' => 4294967296,
             'used' => 1811664896,
             'vmid' => '4567',
-            'volid' => 'local-dir:4567/vm-4567-disk-0.qcow2',
+            'volid' => 'local-dir:4567/vol-vm-4567-disk-0.qcow2',
         },
         {
             'ctime' => 1595928800,
@@ -352,21 +352,21 @@ my $source_vdisks = {
             'format' => 'raw',
             'size' => 4294967296,
             'vmid' => '149',
-            'volid' => 'local-lvm:vm-149-disk-0',
+            'volid' => 'local-lvm:vol-vm-149-disk-0',
         },
         {
             'ctime' => '1589277334',
             'format' => 'raw',
             'size' => 4194304,
             'vmid' => '341',
-            'volid' => 'local-lvm:vm-341-disk-0',
+            'volid' => 'local-lvm:vol-vm-341-disk-0',
         },
         {
             'ctime' => '1589277334',
             'format' => 'raw',
             'size' => 4294967296,
             'vmid' => '111',
-            'volid' => 'local-lvm:vm-111-disk-0',
+            'volid' => 'local-lvm:vol-vm-111-disk-0',
         },
     ],
     'local-zfs' => [
@@ -375,29 +375,29 @@ my $source_vdisks = {
             'format' => 'raw',
             'size' => 4294967296,
             'vmid' => '105',
-            'volid' => 'local-zfs:vm-105-disk-0',
+            'volid' => 'local-zfs:vol-vm-105-disk-0',
         },
         {
             'ctime' => '1589277334',
             'format' => 'raw',
             'size' => 108003328,
             'vmid' => '105',
-            'volid' => 'local-zfs:vm-105-disk-1',
+            'volid' => 'local-zfs:vol-vm-105-disk-1',
         },
         {
             'ctime' => '1589277334',
             'format' => 'raw',
             'size' => 108003328,
             'vmid' => '111',
-            'volid' => 'local-zfs:vm-111-disk-0',
+            'volid' => 'local-zfs:vol-vm-111-disk-0',
         },
         {
             'format' => 'raw',
-            'name' => 'vm-4567-disk-0',
+            'name' => 'vol-vm-4567-disk-0',
             'parent' => undef,
             'size' => 1073741824,
             'vmid' => '4567',
-            'volid' => 'local-zfs:vm-4567-disk-0',
+            'volid' => 'local-zfs:vol-vm-4567-disk-0',
         },
     ],
     'rbd-store' => [
@@ -406,7 +406,7 @@ my $source_vdisks = {
             'format' => 'raw',
             'size' => 1073741824,
             'vmid' => '1033',
-            'volid' => 'rbd-store:vm-1033-disk-1',
+            'volid' => 'rbd-store:vol-vm-1033-disk-1',
         },
         {
             'ctime' => '1589277334',
@@ -422,7 +422,7 @@ my $source_vdisks = {
             'format' => 'raw',
             'size' => 4294967296,
             'vmid' => '123',
-            'volid' => 'zfs-alias-1:vm-123-disk-0',
+            'volid' => 'zfs-alias-1:vol-vm-123-disk-0',
         },
     ],
     'zfs-alias-2' => [
@@ -431,7 +431,7 @@ my $source_vdisks = {
             'format' => 'raw',
             'size' => 4294967296,
             'vmid' => '123',
-            'volid' => 'zfs-alias-2:vm-123-disk-0',
+            'volid' => 'zfs-alias-2:vol-vm-123-disk-0',
         },
     ],
 };
@@ -541,12 +541,12 @@ my $tests = [
         expected => {
             source_volids => {},
             target_volids => {
-                'local-dir:341/vm-341-disk-10.raw' => 1,
+                'local-dir:341/vol-vm-341-disk-10.raw' => 1,
             },
             vm_config => get_patched_config(
                 341,
                 {
-                    efidisk0 => 'local-dir:341/vm-341-disk-10.raw,format=raw,size=128K',
+                    efidisk0 => 'local-dir:341/vol-vm-341-disk-10.raw,format=raw,size=128K',
                 },
             ),
             vm_status => {
@@ -572,12 +572,12 @@ my $tests = [
         expected => {
             source_volids => {},
             target_volids => {
-                'local-lvm:vm-341-disk-10' => 1,
+                'local-lvm:vol-vm-341-disk-10' => 1,
             },
             vm_config => get_patched_config(
                 341,
                 {
-                    efidisk0 => 'local-lvm:vm-341-disk-10,format=raw,size=128K',
+                    efidisk0 => 'local-lvm:vol-vm-341-disk-10,format=raw,size=128K',
                 },
             ),
             vm_status => {
@@ -599,15 +599,15 @@ my $tests = [
             'with-local-disks' => 1,
         },
         fail_config => {
-            vdisk_alloc => 'local-dir:149/vm-149-disk-11.qcow2',
-            pvesm_free => 'local-lvm:vm-149-disk-10',
+            vdisk_alloc => 'local-dir:149/vol-vm-149-disk-11.qcow2',
+            pvesm_free => 'local-lvm:vol-vm-149-disk-10',
         },
         expected_calls => {},
         expect_die => "remote command failed with exit code",
         expected => {
             source_volids => local_volids_for_vm(149),
             target_volids => {
-                'local-lvm:vm-149-disk-10' => 1,
+                'local-lvm:vol-vm-149-disk-10' => 1,
             },
             vm_config => $vm_configs->{149},
             vm_status => {
@@ -629,7 +629,7 @@ my $tests = [
             'with-local-disks' => 1,
         },
         fail_config => {
-            vdisk_alloc => 'local-lvm:vm-149-disk-10',
+            vdisk_alloc => 'local-lvm:vol-vm-149-disk-10',
         },
         expected_calls => {},
         expect_die => "remote command failed with exit code",
@@ -654,13 +654,13 @@ my $tests = [
             'with-local-disks' => 1,
         },
         fail_config => {
-            'vdisk_free' => 'local-lvm:vm-149-disk-0',
+            'vdisk_free' => 'local-lvm:vol-vm-149-disk-0',
         },
         expected_calls => $default_expected_calls_offline,
-        expect_die => "vdisk_free 'local-lvm:vm-149-disk-0' error",
+        expect_die => "vdisk_free 'local-lvm:vol-vm-149-disk-0' error",
         expected => {
             source_volids => {
-                'local-lvm:vm-149-disk-0' => 1,
+                'local-lvm:vol-vm-149-disk-0' => 1,
             },
             target_volids => local_volids_for_vm(149),
             vm_config => $vm_configs->{149},
@@ -728,7 +728,7 @@ my $tests = [
             targetstorage => 'local-dir:other-dir,local-zfs:local-zfs',
         },
         storage_migrate_map => {
-            'local-dir:4567/vm-4567-disk-0.qcow2' => '4567/vm-4567-disk-0.qcow2',
+            'local-dir:4567/vol-vm-4567-disk-0.qcow2' => '4567/vol-vm-4567-disk-0.qcow2',
             'local-dir:4567/vm-4567-state-snap1.raw' => '4567/vm-4567-state-snap1.raw',
             'local-dir:4567/vm-4567-state-snap2.raw' => '4567/vm-4567-state-snap2.raw',
         },
@@ -736,23 +736,23 @@ my $tests = [
         expected => {
             source_volids => {},
             target_volids => {
-                'other-dir:4567/vm-4567-disk-0.qcow2' => 1,
+                'other-dir:4567/vol-vm-4567-disk-0.qcow2' => 1,
                 'other-dir:4567/vm-4567-state-snap1.raw' => 1,
                 'other-dir:4567/vm-4567-state-snap2.raw' => 1,
-                'local-zfs:vm-4567-disk-0' => 1,
+                'local-zfs:vol-vm-4567-disk-0' => 1,
             },
             vm_config => get_patched_config(
                 4567,
                 {
-                    'scsi0' => 'other-dir:4567/vm-4567-disk-0.qcow2,size=4G',
+                    'scsi0' => 'other-dir:4567/vol-vm-4567-disk-0.qcow2,size=4G',
                     snapshots => {
                         snap1 => {
-                            'scsi0' => 'other-dir:4567/vm-4567-disk-0.qcow2,size=4G',
+                            'scsi0' => 'other-dir:4567/vol-vm-4567-disk-0.qcow2,size=4G',
                             'vmstate' => 'other-dir:4567/vm-4567-state-snap1.raw',
                         },
                         snap2 => {
-                            'scsi0' => 'other-dir:4567/vm-4567-disk-0.qcow2,size=4G',
-                            'scsi1' => 'local-zfs:vm-4567-disk-0,size=1G',
+                            'scsi0' => 'other-dir:4567/vol-vm-4567-disk-0.qcow2,size=4G',
+                            'scsi1' => 'local-zfs:vol-vm-4567-disk-0,size=1G',
                             'vmstate' => 'other-dir:4567/vm-4567-state-snap2.raw',
                         },
                     },
@@ -821,20 +821,20 @@ my $tests = [
             scsi1 => undef,
         },
         storage_migrate_map => {
-            'local-dir:149/vm-149-disk-0.qcow2' => 'vm-149-disk-0',
+            'local-dir:149/vol-vm-149-disk-0.qcow2' => 'vol-vm-149-disk-0',
         },
         expected_calls => $default_expected_calls_online,
         expected => {
             source_volids => {
-                'local-dir:149/vm-149-disk-0.qcow2' => 1,
+                'local-dir:149/vol-vm-149-disk-0.qcow2' => 1,
             },
             target_volids => {
-                'local-zfs:vm-149-disk-10' => 1,
+                'local-zfs:vol-vm-149-disk-10' => 1,
             },
             vm_config => get_patched_config(
                 149,
                 {
-                    scsi0 => 'local-zfs:vm-149-disk-10,format=raw,size=4G',
+                    scsi0 => 'local-zfs:vol-vm-149-disk-10,format=raw,size=4G',
                     scsi1 => undef,
                 },
             ),
@@ -860,20 +860,20 @@ my $tests = [
             scsi1 => undef,
         },
         storage_migrate_map => {
-            'local-dir:149/vm-149-disk-0.qcow2' => '149/vm-149-disk-0.qcow2',
+            'local-dir:149/vol-vm-149-disk-0.qcow2' => '149/vol-vm-149-disk-0.qcow2',
         },
         expected_calls => $default_expected_calls_online,
         expected => {
             source_volids => {
-                'local-dir:149/vm-149-disk-0.qcow2' => 1,
+                'local-dir:149/vol-vm-149-disk-0.qcow2' => 1,
             },
             target_volids => {
-                'local-lvm:vm-149-disk-10' => 1,
+                'local-lvm:vol-vm-149-disk-10' => 1,
             },
             vm_config => get_patched_config(
                 149,
                 {
-                    scsi0 => 'local-lvm:vm-149-disk-10,format=raw,size=4G',
+                    scsi0 => 'local-lvm:vol-vm-149-disk-10,format=raw,size=4G',
                     scsi1 => undef,
                 },
             ),
@@ -899,21 +899,21 @@ my $tests = [
             targetstorage => 'local-lvm:local-zfs,local-lvm',
         },
         storage_migrate_map => {
-            'local-lvm:vm-149-disk-0' => 'vm-149-disk-0',
-            'local-dir:149/vm-149-disk-0.qcow2' => 'vm-149-disk-0',
+            'local-lvm:vol-vm-149-disk-0' => 'vol-vm-149-disk-0',
+            'local-dir:149/vol-vm-149-disk-0.qcow2' => 'vol-vm-149-disk-0',
         },
         expected_calls => $default_expected_calls_offline,
         expected => {
             source_volids => {},
             target_volids => {
-                'local-zfs:vm-149-disk-0' => 1,
-                'local-lvm:vm-149-disk-0' => 1,
+                'local-zfs:vol-vm-149-disk-0' => 1,
+                'local-lvm:vol-vm-149-disk-0' => 1,
             },
             vm_config => get_patched_config(
                 149,
                 {
-                    scsi0 => 'local-zfs:vm-149-disk-0,format=raw,size=4G',
-                    scsi1 => 'local-lvm:vm-149-disk-0,format=qcow2,size=1G',
+                    scsi0 => 'local-zfs:vol-vm-149-disk-0,format=raw,size=4G',
+                    scsi1 => 'local-lvm:vol-vm-149-disk-0,format=qcow2,size=1G',
                 },
             ),
             vm_status => {
@@ -935,21 +935,21 @@ my $tests = [
             targetstorage => 'local-dir:local-zfs,local-lvm:local-dir',
         },
         storage_migrate_map => {
-            'local-lvm:vm-149-disk-0' => '149/vm-149-disk-0.raw',
-            'local-dir:149/vm-149-disk-0.qcow2' => 'vm-149-disk-0',
+            'local-lvm:vol-vm-149-disk-0' => '149/vol-vm-149-disk-0.raw',
+            'local-dir:149/vol-vm-149-disk-0.qcow2' => 'vol-vm-149-disk-0',
         },
         expected_calls => $default_expected_calls_offline,
         expected => {
             source_volids => {},
             target_volids => {
-                'local-dir:149/vm-149-disk-0.raw' => 1,
-                'local-zfs:vm-149-disk-0' => 1,
+                'local-dir:149/vol-vm-149-disk-0.raw' => 1,
+                'local-zfs:vol-vm-149-disk-0' => 1,
             },
             vm_config => get_patched_config(
                 149,
                 {
-                    scsi0 => 'local-dir:149/vm-149-disk-0.raw,format=raw,size=4G',
-                    scsi1 => 'local-zfs:vm-149-disk-0,format=qcow2,size=1G',
+                    scsi0 => 'local-dir:149/vol-vm-149-disk-0.raw,format=raw,size=4G',
+                    scsi1 => 'local-zfs:vol-vm-149-disk-0,format=qcow2,size=1G',
                 },
             ),
             vm_status => {
@@ -974,14 +974,14 @@ my $tests = [
         expected => {
             source_volids => {},
             target_volids => {
-                'local-zfs:vm-149-disk-10' => 1,
-                'local-lvm:vm-149-disk-11' => 1,
+                'local-zfs:vol-vm-149-disk-10' => 1,
+                'local-lvm:vol-vm-149-disk-11' => 1,
             },
             vm_config => get_patched_config(
                 149,
                 {
-                    scsi0 => 'local-zfs:vm-149-disk-10,format=raw,size=4G',
-                    scsi1 => 'local-lvm:vm-149-disk-11,format=raw,size=1G',
+                    scsi0 => 'local-zfs:vol-vm-149-disk-10,format=raw,size=4G',
+                    scsi1 => 'local-lvm:vol-vm-149-disk-11,format=raw,size=1G',
                 },
             ),
             vm_status => {
@@ -1007,14 +1007,14 @@ my $tests = [
         expected => {
             source_volids => {},
             target_volids => {
-                'local-zfs:vm-149-disk-10' => 1,
-                'local-dir:149/vm-149-disk-11.qcow2' => 1,
+                'local-zfs:vol-vm-149-disk-10' => 1,
+                'local-dir:149/vol-vm-149-disk-11.qcow2' => 1,
             },
             vm_config => get_patched_config(
                 149,
                 {
-                    scsi0 => 'local-zfs:vm-149-disk-10,format=raw,size=4G',
-                    scsi1 => 'local-dir:149/vm-149-disk-11.qcow2,format=qcow2,size=1G',
+                    scsi0 => 'local-zfs:vol-vm-149-disk-10,format=raw,size=4G',
+                    scsi1 => 'local-dir:149/vol-vm-149-disk-11.qcow2,format=qcow2,size=1G',
                 },
             ),
             vm_status => {
@@ -1040,14 +1040,14 @@ my $tests = [
         expected => {
             source_volids => {},
             target_volids => {
-                'local-zfs:vm-149-disk-10' => 1,
-                'local-zfs:vm-149-disk-11' => 1,
+                'local-zfs:vol-vm-149-disk-10' => 1,
+                'local-zfs:vol-vm-149-disk-11' => 1,
             },
             vm_config => get_patched_config(
                 149,
                 {
-                    scsi0 => 'local-zfs:vm-149-disk-10,format=raw,size=4G',
-                    scsi1 => 'local-zfs:vm-149-disk-11,format=raw,size=1G',
+                    scsi0 => 'local-zfs:vol-vm-149-disk-10,format=raw,size=4G',
+                    scsi1 => 'local-zfs:vol-vm-149-disk-11,format=raw,size=1G',
                 },
             ),
             vm_status => {
@@ -1069,20 +1069,20 @@ my $tests = [
             'with-local-disks' => 1,
         },
         config_patch => {
-            scsi0 => 'local-lvm:vm-149-disk-0,size=123T',
+            scsi0 => 'local-lvm:vol-vm-149-disk-0,size=123T',
         },
         expected_calls => $default_expected_calls_online,
         expected => {
             source_volids => {},
             target_volids => {
-                'local-lvm:vm-149-disk-10' => 1,
-                'local-dir:149/vm-149-disk-11.qcow2' => 1,
+                'local-lvm:vol-vm-149-disk-10' => 1,
+                'local-dir:149/vol-vm-149-disk-11.qcow2' => 1,
             },
             vm_config => get_patched_config(
                 149,
                 {
-                    scsi0 => 'local-lvm:vm-149-disk-10,format=raw,size=4G',
-                    scsi1 => 'local-dir:149/vm-149-disk-11.qcow2,format=qcow2,size=1G',
+                    scsi0 => 'local-lvm:vol-vm-149-disk-10,format=raw,size=4G',
+                    scsi1 => 'local-dir:149/vol-vm-149-disk-11.qcow2,format=qcow2,size=1G',
                 },
             ),
             vm_status => {
@@ -1104,20 +1104,20 @@ my $tests = [
             'with-local-disks' => 1,
         },
         config_patch => {
-            scsi0 => 'local-lvm:vm-149-disk-0',
+            scsi0 => 'local-lvm:vol-vm-149-disk-0',
         },
         expected_calls => $default_expected_calls_online,
         expected => {
             source_volids => {},
             target_volids => {
-                'local-lvm:vm-149-disk-10' => 1,
-                'local-dir:149/vm-149-disk-11.qcow2' => 1,
+                'local-lvm:vol-vm-149-disk-10' => 1,
+                'local-dir:149/vol-vm-149-disk-11.qcow2' => 1,
             },
             vm_config => get_patched_config(
                 149,
                 {
-                    scsi0 => 'local-lvm:vm-149-disk-10,format=raw,size=4G',
-                    scsi1 => 'local-dir:149/vm-149-disk-11.qcow2,format=qcow2,size=1G',
+                    scsi0 => 'local-lvm:vol-vm-149-disk-10,format=raw,size=4G',
+                    scsi1 => 'local-dir:149/vol-vm-149-disk-11.qcow2,format=qcow2,size=1G',
                 },
             ),
             vm_status => {
@@ -1536,14 +1536,14 @@ my $tests = [
         expected => {
             source_volids => {},
             target_volids => {
-                'local-lvm:vm-149-disk-10' => 1,
-                'local-dir:149/vm-149-disk-11.qcow2' => 1,
+                'local-lvm:vol-vm-149-disk-10' => 1,
+                'local-dir:149/vol-vm-149-disk-11.qcow2' => 1,
             },
             vm_config => get_patched_config(
                 149,
                 {
-                    scsi0 => 'local-lvm:vm-149-disk-10,format=raw,size=4G',
-                    scsi1 => 'local-dir:149/vm-149-disk-11.qcow2,format=qcow2,size=1G',
+                    scsi0 => 'local-lvm:vol-vm-149-disk-10,format=raw,size=4G',
+                    scsi1 => 'local-dir:149/vol-vm-149-disk-11.qcow2,format=qcow2,size=1G',
                 },
             ),
             vm_status => {
@@ -1593,7 +1593,7 @@ my $tests = [
         },
         config_patch => {
             scsi1 => undef,
-            unused0 => 'local-dir:149/vm-149-disk-0.qcow2',
+            unused0 => 'local-dir:149/vol-vm-149-disk-0.qcow2',
         },
         expected_calls => {},
         expect_die => "qemu_drive_mirror_monitor 'cancel' error",
@@ -1608,7 +1608,7 @@ my $tests = [
                 149,
                 {
                     scsi1 => undef,
-                    unused0 => 'local-dir:149/vm-149-disk-0.qcow2',
+                    unused0 => 'local-dir:149/vol-vm-149-disk-0.qcow2',
                 },
             ),
             vm_status => {
@@ -1648,10 +1648,10 @@ my $tests = [
             'with-local-disks' => 1,
         },
         fail_config => {
-            'storage_migrate' => 'local-lvm:vm-149-disk-0',
+            'storage_migrate' => 'local-lvm:vol-vm-149-disk-0',
         },
         expected_calls => {},
-        expect_die => "storage_migrate 'local-lvm:vm-149-disk-0' error",
+        expect_die => "storage_migrate 'local-lvm:vol-vm-149-disk-0' error",
         expected => {
             source_volids => local_volids_for_vm(149),
             target_volids => {},
@@ -1677,15 +1677,15 @@ my $tests = [
         expected => {
             source_volids => {},
             target_volids => {
-                'local-zfs:vm-111-disk-0' => 1,
-                'local-lvm:vm-111-disk-10' => 1,
+                'local-zfs:vol-vm-111-disk-0' => 1,
+                'local-lvm:vol-vm-111-disk-10' => 1,
             },
             vm_config => get_patched_config(
                 111,
                 {
-                    ide0 => 'local-lvm:vm-111-disk-10,format=raw,size=4G',
+                    ide0 => 'local-lvm:vol-vm-111-disk-10,format=raw,size=4G',
                     pending => {
-                        scsi0 => 'local-zfs:vm-111-disk-0,size=103M',
+                        scsi0 => 'local-zfs:vol-vm-111-disk-0,size=103M',
                     },
                 },
             ),
diff --git a/src/test/test_get_replicatable_volumes.pl b/src/test/test_get_replicatable_volumes.pl
index 6a3d0338..ab21f29d 100755
--- a/src/test/test_get_replicatable_volumes.pl
+++ b/src/test/test_get_replicatable_volumes.pl
@@ -39,7 +39,7 @@ my $storecfg = {
 
 my $vmid = 900;
 
-my $rawconf = "scsi0: non-existent-store:vm-103-disk-1,size=8G\n";
+my $rawconf = "scsi0: non-existent-store:vol-vm-103-disk-1,size=8G\n";
 my $conf = PVE::QemuServer::parse_vm_config("/qemu-server/$vmid.conf", $rawconf);
 
 my $volumes;
@@ -52,7 +52,7 @@ is($@, "storage 'non-existent-store' does not exist\n", $test_name);
 
 $test_name = "test with disk from other VM (not owner)";
 
-$rawconf = "scsi0: local:103/vm-103-disk-1.qcow2,size=8G\n";
+$rawconf = "scsi0: local:103/vol-vm-103-disk-1.qcow2,size=8G\n";
 $conf = PVE::QemuServer::parse_vm_config("/qemu-server/$vmid.conf", $rawconf);
 
 $volumes = PVE::QemuConfig->get_replicatable_volumes($storecfg, $vmid, $conf, 0, 0);
@@ -60,11 +60,11 @@ is_deeply($volumes, {}, $test_name);
 
 $test_name = "test missing replicate feature";
 
-$rawconf = "scsi0: local:$vmid/vm-$vmid-disk-1.qcow2,size=8G\n";
+$rawconf = "scsi0: local:$vmid/vol-vm-$vmid-disk-1.qcow2,size=8G\n";
 $conf = PVE::QemuServer::parse_vm_config("/qemu-server/$vmid.conf", $rawconf);
 
 eval { $volumes = PVE::QemuConfig->get_replicatable_volumes($storecfg, $vmid, $conf, 0, 0); };
-is($@, "missing replicate feature on volume 'local:900/vm-900-disk-1.qcow2'\n", $test_name);
+is($@, "missing replicate feature on volume 'local:900/vol-vm-900-disk-1.qcow2'\n", $test_name);
 
 $test_name = "test raw path disk with replicate enabled";
 
@@ -102,62 +102,62 @@ $test_name = "test hidden volid in snapshot";
 
 $rawconf = <<__EOD__;
 memory: 1024
-scsi0: local-zfs:vm-$vmid-disk-2,size=8G
+scsi0: local-zfs:vol-vm-$vmid-disk-2,size=8G
 [snap1]
 memory: 512 
-scsi0: local-zfs:vm-$vmid-disk-1,size=8G    
+scsi0: local-zfs:vol-vm-$vmid-disk-1,size=8G    
 __EOD__
 
 $conf = PVE::QemuServer::parse_vm_config("/qemu-server/$vmid.conf", $rawconf);
 $volumes = PVE::QemuConfig->get_replicatable_volumes($storecfg, $vmid, $conf, 0, 0);
 $expect = {
-    "local-zfs:vm-$vmid-disk-1" => 1,
-    "local-zfs:vm-$vmid-disk-2" => 1,
+    "local-zfs:vol-vm-$vmid-disk-1" => 1,
+    "local-zfs:vol-vm-$vmid-disk-2" => 1,
 };
 is_deeply($volumes, $expect, $test_name);
 
 $test_name = "test volid with different replicate setting in snapshot";
 $rawconf = <<__EOD__;
 memory: 1024
-scsi0: local-zfs:vm-$vmid-disk-1,size=8G,replicate=0
+scsi0: local-zfs:vol-vm-$vmid-disk-1,size=8G,replicate=0
 [snap1]
 memory: 512 
-scsi0: local-zfs:vm-$vmid-disk-1,size=8G
+scsi0: local-zfs:vol-vm-$vmid-disk-1,size=8G
 __EOD__
 
 $conf = PVE::QemuServer::parse_vm_config("/qemu-server/$vmid.conf", $rawconf);
 $volumes = PVE::QemuConfig->get_replicatable_volumes($storecfg, $vmid, $conf, 0, 0);
 $expect = {
-    "local-zfs:vm-$vmid-disk-1" => 1,
+    "local-zfs:vol-vm-$vmid-disk-1" => 1,
 };
 is_deeply($volumes, $expect, $test_name);
 
 $test_name = "test vm with replicatable unused volumes";
 
 $rawconf = <<__EOD__;
-scsi0: local-zfs:vm-$vmid-disk-1,size=8G
-unused1: local-zfs:vm-$vmid-disk-2
-unused5: local-zfs:vm-$vmid-disk-3
+scsi0: local-zfs:vol-vm-$vmid-disk-1,size=8G
+unused1: local-zfs:vol-vm-$vmid-disk-2
+unused5: local-zfs:vol-vm-$vmid-disk-3
 __EOD__
 
 $conf = PVE::QemuServer::parse_vm_config("/qemu-server/$vmid.conf", $rawconf);
 $volumes = PVE::QemuConfig->get_replicatable_volumes($storecfg, $vmid, $conf, 0, 0);
 $expect = {
-    "local-zfs:vm-$vmid-disk-1" => 1,
-    "local-zfs:vm-$vmid-disk-2" => 1,
-    "local-zfs:vm-$vmid-disk-3" => 1,
+    "local-zfs:vol-vm-$vmid-disk-1" => 1,
+    "local-zfs:vol-vm-$vmid-disk-2" => 1,
+    "local-zfs:vol-vm-$vmid-disk-3" => 1,
 };
 is_deeply($volumes, $expect, $test_name);
 
 $test_name = "test vm with non-replicatable unused volumes";
 $rawconf = <<__EOD__;
-scsi0: local-zfs:vm-$vmid-disk-1,size=8G
-unused1: local:$vmid/vm-$vmid-disk-2.raw
+scsi0: local-zfs:vol-vm-$vmid-disk-1,size=8G
+unused1: local:$vmid/vol-vm-$vmid-disk-2.raw
 __EOD__
 
 $conf = PVE::QemuServer::parse_vm_config("/qemu-server/$vmid.conf", $rawconf);
 eval { $volumes = PVE::QemuConfig->get_replicatable_volumes($storecfg, $vmid, $conf, 0, 0); };
-is($@, "missing replicate feature on volume 'local:900/vm-900-disk-2.raw'\n", $test_name);
+is($@, "missing replicate feature on volume 'local:900/vol-vm-900-disk-2.raw'\n", $test_name);
 
 done_testing();
 exit(0);
-- 
2.47.2



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] 74+ messages in thread

* [pve-devel] [PATCH qemu-server 07/10] make tidy
  2025-07-29 11:15 [pve-devel] [RFC storage 00/26+10+3] unify vtype and content-type and Wolfgang Bumiller
                   ` (34 preceding siblings ...)
  2025-07-29 11:15 ` [pve-devel] [PATCH qemu-server 06/10] tests: scripted: update tests to new vtypes and paths Wolfgang Bumiller
@ 2025-07-29 11:15 ` Wolfgang Bumiller
  2025-07-29 11:15 ` [pve-devel] [PATCH qemu-server 08/10] tests: fixup restore test to use new volume naming scheme Wolfgang Bumiller
                   ` (3 subsequent siblings)
  39 siblings, 0 replies; 74+ messages in thread
From: Wolfgang Bumiller @ 2025-07-29 11:15 UTC (permalink / raw)
  To: pve-devel

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
---
 src/test/run_qemu_img_convert_tests.pl | 53 ++++++++++++++++++--------
 1 file changed, 38 insertions(+), 15 deletions(-)

diff --git a/src/test/run_qemu_img_convert_tests.pl b/src/test/run_qemu_img_convert_tests.pl
index 2acbbef4..cfb1586f 100755
--- a/src/test/run_qemu_img_convert_tests.pl
+++ b/src/test/run_qemu_img_convert_tests.pl
@@ -92,8 +92,11 @@ my $storage_config = {
 my $tests = [
     {
         name => 'qcow2raw',
-        parameters =>
-            ["local:$vmid/vol-vm-$vmid-disk-0.qcow2", "local:$vmid/vol-vm-$vmid-disk-0.raw", 1024 * 10],
+        parameters => [
+            "local:$vmid/vol-vm-$vmid-disk-0.qcow2",
+            "local:$vmid/vol-vm-$vmid-disk-0.raw",
+            1024 * 10,
+        ],
         expected => [
             "/usr/bin/qemu-img",
             "convert",
@@ -109,8 +112,11 @@ my $tests = [
     },
     {
         name => "raw2qcow2",
-        parameters =>
-            ["local:$vmid/vol-vm-$vmid-disk-0.raw", "local:$vmid/vol-vm-$vmid-disk-0.qcow2", 1024 * 10],
+        parameters => [
+            "local:$vmid/vol-vm-$vmid-disk-0.raw",
+            "local:$vmid/vol-vm-$vmid-disk-0.qcow2",
+            1024 * 10,
+        ],
         expected => [
             "/usr/bin/qemu-img",
             "convert",
@@ -160,8 +166,11 @@ my $tests = [
     },
     {
         name => "local2zos",
-        parameters =>
-            ["local:$vmid/vol-vm-$vmid-disk-0.raw", "zfs-over-iscsi:vol-vm-$vmid-disk-0", 1024 * 10],
+        parameters => [
+            "local:$vmid/vol-vm-$vmid-disk-0.raw",
+            "zfs-over-iscsi:vol-vm-$vmid-disk-0",
+            1024 * 10,
+        ],
         expected => [
             "/usr/bin/qemu-img",
             "convert",
@@ -176,8 +185,11 @@ my $tests = [
     },
     {
         name => "zos2local",
-        parameters =>
-            ["zfs-over-iscsi:vol-vm-$vmid-disk-0", "local:$vmid/vol-vm-$vmid-disk-0.raw", 1024 * 10],
+        parameters => [
+            "zfs-over-iscsi:vol-vm-$vmid-disk-0",
+            "local:$vmid/vol-vm-$vmid-disk-0.raw",
+            1024 * 10,
+        ],
         expected => [
             "/usr/bin/qemu-img",
             "convert",
@@ -279,8 +291,11 @@ my $tests = [
     },
     {
         name => "notexistingstorage",
-        parameters =>
-            ["local-lvm:vol-vm-$vmid-disk-0", "not-existing:$vmid/vol-vm-$vmid-disk-0.raw", 1024 * 10],
+        parameters => [
+            "local-lvm:vol-vm-$vmid-disk-0",
+            "not-existing:$vmid/vol-vm-$vmid-disk-0.raw",
+            1024 * 10,
+        ],
         expected => "storage 'not-existing' does not exist\n",
     },
     {
@@ -306,8 +321,11 @@ my $tests = [
     },
     {
         name => "efidisk",
-        parameters =>
-            ["/usr/share/kvm/OVMF_VARS-pure-efi.fd", "local:$vmid/vol-vm-$vmid-disk-0.raw", 1024 * 10],
+        parameters => [
+            "/usr/share/kvm/OVMF_VARS-pure-efi.fd",
+            "local:$vmid/vol-vm-$vmid-disk-0.raw",
+            1024 * 10,
+        ],
         expected => [
             "/usr/bin/qemu-img",
             "convert",
@@ -321,8 +339,11 @@ my $tests = [
     },
     {
         name => "efi2zos",
-        parameters =>
-            ["/usr/share/kvm/OVMF_VARS-pure-efi.fd", "zfs-over-iscsi:vol-vm-$vmid-disk-0", 1024 * 10],
+        parameters => [
+            "/usr/share/kvm/OVMF_VARS-pure-efi.fd",
+            "zfs-over-iscsi:vol-vm-$vmid-disk-0",
+            1024 * 10,
+        ],
         expected => [
             "/usr/bin/qemu-img",
             "convert",
@@ -551,7 +572,9 @@ my $tests = [
     {
         name => "lvmqcow2_external_snapshot_target",
         parameters => [
-            "local:$vmid/vol-vm-$vmid-disk-0.raw", "lvm-store:vol-vm-$vmid-disk-0.qcow2", 1024 * 10,
+            "local:$vmid/vol-vm-$vmid-disk-0.raw",
+            "lvm-store:vol-vm-$vmid-disk-0.qcow2",
+            1024 * 10,
         ],
         expected => [
             "/usr/bin/qemu-img",
-- 
2.47.2



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] 74+ messages in thread

* [pve-devel] [PATCH qemu-server 08/10] tests: fixup restore test to use new volume naming scheme
  2025-07-29 11:15 [pve-devel] [RFC storage 00/26+10+3] unify vtype and content-type and Wolfgang Bumiller
                   ` (35 preceding siblings ...)
  2025-07-29 11:15 ` [pve-devel] [PATCH qemu-server 07/10] make tidy Wolfgang Bumiller
@ 2025-07-29 11:15 ` Wolfgang Bumiller
  2025-07-29 11:15 ` [pve-devel] [PATCH qemu-server 09/10] tests: update remaining tests to new snapshot paths Wolfgang Bumiller
                   ` (2 subsequent siblings)
  39 siblings, 0 replies; 74+ messages in thread
From: Wolfgang Bumiller @ 2025-07-29 11:15 UTC (permalink / raw)
  To: pve-devel

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
---
 src/test/run_qemu_restore_config_tests.pl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/test/run_qemu_restore_config_tests.pl b/src/test/run_qemu_restore_config_tests.pl
index 4d5ebb5f..bbfa8631 100755
--- a/src/test/run_qemu_restore_config_tests.pl
+++ b/src/test/run_qemu_restore_config_tests.pl
@@ -56,7 +56,7 @@ dir_glob_foreach(
 
                 $fmt ||= 'raw';
 
-                $map->{$drive} = "target:${vmid}/vm-${vmid}-disk-${disknum}.${fmt}";
+                $map->{$drive} = "target:${vmid}/vol-vm-${vmid}-disk-${disknum}.${fmt}";
                 $disknum++;
             }
         }
-- 
2.47.2



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] 74+ messages in thread

* [pve-devel] [PATCH qemu-server 09/10] tests: update remaining tests to new snapshot paths
  2025-07-29 11:15 [pve-devel] [RFC storage 00/26+10+3] unify vtype and content-type and Wolfgang Bumiller
                   ` (36 preceding siblings ...)
  2025-07-29 11:15 ` [pve-devel] [PATCH qemu-server 08/10] tests: fixup restore test to use new volume naming scheme Wolfgang Bumiller
@ 2025-07-29 11:15 ` Wolfgang Bumiller
  2025-07-29 11:15 ` [pve-devel] [PATCH qemu-server 10/10] tests: regenerate cfg2cmd files Wolfgang Bumiller
  2025-07-29 15:34 ` [pve-devel] partially-applied: [RFC storage 00/26+10+3] unify vtype and content-type and Fiona Ebner
  39 siblings, 0 replies; 74+ messages in thread
From: Wolfgang Bumiller @ 2025-07-29 11:15 UTC (permalink / raw)
  To: pve-devel

The snapshot path wasn't covered by the previous scripted update, so
changing this one manually.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
---
 src/test/run_qemu_img_convert_tests.pl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/test/run_qemu_img_convert_tests.pl b/src/test/run_qemu_img_convert_tests.pl
index cfb1586f..d97c0bd0 100755
--- a/src/test/run_qemu_img_convert_tests.pl
+++ b/src/test/run_qemu_img_convert_tests.pl
@@ -524,7 +524,7 @@ my $tests = [
             "qcow2",
             "-O",
             "raw",
-            "/var/lib/vzsnapext/images/$vmid/snap-foo-vol-vm-$vmid-disk-0.qcow2",
+            "/var/lib/vzsnapext/vms/$vmid/snap-foo-vol-vm-$vmid-disk-0.qcow2",
             "/var/lib/vz/vms/$vmid/vol-vm-$vmid-disk-0.raw",
         ],
     },
-- 
2.47.2



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] 74+ messages in thread

* [pve-devel] [PATCH qemu-server 10/10] tests: regenerate cfg2cmd files
  2025-07-29 11:15 [pve-devel] [RFC storage 00/26+10+3] unify vtype and content-type and Wolfgang Bumiller
                   ` (37 preceding siblings ...)
  2025-07-29 11:15 ` [pve-devel] [PATCH qemu-server 09/10] tests: update remaining tests to new snapshot paths Wolfgang Bumiller
@ 2025-07-29 11:15 ` Wolfgang Bumiller
  2025-07-29 14:19   ` Max R. Carrara
  2025-07-29 15:34 ` [pve-devel] partially-applied: [RFC storage 00/26+10+3] unify vtype and content-type and Fiona Ebner
  39 siblings, 1 reply; 74+ messages in thread
From: Wolfgang Bumiller @ 2025-07-29 11:15 UTC (permalink / raw)
  To: pve-devel

Only node name hashes change at this point.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
---
 src/test/cfg2cmd/aio.conf.cmd                 | 28 +++++++++----------
 src/test/cfg2cmd/bootorder-empty.conf.cmd     |  6 ++--
 src/test/cfg2cmd/bootorder-legacy.conf.cmd    |  6 ++--
 src/test/cfg2cmd/bootorder.conf.cmd           |  6 ++--
 src/test/cfg2cmd/efi-raw.conf.cmd             |  2 +-
 .../cfg2cmd/efi-secboot-and-tpm-q35.conf.cmd  |  2 +-
 src/test/cfg2cmd/efi-secboot-and-tpm.conf.cmd |  2 +-
 src/test/cfg2cmd/efidisk-on-rbd.conf.cmd      |  2 +-
 src/test/cfg2cmd/ide.conf.cmd                 |  2 +-
 src/test/cfg2cmd/q35-ide.conf.cmd             |  2 +-
 .../q35-linux-hostpci-mapping.conf.cmd        |  2 +-
 .../q35-linux-hostpci-multifunction.conf.cmd  |  2 +-
 ...q35-linux-hostpci-x-pci-overrides.conf.cmd |  2 +-
 src/test/cfg2cmd/q35-linux-hostpci.conf.cmd   |  2 +-
 src/test/cfg2cmd/q35-simple.conf.cmd          |  2 +-
 src/test/cfg2cmd/seabios_serial.conf.cmd      |  2 +-
 src/test/cfg2cmd/sev-es.conf.cmd              |  2 +-
 src/test/cfg2cmd/sev-std.conf.cmd             |  2 +-
 src/test/cfg2cmd/simple-backingchain.conf.cmd |  4 +--
 src/test/cfg2cmd/simple-btrfs.conf.cmd        |  8 +++---
 src/test/cfg2cmd/simple-cifs.conf.cmd         |  8 +++---
 src/test/cfg2cmd/simple-lvm.conf.cmd          |  8 +++---
 src/test/cfg2cmd/simple-lvmthin.conf.cmd      |  8 +++---
 src/test/cfg2cmd/simple-rbd.conf.cmd          | 16 +++++------
 src/test/cfg2cmd/simple-virtio-blk.conf.cmd   |  2 +-
 .../cfg2cmd/simple-zfs-over-iscsi.conf.cmd    |  8 +++---
 src/test/cfg2cmd/simple1.conf.cmd             |  2 +-
 27 files changed, 69 insertions(+), 69 deletions(-)

diff --git a/src/test/cfg2cmd/aio.conf.cmd b/src/test/cfg2cmd/aio.conf.cmd
index 7544b1db..8bd6ad9e 100644
--- a/src/test/cfg2cmd/aio.conf.cmd
+++ b/src/test/cfg2cmd/aio.conf.cmd
@@ -38,33 +38,33 @@
   -device 'virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3,free-page-reporting=on' \
   -iscsi 'initiator-name=iqn.1993-08.org.debian:01:aabbccddeeff' \
   -device 'lsi,id=scsihw0,bus=pci.0,addr=0x5' \
-  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"threads","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/var/lib/vz/vms/8006/vol-vm-8006-disk-0.raw","node-name":"e3b2553803d55d43b9986a0aac3e9a7","read-only":false},"node-name":"f3b2553803d55d43b9986a0aac3e9a7","read-only":false},"node-name":"drive-scsi0","read-only":false,"throttle-group":"throttle-drive-scsi0"}' \
+  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"threads","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/var/lib/vz/vms/8006/vol-vm-8006-disk-0.raw","node-name":"e711a57e7dda882833cb7b277366b29","read-only":false},"node-name":"f711a57e7dda882833cb7b277366b29","read-only":false},"node-name":"drive-scsi0","read-only":false,"throttle-group":"throttle-drive-scsi0"}' \
   -device 'scsi-hd,bus=scsihw0.0,scsi-id=0,drive=drive-scsi0,id=scsi0,device_id=drive-scsi0,write-cache=on' \
-  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"native","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/var/lib/vz/vms/8006/vol-vm-8006-disk-1.raw","node-name":"e08707d013893852b3d4d42301a4298","read-only":false},"node-name":"f08707d013893852b3d4d42301a4298","read-only":false},"node-name":"drive-scsi1","read-only":false,"throttle-group":"throttle-drive-scsi1"}' \
+  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"native","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/var/lib/vz/vms/8006/vol-vm-8006-disk-1.raw","node-name":"e114231d5596d5d7189a4ffe674615b","read-only":false},"node-name":"f114231d5596d5d7189a4ffe674615b","read-only":false},"node-name":"drive-scsi1","read-only":false,"throttle-group":"throttle-drive-scsi1"}' \
   -device 'scsi-hd,bus=scsihw0.0,scsi-id=1,drive=drive-scsi1,id=scsi1,device_id=drive-scsi1,write-cache=on' \
-  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/var/lib/vz/vms/8006/vol-vm-8006-disk-2.raw","node-name":"edb0854bba55e8b2544ad937c9f5afc","read-only":false},"node-name":"fdb0854bba55e8b2544ad937c9f5afc","read-only":false},"node-name":"drive-scsi2","read-only":false,"throttle-group":"throttle-drive-scsi2"}' \
+  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/var/lib/vz/vms/8006/vol-vm-8006-disk-2.raw","node-name":"e468504bb07bf0cbd19ac604cc55d13","read-only":false},"node-name":"f468504bb07bf0cbd19ac604cc55d13","read-only":false},"node-name":"drive-scsi2","read-only":false,"throttle-group":"throttle-drive-scsi2"}' \
   -device 'scsi-hd,bus=scsihw0.0,scsi-id=2,drive=drive-scsi2,id=scsi2,device_id=drive-scsi2,write-cache=on' \
-  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/var/lib/vz/vms/8006/vol-vm-8006-disk-3.raw","node-name":"e9c170cb9491763cad3f31718205efc","read-only":false},"node-name":"f9c170cb9491763cad3f31718205efc","read-only":false},"node-name":"drive-scsi3","read-only":false,"throttle-group":"throttle-drive-scsi3"}' \
+  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/var/lib/vz/vms/8006/vol-vm-8006-disk-3.raw","node-name":"e0c9b44f107b4b27393827f41dbc3a9","read-only":false},"node-name":"f0c9b44f107b4b27393827f41dbc3a9","read-only":false},"node-name":"drive-scsi3","read-only":false,"throttle-group":"throttle-drive-scsi3"}' \
   -device 'scsi-hd,bus=scsihw0.0,scsi-id=3,drive=drive-scsi3,id=scsi3,device_id=drive-scsi3,write-cache=on' \
-  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"native","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/mnt/pve/cifs-store/vms/8006/vol-vm-8006-disk-4.raw","node-name":"ea34ecc24c40da0d53420ef344ced37","read-only":false},"node-name":"fa34ecc24c40da0d53420ef344ced37","read-only":false},"node-name":"drive-scsi4","read-only":false,"throttle-group":"throttle-drive-scsi4"}' \
+  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"native","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/mnt/pve/cifs-store/vms/8006/vol-vm-8006-disk-4.raw","node-name":"e13a2959906e44f7cc40fc3735d972b","read-only":false},"node-name":"f13a2959906e44f7cc40fc3735d972b","read-only":false},"node-name":"drive-scsi4","read-only":false,"throttle-group":"throttle-drive-scsi4"}' \
   -device 'scsi-hd,bus=scsihw0.0,scsi-id=4,drive=drive-scsi4,id=scsi4,device_id=drive-scsi4,write-cache=on' \
-  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/mnt/pve/cifs-store/vms/8006/vol-vm-8006-disk-5.raw","node-name":"e39cacf47a4f4877072601505d90949","read-only":false},"node-name":"f39cacf47a4f4877072601505d90949","read-only":false},"node-name":"drive-scsi5","read-only":false,"throttle-group":"throttle-drive-scsi5"}' \
+  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/mnt/pve/cifs-store/vms/8006/vol-vm-8006-disk-5.raw","node-name":"ed8f89e28d2677f81cbbe826a0fe887","read-only":false},"node-name":"fd8f89e28d2677f81cbbe826a0fe887","read-only":false},"node-name":"drive-scsi5","read-only":false,"throttle-group":"throttle-drive-scsi5"}' \
   -device 'scsi-hd,bus=scsihw0.0,scsi-id=5,drive=drive-scsi5,id=scsi5,device_id=drive-scsi5,write-cache=on' \
-  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"host_device","filename":"/dev/rbd-pve/fc4181a6-56eb-4f68-b452-8ba1f381ca2a/cpool/vol-vm-8006-disk-6","node-name":"e7db1ee70981087e4a2861bc7da417b","read-only":false},"node-name":"f7db1ee70981087e4a2861bc7da417b","read-only":false},"node-name":"drive-scsi6","read-only":false,"throttle-group":"throttle-drive-scsi6"}' \
+  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"host_device","filename":"/dev/rbd-pve/fc4181a6-56eb-4f68-b452-8ba1f381ca2a/cpool/vol-vm-8006-disk-6","node-name":"e6c656aa149ece1c9134f93c28029f8","read-only":false},"node-name":"f6c656aa149ece1c9134f93c28029f8","read-only":false},"node-name":"drive-scsi6","read-only":false,"throttle-group":"throttle-drive-scsi6"}' \
   -device 'scsi-hd,bus=scsihw0.0,scsi-id=6,drive=drive-scsi6,id=scsi6,device_id=drive-scsi6,write-cache=on' \
   -device 'lsi,id=scsihw1,bus=pci.0,addr=0x6' \
-  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"host_device","filename":"/dev/rbd-pve/fc4181a6-56eb-4f68-b452-8ba1f381ca2a/cpool/vol-vm-8006-disk-7","node-name":"e2d2deac808301140a96c862fe3ea85","read-only":false},"node-name":"f2d2deac808301140a96c862fe3ea85","read-only":false},"node-name":"drive-scsi7","read-only":false,"throttle-group":"throttle-drive-scsi7"}' \
+  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"host_device","filename":"/dev/rbd-pve/fc4181a6-56eb-4f68-b452-8ba1f381ca2a/cpool/vol-vm-8006-disk-7","node-name":"e11b544de4ab077359ec27407bda460","read-only":false},"node-name":"f11b544de4ab077359ec27407bda460","read-only":false},"node-name":"drive-scsi7","read-only":false,"throttle-group":"throttle-drive-scsi7"}' \
   -device 'scsi-hd,bus=scsihw1.0,scsi-id=0,drive=drive-scsi7,id=scsi7,device_id=drive-scsi7,write-cache=on' \
-  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"threads","cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"host_device","filename":"/dev/rbd-pve/fc4181a6-56eb-4f68-b452-8ba1f381ca2a/cpool/vol-vm-8006-disk-8","node-name":"e9796b73db57b8943746ede7d0d3060","read-only":false},"node-name":"f9796b73db57b8943746ede7d0d3060","read-only":false},"node-name":"drive-scsi8","read-only":false,"throttle-group":"throttle-drive-scsi8"}' \
+  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"threads","cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"host_device","filename":"/dev/rbd-pve/fc4181a6-56eb-4f68-b452-8ba1f381ca2a/cpool/vol-vm-8006-disk-8","node-name":"ef89b3e6959257ddd5c47b9dac24153","read-only":false},"node-name":"ff89b3e6959257ddd5c47b9dac24153","read-only":false},"node-name":"drive-scsi8","read-only":false,"throttle-group":"throttle-drive-scsi8"}' \
   -device 'scsi-hd,bus=scsihw1.0,scsi-id=1,drive=drive-scsi8,id=scsi8,device_id=drive-scsi8,write-cache=on' \
-  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"io_uring","cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"host_device","filename":"/dev/rbd-pve/fc4181a6-56eb-4f68-b452-8ba1f381ca2a/cpool/vol-vm-8006-disk-9","node-name":"efa538892acc012edbdc5810035bf7d","read-only":false},"node-name":"ffa538892acc012edbdc5810035bf7d","read-only":false},"node-name":"drive-scsi9","read-only":false,"throttle-group":"throttle-drive-scsi9"}' \
+  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"io_uring","cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"host_device","filename":"/dev/rbd-pve/fc4181a6-56eb-4f68-b452-8ba1f381ca2a/cpool/vol-vm-8006-disk-9","node-name":"e241ab50dd58ea2ce3d3fd8e390a4fa","read-only":false},"node-name":"f241ab50dd58ea2ce3d3fd8e390a4fa","read-only":false},"node-name":"drive-scsi9","read-only":false,"throttle-group":"throttle-drive-scsi9"}' \
   -device 'scsi-hd,bus=scsihw1.0,scsi-id=2,drive=drive-scsi9,id=scsi9,device_id=drive-scsi9,write-cache=on' \
-  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"auth-client-required":["none"],"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"rbd","image":"vol-vm-8006-disk-8","node-name":"e6f4cbffa741d16bba69304eb2800ef","pool":"cpool","read-only":false,"server":[{"host":"127.0.0.42","port":"3300"},{"host":"127.0.0.21","port":"3300"},{"host":"::1","port":"3300"}]},"node-name":"f6f4cbffa741d16bba69304eb2800ef","read-only":false},"node-name":"drive-scsi10","read-only":false,"throttle-group":"throttle-drive-scsi10"}' \
+  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"auth-client-required":["none"],"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"rbd","image":"vol-vm-8006-disk-8","node-name":"e62776a0c25540d3f44a288ef286873","pool":"cpool","read-only":false,"server":[{"host":"127.0.0.42","port":"3300"},{"host":"127.0.0.21","port":"3300"},{"host":"::1","port":"3300"}]},"node-name":"f62776a0c25540d3f44a288ef286873","read-only":false},"node-name":"drive-scsi10","read-only":false,"throttle-group":"throttle-drive-scsi10"}' \
   -device 'scsi-hd,bus=scsihw1.0,scsi-id=3,drive=drive-scsi10,id=scsi10,device_id=drive-scsi10,write-cache=on' \
-  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"auth-client-required":["none"],"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"rbd","image":"vol-vm-8006-disk-8","node-name":"e42375c54de70f5f4be966d98c90255","pool":"cpool","read-only":false,"server":[{"host":"127.0.0.42","port":"3300"},{"host":"127.0.0.21","port":"3300"},{"host":"::1","port":"3300"}]},"node-name":"f42375c54de70f5f4be966d98c90255","read-only":false},"node-name":"drive-scsi11","read-only":false,"throttle-group":"throttle-drive-scsi11"}' \
+  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"auth-client-required":["none"],"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"rbd","image":"vol-vm-8006-disk-8","node-name":"e37ebe8380dcfd9549eb68ff01456fb","pool":"cpool","read-only":false,"server":[{"host":"127.0.0.42","port":"3300"},{"host":"127.0.0.21","port":"3300"},{"host":"::1","port":"3300"}]},"node-name":"f37ebe8380dcfd9549eb68ff01456fb","read-only":false},"node-name":"drive-scsi11","read-only":false,"throttle-group":"throttle-drive-scsi11"}' \
   -device 'scsi-hd,bus=scsihw1.0,scsi-id=4,drive=drive-scsi11,id=scsi11,device_id=drive-scsi11,write-cache=on' \
-  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"native","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"host_device","filename":"/dev/veegee/vol-vm-8006-disk-9","node-name":"ed7b2c9e0133619fcf6cb8ce5903502","read-only":false},"node-name":"fd7b2c9e0133619fcf6cb8ce5903502","read-only":false},"node-name":"drive-scsi12","read-only":false,"throttle-group":"throttle-drive-scsi12"}' \
+  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"native","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"host_device","filename":"/dev/veegee/vol-vm-8006-disk-9","node-name":"ef3da0a5b87f2c34dbadab0725aa614","read-only":false},"node-name":"ff3da0a5b87f2c34dbadab0725aa614","read-only":false},"node-name":"drive-scsi12","read-only":false,"throttle-group":"throttle-drive-scsi12"}' \
   -device 'scsi-hd,bus=scsihw1.0,scsi-id=5,drive=drive-scsi12,id=scsi12,device_id=drive-scsi12,write-cache=on' \
-  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"host_device","filename":"/dev/veegee/vol-vm-8006-disk-9","node-name":"ed85420a880203ca1401d00a8edf132","read-only":false},"node-name":"fd85420a880203ca1401d00a8edf132","read-only":false},"node-name":"drive-scsi13","read-only":false,"throttle-group":"throttle-drive-scsi13"}' \
+  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"host_device","filename":"/dev/veegee/vol-vm-8006-disk-9","node-name":"effe00e4d505fd544b233454bae4f6a","read-only":false},"node-name":"fffe00e4d505fd544b233454bae4f6a","read-only":false},"node-name":"drive-scsi13","read-only":false,"throttle-group":"throttle-drive-scsi13"}' \
   -device 'scsi-hd,bus=scsihw1.0,scsi-id=6,drive=drive-scsi13,id=scsi13,device_id=drive-scsi13,write-cache=on' \
   -machine 'type=pc+pve0'
diff --git a/src/test/cfg2cmd/bootorder-empty.conf.cmd b/src/test/cfg2cmd/bootorder-empty.conf.cmd
index b53e303b..5b0933ad 100644
--- a/src/test/cfg2cmd/bootorder-empty.conf.cmd
+++ b/src/test/cfg2cmd/bootorder-empty.conf.cmd
@@ -32,11 +32,11 @@
   -iscsi 'initiator-name=iqn.1993-08.org.debian:01:aabbccddeeff' \
   -device 'ide-cd,bus=ide.1,unit=0,id=ide2' \
   -device 'lsi,id=scsihw0,bus=pci.0,addr=0x5' \
-  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/var/lib/vz/vms/8006/vol-vm-8006-disk-0.qcow2","node-name":"e6bf62e20f6c14a2c19bd6f1f5ac36c","read-only":false},"node-name":"f6bf62e20f6c14a2c19bd6f1f5ac36c","read-only":false},"node-name":"drive-scsi4","read-only":false,"throttle-group":"throttle-drive-scsi4"}' \
+  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/var/lib/vz/vms/8006/vol-vm-8006-disk-0.qcow2","node-name":"e7c30de04435d4f4b502bf93100701c","read-only":false},"node-name":"f7c30de04435d4f4b502bf93100701c","read-only":false},"node-name":"drive-scsi4","read-only":false,"throttle-group":"throttle-drive-scsi4"}' \
   -device 'scsi-hd,bus=scsihw0.0,scsi-id=4,drive=drive-scsi4,id=scsi4,device_id=drive-scsi4,write-cache=on' \
-  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/var/lib/vz/vms/8006/vol-vm-8006-disk-0.qcow2","node-name":"edd19f6c1b3a6d5a6248c3376a91a16","read-only":false},"node-name":"fdd19f6c1b3a6d5a6248c3376a91a16","read-only":false},"node-name":"drive-virtio0","read-only":false,"throttle-group":"throttle-drive-virtio0"}' \
+  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/var/lib/vz/vms/8006/vol-vm-8006-disk-0.qcow2","node-name":"ee6988c85939a5b45caf39810880e8d","read-only":false},"node-name":"fe6988c85939a5b45caf39810880e8d","read-only":false},"node-name":"drive-virtio0","read-only":false,"throttle-group":"throttle-drive-virtio0"}' \
   -device 'virtio-blk-pci,drive=drive-virtio0,id=virtio0,bus=pci.0,addr=0xa,iothread=iothread-virtio0,write-cache=on' \
-  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/var/lib/vz/vms/8006/vol-vm-8006-disk-0.qcow2","node-name":"eeb683fb9c516c1a8707c917f0d7a38","read-only":false},"node-name":"feb683fb9c516c1a8707c917f0d7a38","read-only":false},"node-name":"drive-virtio1","read-only":false,"throttle-group":"throttle-drive-virtio1"}' \
+  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/var/lib/vz/vms/8006/vol-vm-8006-disk-0.qcow2","node-name":"e8c62d4877fe0fe771c65f9b77d3af7","read-only":false},"node-name":"f8c62d4877fe0fe771c65f9b77d3af7","read-only":false},"node-name":"drive-virtio1","read-only":false,"throttle-group":"throttle-drive-virtio1"}' \
   -device 'virtio-blk-pci,drive=drive-virtio1,id=virtio1,bus=pci.0,addr=0xb,iothread=iothread-virtio1,write-cache=on' \
   -netdev 'type=tap,id=net0,ifname=tap8006i0,script=/usr/libexec/qemu-server/pve-bridge,downscript=/usr/libexec/qemu-server/pve-bridgedown,vhost=on' \
   -device 'virtio-net-pci,mac=A2:C0:43:77:08:A0,netdev=net0,bus=pci.0,addr=0x12,id=net0,rx_queue_size=1024,tx_queue_size=256' \
diff --git a/src/test/cfg2cmd/bootorder-legacy.conf.cmd b/src/test/cfg2cmd/bootorder-legacy.conf.cmd
index 85b2ec50..e45d0c35 100644
--- a/src/test/cfg2cmd/bootorder-legacy.conf.cmd
+++ b/src/test/cfg2cmd/bootorder-legacy.conf.cmd
@@ -32,11 +32,11 @@
   -iscsi 'initiator-name=iqn.1993-08.org.debian:01:aabbccddeeff' \
   -device 'ide-cd,bus=ide.1,unit=0,id=ide2,bootindex=200' \
   -device 'lsi,id=scsihw0,bus=pci.0,addr=0x5' \
-  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/var/lib/vz/vms/8006/vol-vm-8006-disk-0.qcow2","node-name":"e6bf62e20f6c14a2c19bd6f1f5ac36c","read-only":false},"node-name":"f6bf62e20f6c14a2c19bd6f1f5ac36c","read-only":false},"node-name":"drive-scsi4","read-only":false,"throttle-group":"throttle-drive-scsi4"}' \
+  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/var/lib/vz/vms/8006/vol-vm-8006-disk-0.qcow2","node-name":"e7c30de04435d4f4b502bf93100701c","read-only":false},"node-name":"f7c30de04435d4f4b502bf93100701c","read-only":false},"node-name":"drive-scsi4","read-only":false,"throttle-group":"throttle-drive-scsi4"}' \
   -device 'scsi-hd,bus=scsihw0.0,scsi-id=4,drive=drive-scsi4,id=scsi4,device_id=drive-scsi4,write-cache=on' \
-  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/var/lib/vz/vms/8006/vol-vm-8006-disk-0.qcow2","node-name":"edd19f6c1b3a6d5a6248c3376a91a16","read-only":false},"node-name":"fdd19f6c1b3a6d5a6248c3376a91a16","read-only":false},"node-name":"drive-virtio0","read-only":false,"throttle-group":"throttle-drive-virtio0"}' \
+  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/var/lib/vz/vms/8006/vol-vm-8006-disk-0.qcow2","node-name":"ee6988c85939a5b45caf39810880e8d","read-only":false},"node-name":"fe6988c85939a5b45caf39810880e8d","read-only":false},"node-name":"drive-virtio0","read-only":false,"throttle-group":"throttle-drive-virtio0"}' \
   -device 'virtio-blk-pci,drive=drive-virtio0,id=virtio0,bus=pci.0,addr=0xa,iothread=iothread-virtio0,write-cache=on' \
-  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/var/lib/vz/vms/8006/vol-vm-8006-disk-0.qcow2","node-name":"eeb683fb9c516c1a8707c917f0d7a38","read-only":false},"node-name":"feb683fb9c516c1a8707c917f0d7a38","read-only":false},"node-name":"drive-virtio1","read-only":false,"throttle-group":"throttle-drive-virtio1"}' \
+  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/var/lib/vz/vms/8006/vol-vm-8006-disk-0.qcow2","node-name":"e8c62d4877fe0fe771c65f9b77d3af7","read-only":false},"node-name":"f8c62d4877fe0fe771c65f9b77d3af7","read-only":false},"node-name":"drive-virtio1","read-only":false,"throttle-group":"throttle-drive-virtio1"}' \
   -device 'virtio-blk-pci,drive=drive-virtio1,id=virtio1,bus=pci.0,addr=0xb,iothread=iothread-virtio1,bootindex=302,write-cache=on' \
   -netdev 'type=tap,id=net0,ifname=tap8006i0,script=/usr/libexec/qemu-server/pve-bridge,downscript=/usr/libexec/qemu-server/pve-bridgedown,vhost=on' \
   -device 'virtio-net-pci,mac=A2:C0:43:77:08:A0,netdev=net0,bus=pci.0,addr=0x12,id=net0,rx_queue_size=1024,tx_queue_size=256,bootindex=100' \
diff --git a/src/test/cfg2cmd/bootorder.conf.cmd b/src/test/cfg2cmd/bootorder.conf.cmd
index 78e6c51b..3411bc22 100644
--- a/src/test/cfg2cmd/bootorder.conf.cmd
+++ b/src/test/cfg2cmd/bootorder.conf.cmd
@@ -32,11 +32,11 @@
   -iscsi 'initiator-name=iqn.1993-08.org.debian:01:aabbccddeeff' \
   -device 'ide-cd,bus=ide.1,unit=0,id=ide2,bootindex=103' \
   -device 'lsi,id=scsihw0,bus=pci.0,addr=0x5' \
-  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/var/lib/vz/vms/8006/vol-vm-8006-disk-0.qcow2","node-name":"e6bf62e20f6c14a2c19bd6f1f5ac36c","read-only":false},"node-name":"f6bf62e20f6c14a2c19bd6f1f5ac36c","read-only":false},"node-name":"drive-scsi4","read-only":false,"throttle-group":"throttle-drive-scsi4"}' \
+  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/var/lib/vz/vms/8006/vol-vm-8006-disk-0.qcow2","node-name":"e7c30de04435d4f4b502bf93100701c","read-only":false},"node-name":"f7c30de04435d4f4b502bf93100701c","read-only":false},"node-name":"drive-scsi4","read-only":false,"throttle-group":"throttle-drive-scsi4"}' \
   -device 'scsi-hd,bus=scsihw0.0,scsi-id=4,drive=drive-scsi4,id=scsi4,device_id=drive-scsi4,bootindex=102,write-cache=on' \
-  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/var/lib/vz/vms/8006/vol-vm-8006-disk-0.qcow2","node-name":"edd19f6c1b3a6d5a6248c3376a91a16","read-only":false},"node-name":"fdd19f6c1b3a6d5a6248c3376a91a16","read-only":false},"node-name":"drive-virtio0","read-only":false,"throttle-group":"throttle-drive-virtio0"}' \
+  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/var/lib/vz/vms/8006/vol-vm-8006-disk-0.qcow2","node-name":"ee6988c85939a5b45caf39810880e8d","read-only":false},"node-name":"fe6988c85939a5b45caf39810880e8d","read-only":false},"node-name":"drive-virtio0","read-only":false,"throttle-group":"throttle-drive-virtio0"}' \
   -device 'virtio-blk-pci,drive=drive-virtio0,id=virtio0,bus=pci.0,addr=0xa,iothread=iothread-virtio0,write-cache=on' \
-  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/var/lib/vz/vms/8006/vol-vm-8006-disk-0.qcow2","node-name":"eeb683fb9c516c1a8707c917f0d7a38","read-only":false},"node-name":"feb683fb9c516c1a8707c917f0d7a38","read-only":false},"node-name":"drive-virtio1","read-only":false,"throttle-group":"throttle-drive-virtio1"}' \
+  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/var/lib/vz/vms/8006/vol-vm-8006-disk-0.qcow2","node-name":"e8c62d4877fe0fe771c65f9b77d3af7","read-only":false},"node-name":"f8c62d4877fe0fe771c65f9b77d3af7","read-only":false},"node-name":"drive-virtio1","read-only":false,"throttle-group":"throttle-drive-virtio1"}' \
   -device 'virtio-blk-pci,drive=drive-virtio1,id=virtio1,bus=pci.0,addr=0xb,iothread=iothread-virtio1,bootindex=100,write-cache=on' \
   -netdev 'type=tap,id=net0,ifname=tap8006i0,script=/usr/libexec/qemu-server/pve-bridge,downscript=/usr/libexec/qemu-server/pve-bridgedown,vhost=on' \
   -device 'virtio-net-pci,mac=A2:C0:43:77:08:A0,netdev=net0,bus=pci.0,addr=0x12,id=net0,rx_queue_size=1024,tx_queue_size=256,bootindex=101' \
diff --git a/src/test/cfg2cmd/efi-raw.conf.cmd b/src/test/cfg2cmd/efi-raw.conf.cmd
index 74841d17..2380d1ce 100644
--- a/src/test/cfg2cmd/efi-raw.conf.cmd
+++ b/src/test/cfg2cmd/efi-raw.conf.cmd
@@ -11,7 +11,7 @@
   -smbios 'type=1,uuid=7b10d7af-b932-4c66-b2c3-3996152ec465' \
   -object '{"id":"throttle-drive-efidisk0","limits":{},"qom-type":"throttle-group"}' \
   -blockdev '{"driver":"raw","file":{"driver":"file","filename":"/usr/share/pve-edk2-firmware//OVMF_CODE.fd"},"node-name":"pflash0","read-only":true}' \
-  -blockdev '{"detect-zeroes":"on","discard":"ignore","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"raw","file":{"aio":"io_uring","cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"file","filename":"/var/lib/vz/vms/100/vol-vm-100-disk-0.raw","node-name":"e1175f2a490414e7c53337589fde17a","read-only":false},"node-name":"f1175f2a490414e7c53337589fde17a","read-only":false,"size":131072},"node-name":"drive-efidisk0","read-only":false,"throttle-group":"throttle-drive-efidisk0"}' \
+  -blockdev '{"detect-zeroes":"on","discard":"ignore","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"raw","file":{"aio":"io_uring","cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"file","filename":"/var/lib/vz/vms/100/vol-vm-100-disk-0.raw","node-name":"e4a0922848e962048ec73b544fbbe4f","read-only":false},"node-name":"f4a0922848e962048ec73b544fbbe4f","read-only":false,"size":131072},"node-name":"drive-efidisk0","read-only":false,"throttle-group":"throttle-drive-efidisk0"}' \
   -smp '1,sockets=1,cores=1,maxcpus=1' \
   -nodefaults \
   -boot 'menu=on,strict=on,reboot-timeout=1000,splash=/usr/share/qemu-server/bootsplash.jpg' \
diff --git a/src/test/cfg2cmd/efi-secboot-and-tpm-q35.conf.cmd b/src/test/cfg2cmd/efi-secboot-and-tpm-q35.conf.cmd
index 905fd1b6..e36a207f 100644
--- a/src/test/cfg2cmd/efi-secboot-and-tpm-q35.conf.cmd
+++ b/src/test/cfg2cmd/efi-secboot-and-tpm-q35.conf.cmd
@@ -11,7 +11,7 @@
   -smbios 'type=1,uuid=7b10d7af-b932-4c66-b2c3-3996152ec465' \
   -object '{"id":"throttle-drive-efidisk0","limits":{},"qom-type":"throttle-group"}' \
   -blockdev '{"driver":"raw","file":{"driver":"file","filename":"/usr/share/pve-edk2-firmware//OVMF_CODE_4M.secboot.fd"},"node-name":"pflash0","read-only":true}' \
-  -blockdev '{"detect-zeroes":"on","discard":"ignore","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"raw","file":{"aio":"io_uring","cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"file","filename":"/var/lib/vz/vms/100/vol-vm-100-disk-0.raw","node-name":"e1175f2a490414e7c53337589fde17a","read-only":false},"node-name":"f1175f2a490414e7c53337589fde17a","read-only":false,"size":540672},"node-name":"drive-efidisk0","read-only":false,"throttle-group":"throttle-drive-efidisk0"}' \
+  -blockdev '{"detect-zeroes":"on","discard":"ignore","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"raw","file":{"aio":"io_uring","cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"file","filename":"/var/lib/vz/vms/100/vol-vm-100-disk-0.raw","node-name":"e4a0922848e962048ec73b544fbbe4f","read-only":false},"node-name":"f4a0922848e962048ec73b544fbbe4f","read-only":false,"size":540672},"node-name":"drive-efidisk0","read-only":false,"throttle-group":"throttle-drive-efidisk0"}' \
   -smp '1,sockets=1,cores=1,maxcpus=1' \
   -nodefaults \
   -boot 'menu=on,strict=on,reboot-timeout=1000,splash=/usr/share/qemu-server/bootsplash.jpg' \
diff --git a/src/test/cfg2cmd/efi-secboot-and-tpm.conf.cmd b/src/test/cfg2cmd/efi-secboot-and-tpm.conf.cmd
index 96d9c285..296f1c0f 100644
--- a/src/test/cfg2cmd/efi-secboot-and-tpm.conf.cmd
+++ b/src/test/cfg2cmd/efi-secboot-and-tpm.conf.cmd
@@ -11,7 +11,7 @@
   -smbios 'type=1,uuid=7b10d7af-b932-4c66-b2c3-3996152ec465' \
   -object '{"id":"throttle-drive-efidisk0","limits":{},"qom-type":"throttle-group"}' \
   -blockdev '{"driver":"raw","file":{"driver":"file","filename":"/usr/share/pve-edk2-firmware//OVMF_CODE_4M.fd"},"node-name":"pflash0","read-only":true}' \
-  -blockdev '{"detect-zeroes":"on","discard":"ignore","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"raw","file":{"aio":"io_uring","cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"file","filename":"/var/lib/vz/vms/100/vol-vm-100-disk-0.raw","node-name":"e1175f2a490414e7c53337589fde17a","read-only":false},"node-name":"f1175f2a490414e7c53337589fde17a","read-only":false,"size":540672},"node-name":"drive-efidisk0","read-only":false,"throttle-group":"throttle-drive-efidisk0"}' \
+  -blockdev '{"detect-zeroes":"on","discard":"ignore","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"raw","file":{"aio":"io_uring","cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"file","filename":"/var/lib/vz/vms/100/vol-vm-100-disk-0.raw","node-name":"e4a0922848e962048ec73b544fbbe4f","read-only":false},"node-name":"f4a0922848e962048ec73b544fbbe4f","read-only":false,"size":540672},"node-name":"drive-efidisk0","read-only":false,"throttle-group":"throttle-drive-efidisk0"}' \
   -smp '1,sockets=1,cores=1,maxcpus=1' \
   -nodefaults \
   -boot 'menu=on,strict=on,reboot-timeout=1000,splash=/usr/share/qemu-server/bootsplash.jpg' \
diff --git a/src/test/cfg2cmd/efidisk-on-rbd.conf.cmd b/src/test/cfg2cmd/efidisk-on-rbd.conf.cmd
index dcab512c..3b8a2aa1 100644
--- a/src/test/cfg2cmd/efidisk-on-rbd.conf.cmd
+++ b/src/test/cfg2cmd/efidisk-on-rbd.conf.cmd
@@ -11,7 +11,7 @@
   -smbios 'type=1,uuid=3dd750ce-d910-44d0-9493-525c0be4e688' \
   -object '{"id":"throttle-drive-efidisk0","limits":{},"qom-type":"throttle-group"}' \
   -blockdev '{"driver":"raw","file":{"driver":"file","filename":"/usr/share/pve-edk2-firmware//OVMF_CODE.fd"},"node-name":"pflash0","read-only":true}' \
-  -blockdev '{"detect-zeroes":"on","discard":"ignore","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"raw","file":{"auth-client-required":["none"],"cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"rbd","image":"vol-vm-100-disk-1","node-name":"eeb8f022b5551ad1d795611f112c767","pool":"cpool","read-only":false,"server":[{"host":"127.0.0.42","port":"3300"},{"host":"127.0.0.21","port":"3300"},{"host":"::1","port":"3300"}]},"node-name":"feb8f022b5551ad1d795611f112c767","read-only":false,"size":131072},"node-name":"drive-efidisk0","read-only":false,"throttle-group":"throttle-drive-efidisk0"}' \
+  -blockdev '{"detect-zeroes":"on","discard":"ignore","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"raw","file":{"auth-client-required":["none"],"cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"rbd","image":"vol-vm-100-disk-1","node-name":"e7a7c30106b1db777b990dc81efeebf","pool":"cpool","read-only":false,"server":[{"host":"127.0.0.42","port":"3300"},{"host":"127.0.0.21","port":"3300"},{"host":"::1","port":"3300"}]},"node-name":"f7a7c30106b1db777b990dc81efeebf","read-only":false,"size":131072},"node-name":"drive-efidisk0","read-only":false,"throttle-group":"throttle-drive-efidisk0"}' \
   -smp '1,sockets=1,cores=1,maxcpus=1' \
   -nodefaults \
   -boot 'menu=on,strict=on,reboot-timeout=1000,splash=/usr/share/qemu-server/bootsplash.jpg' \
diff --git a/src/test/cfg2cmd/ide.conf.cmd b/src/test/cfg2cmd/ide.conf.cmd
index 73dfdfab..2a1f0904 100644
--- a/src/test/cfg2cmd/ide.conf.cmd
+++ b/src/test/cfg2cmd/ide.conf.cmd
@@ -39,7 +39,7 @@
   -blockdev '{"driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"driver":"raw","file":{"aio":"threads","cache":{"direct":false,"no-flush":false},"driver":"file","filename":"/mnt/pve/cifs-store/template/iso/three.iso","node-name":"e35557bae4bcbf9edc9f7ff7f132f30","read-only":true},"node-name":"f35557bae4bcbf9edc9f7ff7f132f30","read-only":true},"node-name":"drive-ide3","read-only":true,"throttle-group":"throttle-drive-ide3"}' \
   -device 'ide-cd,bus=ide.1,unit=1,drive=drive-ide3,id=ide3,bootindex=203' \
   -device 'virtio-scsi-pci,id=scsihw0,bus=pci.0,addr=0x5' \
-  -blockdev '{"detect-zeroes":"on","discard":"ignore","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"file","filename":"/var/lib/vz/vms/100/vol-vm-100-disk-2.qcow2","node-name":"ec11e0572184321efc5835152b95d5d","read-only":false},"node-name":"fc11e0572184321efc5835152b95d5d","read-only":false},"node-name":"drive-scsi0","read-only":false,"throttle-group":"throttle-drive-scsi0"}' \
+  -blockdev '{"detect-zeroes":"on","discard":"ignore","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"file","filename":"/var/lib/vz/vms/100/vol-vm-100-disk-2.qcow2","node-name":"ef0b7212c0efeee3f63fe3322c0c230","read-only":false},"node-name":"ff0b7212c0efeee3f63fe3322c0c230","read-only":false},"node-name":"drive-scsi0","read-only":false,"throttle-group":"throttle-drive-scsi0"}' \
   -device 'scsi-hd,bus=scsihw0.0,channel=0,scsi-id=0,lun=0,drive=drive-scsi0,id=scsi0,device_id=drive-scsi0,bootindex=100,write-cache=on' \
   -netdev 'type=tap,id=net0,ifname=tap8006i0,script=/usr/libexec/qemu-server/pve-bridge,downscript=/usr/libexec/qemu-server/pve-bridgedown,vhost=on' \
   -device 'virtio-net-pci,mac=2E:01:68:F9:9C:87,netdev=net0,bus=pci.0,addr=0x12,id=net0,rx_queue_size=1024,tx_queue_size=256,bootindex=300' \
diff --git a/src/test/cfg2cmd/q35-ide.conf.cmd b/src/test/cfg2cmd/q35-ide.conf.cmd
index 0a5ffd0e..06c92b0d 100644
--- a/src/test/cfg2cmd/q35-ide.conf.cmd
+++ b/src/test/cfg2cmd/q35-ide.conf.cmd
@@ -38,7 +38,7 @@
   -blockdev '{"driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"driver":"raw","file":{"aio":"threads","cache":{"direct":false,"no-flush":false},"driver":"file","filename":"/mnt/pve/cifs-store/template/iso/three.iso","node-name":"e35557bae4bcbf9edc9f7ff7f132f30","read-only":true},"node-name":"f35557bae4bcbf9edc9f7ff7f132f30","read-only":true},"node-name":"drive-ide3","read-only":true,"throttle-group":"throttle-drive-ide3"}' \
   -device 'ide-cd,bus=ide.3,unit=0,drive=drive-ide3,id=ide3,bootindex=203' \
   -device 'virtio-scsi-pci,id=scsihw0,bus=pci.0,addr=0x5' \
-  -blockdev '{"detect-zeroes":"on","discard":"ignore","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"file","filename":"/var/lib/vz/vms/100/vol-vm-100-disk-2.qcow2","node-name":"ec11e0572184321efc5835152b95d5d","read-only":false},"node-name":"fc11e0572184321efc5835152b95d5d","read-only":false},"node-name":"drive-scsi0","read-only":false,"throttle-group":"throttle-drive-scsi0"}' \
+  -blockdev '{"detect-zeroes":"on","discard":"ignore","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"file","filename":"/var/lib/vz/vms/100/vol-vm-100-disk-2.qcow2","node-name":"ef0b7212c0efeee3f63fe3322c0c230","read-only":false},"node-name":"ff0b7212c0efeee3f63fe3322c0c230","read-only":false},"node-name":"drive-scsi0","read-only":false,"throttle-group":"throttle-drive-scsi0"}' \
   -device 'scsi-hd,bus=scsihw0.0,channel=0,scsi-id=0,lun=0,drive=drive-scsi0,id=scsi0,device_id=drive-scsi0,bootindex=100,write-cache=on' \
   -netdev 'type=tap,id=net0,ifname=tap8006i0,script=/usr/libexec/qemu-server/pve-bridge,downscript=/usr/libexec/qemu-server/pve-bridgedown,vhost=on' \
   -device 'virtio-net-pci,mac=2E:01:68:F9:9C:87,netdev=net0,bus=pci.0,addr=0x12,id=net0,rx_queue_size=1024,tx_queue_size=256,bootindex=300' \
diff --git a/src/test/cfg2cmd/q35-linux-hostpci-mapping.conf.cmd b/src/test/cfg2cmd/q35-linux-hostpci-mapping.conf.cmd
index 2c3e4539..de29d8ba 100644
--- a/src/test/cfg2cmd/q35-linux-hostpci-mapping.conf.cmd
+++ b/src/test/cfg2cmd/q35-linux-hostpci-mapping.conf.cmd
@@ -11,7 +11,7 @@
   -smbios 'type=1,uuid=3dd750ce-d910-44d0-9493-525c0be4e687' \
   -object '{"id":"throttle-drive-efidisk0","limits":{},"qom-type":"throttle-group"}' \
   -blockdev '{"driver":"raw","file":{"driver":"file","filename":"/usr/share/pve-edk2-firmware//OVMF_CODE.fd"},"node-name":"pflash0","read-only":true}' \
-  -blockdev '{"detect-zeroes":"on","discard":"ignore","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"file","filename":"/var/lib/vz/vms/100/vol-vm-100-disk-1.qcow2","node-name":"e70e3017c5a79fdee5a04aa92ac1e9c","read-only":false},"node-name":"f70e3017c5a79fdee5a04aa92ac1e9c","read-only":false},"node-name":"drive-efidisk0","read-only":false,"throttle-group":"throttle-drive-efidisk0"}' \
+  -blockdev '{"detect-zeroes":"on","discard":"ignore","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"file","filename":"/var/lib/vz/vms/100/vol-vm-100-disk-1.qcow2","node-name":"ea87ff7a6d7e671ef7c41cd459cbf7a","read-only":false},"node-name":"fa87ff7a6d7e671ef7c41cd459cbf7a","read-only":false},"node-name":"drive-efidisk0","read-only":false,"throttle-group":"throttle-drive-efidisk0"}' \
   -global 'ICH9-LPC.acpi-pci-hotplug-with-bridge-support=off' \
   -smp '2,sockets=2,cores=1,maxcpus=2' \
   -nodefaults \
diff --git a/src/test/cfg2cmd/q35-linux-hostpci-multifunction.conf.cmd b/src/test/cfg2cmd/q35-linux-hostpci-multifunction.conf.cmd
index 219af1c4..7922102b 100644
--- a/src/test/cfg2cmd/q35-linux-hostpci-multifunction.conf.cmd
+++ b/src/test/cfg2cmd/q35-linux-hostpci-multifunction.conf.cmd
@@ -11,7 +11,7 @@
   -smbios 'type=1,uuid=3dd750ce-d910-44d0-9493-525c0be4e687' \
   -object '{"id":"throttle-drive-efidisk0","limits":{},"qom-type":"throttle-group"}' \
   -blockdev '{"driver":"raw","file":{"driver":"file","filename":"/usr/share/pve-edk2-firmware//OVMF_CODE.fd"},"node-name":"pflash0","read-only":true}' \
-  -blockdev '{"detect-zeroes":"on","discard":"ignore","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"file","filename":"/var/lib/vz/vms/100/vol-vm-100-disk-1.qcow2","node-name":"e70e3017c5a79fdee5a04aa92ac1e9c","read-only":false},"node-name":"f70e3017c5a79fdee5a04aa92ac1e9c","read-only":false},"node-name":"drive-efidisk0","read-only":false,"throttle-group":"throttle-drive-efidisk0"}' \
+  -blockdev '{"detect-zeroes":"on","discard":"ignore","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"file","filename":"/var/lib/vz/vms/100/vol-vm-100-disk-1.qcow2","node-name":"ea87ff7a6d7e671ef7c41cd459cbf7a","read-only":false},"node-name":"fa87ff7a6d7e671ef7c41cd459cbf7a","read-only":false},"node-name":"drive-efidisk0","read-only":false,"throttle-group":"throttle-drive-efidisk0"}' \
   -global 'ICH9-LPC.acpi-pci-hotplug-with-bridge-support=off' \
   -smp '2,sockets=2,cores=1,maxcpus=2' \
   -nodefaults \
diff --git a/src/test/cfg2cmd/q35-linux-hostpci-x-pci-overrides.conf.cmd b/src/test/cfg2cmd/q35-linux-hostpci-x-pci-overrides.conf.cmd
index bfdba6d2..fe432369 100644
--- a/src/test/cfg2cmd/q35-linux-hostpci-x-pci-overrides.conf.cmd
+++ b/src/test/cfg2cmd/q35-linux-hostpci-x-pci-overrides.conf.cmd
@@ -11,7 +11,7 @@
   -smbios 'type=1,uuid=3dd750ce-d910-44d0-9493-525c0be4e687' \
   -object '{"id":"throttle-drive-efidisk0","limits":{},"qom-type":"throttle-group"}' \
   -blockdev '{"driver":"raw","file":{"driver":"file","filename":"/usr/share/pve-edk2-firmware//OVMF_CODE.fd"},"node-name":"pflash0","read-only":true}' \
-  -blockdev '{"detect-zeroes":"on","discard":"ignore","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"file","filename":"/var/lib/vz/vms/100/vol-vm-100-disk-1.qcow2","node-name":"e70e3017c5a79fdee5a04aa92ac1e9c","read-only":false},"node-name":"f70e3017c5a79fdee5a04aa92ac1e9c","read-only":false},"node-name":"drive-efidisk0","read-only":false,"throttle-group":"throttle-drive-efidisk0"}' \
+  -blockdev '{"detect-zeroes":"on","discard":"ignore","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"file","filename":"/var/lib/vz/vms/100/vol-vm-100-disk-1.qcow2","node-name":"ea87ff7a6d7e671ef7c41cd459cbf7a","read-only":false},"node-name":"fa87ff7a6d7e671ef7c41cd459cbf7a","read-only":false},"node-name":"drive-efidisk0","read-only":false,"throttle-group":"throttle-drive-efidisk0"}' \
   -global 'ICH9-LPC.acpi-pci-hotplug-with-bridge-support=off' \
   -smp '2,sockets=2,cores=1,maxcpus=2' \
   -nodefaults \
diff --git a/src/test/cfg2cmd/q35-linux-hostpci.conf.cmd b/src/test/cfg2cmd/q35-linux-hostpci.conf.cmd
index b6edad85..dfe30075 100644
--- a/src/test/cfg2cmd/q35-linux-hostpci.conf.cmd
+++ b/src/test/cfg2cmd/q35-linux-hostpci.conf.cmd
@@ -11,7 +11,7 @@
   -smbios 'type=1,uuid=3dd750ce-d910-44d0-9493-525c0be4e687' \
   -object '{"id":"throttle-drive-efidisk0","limits":{},"qom-type":"throttle-group"}' \
   -blockdev '{"driver":"raw","file":{"driver":"file","filename":"/usr/share/pve-edk2-firmware//OVMF_CODE.fd"},"node-name":"pflash0","read-only":true}' \
-  -blockdev '{"detect-zeroes":"on","discard":"ignore","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"file","filename":"/var/lib/vz/vms/100/vol-vm-100-disk-1.qcow2","node-name":"e70e3017c5a79fdee5a04aa92ac1e9c","read-only":false},"node-name":"f70e3017c5a79fdee5a04aa92ac1e9c","read-only":false},"node-name":"drive-efidisk0","read-only":false,"throttle-group":"throttle-drive-efidisk0"}' \
+  -blockdev '{"detect-zeroes":"on","discard":"ignore","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"file","filename":"/var/lib/vz/vms/100/vol-vm-100-disk-1.qcow2","node-name":"ea87ff7a6d7e671ef7c41cd459cbf7a","read-only":false},"node-name":"fa87ff7a6d7e671ef7c41cd459cbf7a","read-only":false},"node-name":"drive-efidisk0","read-only":false,"throttle-group":"throttle-drive-efidisk0"}' \
   -global 'ICH9-LPC.acpi-pci-hotplug-with-bridge-support=off' \
   -smp '2,sockets=2,cores=1,maxcpus=2' \
   -nodefaults \
diff --git a/src/test/cfg2cmd/q35-simple.conf.cmd b/src/test/cfg2cmd/q35-simple.conf.cmd
index deed9c2d..20690d1b 100644
--- a/src/test/cfg2cmd/q35-simple.conf.cmd
+++ b/src/test/cfg2cmd/q35-simple.conf.cmd
@@ -11,7 +11,7 @@
   -smbios 'type=1,uuid=3dd750ce-d910-44d0-9493-525c0be4e687' \
   -object '{"id":"throttle-drive-efidisk0","limits":{},"qom-type":"throttle-group"}' \
   -blockdev '{"driver":"raw","file":{"driver":"file","filename":"/usr/share/pve-edk2-firmware//OVMF_CODE.fd"},"node-name":"pflash0","read-only":true}' \
-  -blockdev '{"detect-zeroes":"on","discard":"ignore","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"file","filename":"/var/lib/vz/vms/100/vol-vm-100-disk-1.qcow2","node-name":"e70e3017c5a79fdee5a04aa92ac1e9c","read-only":false},"node-name":"f70e3017c5a79fdee5a04aa92ac1e9c","read-only":false},"node-name":"drive-efidisk0","read-only":false,"throttle-group":"throttle-drive-efidisk0"}' \
+  -blockdev '{"detect-zeroes":"on","discard":"ignore","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"file","filename":"/var/lib/vz/vms/100/vol-vm-100-disk-1.qcow2","node-name":"ea87ff7a6d7e671ef7c41cd459cbf7a","read-only":false},"node-name":"fa87ff7a6d7e671ef7c41cd459cbf7a","read-only":false},"node-name":"drive-efidisk0","read-only":false,"throttle-group":"throttle-drive-efidisk0"}' \
   -global 'ICH9-LPC.acpi-pci-hotplug-with-bridge-support=off' \
   -smp '2,sockets=1,cores=2,maxcpus=2' \
   -nodefaults \
diff --git a/src/test/cfg2cmd/seabios_serial.conf.cmd b/src/test/cfg2cmd/seabios_serial.conf.cmd
index b401d58b..ae49aca4 100644
--- a/src/test/cfg2cmd/seabios_serial.conf.cmd
+++ b/src/test/cfg2cmd/seabios_serial.conf.cmd
@@ -28,7 +28,7 @@
   -iscsi 'initiator-name=iqn.1993-08.org.debian:01:aabbccddeeff' \
   -device 'ide-cd,bus=ide.1,unit=0,id=ide2,bootindex=200' \
   -device 'virtio-scsi-pci,id=scsihw0,bus=pci.0,addr=0x5' \
-  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/var/lib/vz/vms/8006/vol-vm-8006-disk-0.qcow2","node-name":"ecd04be4259153b8293415fefa2a84c","read-only":false},"node-name":"fcd04be4259153b8293415fefa2a84c","read-only":false},"node-name":"drive-scsi0","read-only":false,"throttle-group":"throttle-drive-scsi0"}' \
+  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/var/lib/vz/vms/8006/vol-vm-8006-disk-0.qcow2","node-name":"ed3a7e1debf641484f3aa78b2657af1","read-only":false},"node-name":"fd3a7e1debf641484f3aa78b2657af1","read-only":false},"node-name":"drive-scsi0","read-only":false,"throttle-group":"throttle-drive-scsi0"}' \
   -device 'scsi-hd,bus=scsihw0.0,channel=0,scsi-id=0,lun=0,drive=drive-scsi0,id=scsi0,device_id=drive-scsi0,bootindex=100,write-cache=on' \
   -netdev 'type=tap,id=net0,ifname=tap8006i0,script=/usr/libexec/qemu-server/pve-bridge,downscript=/usr/libexec/qemu-server/pve-bridgedown,vhost=on' \
   -device 'virtio-net-pci,mac=A2:C0:43:77:08:A0,netdev=net0,bus=pci.0,addr=0x12,id=net0,rx_queue_size=1024,tx_queue_size=256,bootindex=300' \
diff --git a/src/test/cfg2cmd/sev-es.conf.cmd b/src/test/cfg2cmd/sev-es.conf.cmd
index d8b9394e..68000a3f 100644
--- a/src/test/cfg2cmd/sev-es.conf.cmd
+++ b/src/test/cfg2cmd/sev-es.conf.cmd
@@ -11,7 +11,7 @@
   -smbios 'type=1,uuid=7b10d7af-b932-4c66-b2c3-3996152ec465' \
   -object '{"id":"throttle-drive-efidisk0","limits":{},"qom-type":"throttle-group"}' \
   -blockdev '{"driver":"raw","file":{"driver":"file","filename":"/usr/share/pve-edk2-firmware//OVMF_CVM_CODE_4M.fd"},"node-name":"pflash0","read-only":true}' \
-  -blockdev '{"detect-zeroes":"on","discard":"ignore","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"raw","file":{"aio":"io_uring","cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"file","filename":"/var/lib/vz/vms/100/vol-vm-100-disk-0.raw","node-name":"e1175f2a490414e7c53337589fde17a","read-only":false},"node-name":"f1175f2a490414e7c53337589fde17a","read-only":false,"size":540672},"node-name":"drive-efidisk0","read-only":false,"throttle-group":"throttle-drive-efidisk0"}' \
+  -blockdev '{"detect-zeroes":"on","discard":"ignore","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"raw","file":{"aio":"io_uring","cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"file","filename":"/var/lib/vz/vms/100/vol-vm-100-disk-0.raw","node-name":"e4a0922848e962048ec73b544fbbe4f","read-only":false},"node-name":"f4a0922848e962048ec73b544fbbe4f","read-only":false,"size":540672},"node-name":"drive-efidisk0","read-only":false,"throttle-group":"throttle-drive-efidisk0"}' \
   -smp '1,sockets=1,cores=1,maxcpus=1' \
   -nodefaults \
   -boot 'menu=on,strict=on,reboot-timeout=1000,splash=/usr/share/qemu-server/bootsplash.jpg' \
diff --git a/src/test/cfg2cmd/sev-std.conf.cmd b/src/test/cfg2cmd/sev-std.conf.cmd
index 177edae4..06ec97c0 100644
--- a/src/test/cfg2cmd/sev-std.conf.cmd
+++ b/src/test/cfg2cmd/sev-std.conf.cmd
@@ -11,7 +11,7 @@
   -smbios 'type=1,uuid=7b10d7af-b932-4c66-b2c3-3996152ec465' \
   -object '{"id":"throttle-drive-efidisk0","limits":{},"qom-type":"throttle-group"}' \
   -blockdev '{"driver":"raw","file":{"driver":"file","filename":"/usr/share/pve-edk2-firmware//OVMF_CVM_CODE_4M.fd"},"node-name":"pflash0","read-only":true}' \
-  -blockdev '{"detect-zeroes":"on","discard":"ignore","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"raw","file":{"aio":"io_uring","cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"file","filename":"/var/lib/vz/vms/100/vol-vm-100-disk-0.raw","node-name":"e1175f2a490414e7c53337589fde17a","read-only":false},"node-name":"f1175f2a490414e7c53337589fde17a","read-only":false,"size":540672},"node-name":"drive-efidisk0","read-only":false,"throttle-group":"throttle-drive-efidisk0"}' \
+  -blockdev '{"detect-zeroes":"on","discard":"ignore","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"raw","file":{"aio":"io_uring","cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"file","filename":"/var/lib/vz/vms/100/vol-vm-100-disk-0.raw","node-name":"e4a0922848e962048ec73b544fbbe4f","read-only":false},"node-name":"f4a0922848e962048ec73b544fbbe4f","read-only":false,"size":540672},"node-name":"drive-efidisk0","read-only":false,"throttle-group":"throttle-drive-efidisk0"}' \
   -smp '1,sockets=1,cores=1,maxcpus=1' \
   -nodefaults \
   -boot 'menu=on,strict=on,reboot-timeout=1000,splash=/usr/share/qemu-server/bootsplash.jpg' \
diff --git a/src/test/cfg2cmd/simple-backingchain.conf.cmd b/src/test/cfg2cmd/simple-backingchain.conf.cmd
index 8ae2ca7a..ee705671 100644
--- a/src/test/cfg2cmd/simple-backingchain.conf.cmd
+++ b/src/test/cfg2cmd/simple-backingchain.conf.cmd
@@ -26,8 +26,8 @@
   -device 'virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3,free-page-reporting=on' \
   -iscsi 'initiator-name=iqn.1993-08.org.debian:01:aabbccddeeff' \
   -device 'lsi,id=scsihw0,bus=pci.0,addr=0x5' \
-  -blockdev '{"detect-zeroes":"on","discard":"ignore","driver":"throttle","file":{"backing":{"backing":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"on","discard":"ignore","discard-no-unref":true,"driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"file","filename":"/var/lib/vzsnapext/images/8006/snap1-vol-vm-8006-disk-0.qcow2","node-name":"ea91a385a49a008a4735c0aec5c6749","read-only":false},"node-name":"fa91a385a49a008a4735c0aec5c6749","read-only":false},"cache":{"direct":true,"no-flush":false},"detect-zeroes":"on","discard":"ignore","discard-no-unref":true,"driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"file","filename":"/var/lib/vzsnapext/images/8006/snap2-vol-vm-8006-disk-0.qcow2","node-name":"ec0289317073959d450248d8cd7a480","read-only":false},"node-name":"fc0289317073959d450248d8cd7a480","read-only":fa
 lse},"cache":{"direct":true,"no-flush":false},"detect-zeroes":"on","discard":"ignore","discard-no-unref":true,"driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"file","filename":"/var/lib/vzsnapext/vms/8006/vol-vm-8006-disk-0.qcow2","node-name":"e74f4959037afb46eddc7313c43dfdd","read-only":false},"node-name":"f74f4959037afb46eddc7313c43dfdd","read-only":false},"node-name":"drive-scsi0","read-only":false,"throttle-group":"throttle-drive-scsi0"}' \
+  -blockdev '{"detect-zeroes":"on","discard":"ignore","driver":"throttle","file":{"backing":{"backing":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"on","discard":"ignore","discard-no-unref":true,"driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"file","filename":"/var/lib/vzsnapext/images/8006/snap1-vol-vm-8006-disk-0.qcow2","node-name":"ef5d7b9eae1d75adb56dcb60e1fdd03","read-only":false},"node-name":"ff5d7b9eae1d75adb56dcb60e1fdd03","read-only":false},"cache":{"direct":true,"no-flush":false},"detect-zeroes":"on","discard":"ignore","discard-no-unref":true,"driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"file","filename":"/var/lib/vzsnapext/images/8006/snap2-vol-vm-8006-disk-0.qcow2","node-name":"eba2bfa1a974d80a6d523e635c69040","read-only":false},"node-name":"fba2bfa1a974d80a6d523e635c69040","read-only":fa
 lse},"cache":{"direct":true,"no-flush":false},"detect-zeroes":"on","discard":"ignore","discard-no-unref":true,"driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"file","filename":"/var/lib/vzsnapext/vms/8006/vol-vm-8006-disk-0.qcow2","node-name":"e5730fb46280035bfff1edc687c77df","read-only":false},"node-name":"f5730fb46280035bfff1edc687c77df","read-only":false},"node-name":"drive-scsi0","read-only":false,"throttle-group":"throttle-drive-scsi0"}' \
   -device 'scsi-hd,bus=scsihw0.0,scsi-id=0,drive=drive-scsi0,id=scsi0,device_id=drive-scsi0,write-cache=on' \
-  -blockdev '{"detect-zeroes":"on","discard":"ignore","driver":"throttle","file":{"backing":{"backing":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"qcow2","file":{"aio":"native","cache":{"direct":true,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"host_device","filename":"/dev/veegee/snap1-vol-vm-8006-disk-0.qcow2","node-name":"e25f58d3e6e11f2065ad41253988915","read-only":false},"node-name":"f25f58d3e6e11f2065ad41253988915","read-only":false},"cache":{"direct":true,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"qcow2","file":{"aio":"native","cache":{"direct":true,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"host_device","filename":"/dev/veegee/snap2-vol-vm-8006-disk-0.qcow2","node-name":"e9415bb5e484c1e25d25063b01686fe","read-only":false},"node-name":"f9415bb5e484c1e25d25063b01686fe","read-only":false},"cache":{"direct":true,"no-flush":false},"detect-zeroes":"on","discard"
 :"ignore","driver":"qcow2","file":{"aio":"native","cache":{"direct":true,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"host_device","filename":"/dev/veegee/vol-vm-8006-disk-0.qcow2","node-name":"e87358a470ca311f94d5cc61d1eb428","read-only":false},"node-name":"f87358a470ca311f94d5cc61d1eb428","read-only":false},"node-name":"drive-scsi1","read-only":false,"throttle-group":"throttle-drive-scsi1"}' \
+  -blockdev '{"detect-zeroes":"on","discard":"ignore","driver":"throttle","file":{"backing":{"backing":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"qcow2","file":{"aio":"native","cache":{"direct":true,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"host_device","filename":"/dev/veegee/snap1-vol-vm-8006-disk-0.qcow2","node-name":"eaefc0da22b04b563abff988620896a","read-only":false},"node-name":"faefc0da22b04b563abff988620896a","read-only":false},"cache":{"direct":true,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"qcow2","file":{"aio":"native","cache":{"direct":true,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"host_device","filename":"/dev/veegee/snap2-vol-vm-8006-disk-0.qcow2","node-name":"e6c940d62d4176f395a90ab9a8d7c8b","read-only":false},"node-name":"f6c940d62d4176f395a90ab9a8d7c8b","read-only":false},"cache":{"direct":true,"no-flush":false},"detect-zeroes":"on","discard"
 :"ignore","driver":"qcow2","file":{"aio":"native","cache":{"direct":true,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"host_device","filename":"/dev/veegee/vol-vm-8006-disk-0.qcow2","node-name":"ebc18802d03c478647b8f0f02ab6531","read-only":false},"node-name":"fbc18802d03c478647b8f0f02ab6531","read-only":false},"node-name":"drive-scsi1","read-only":false,"throttle-group":"throttle-drive-scsi1"}' \
   -device 'scsi-hd,bus=scsihw0.0,scsi-id=1,drive=drive-scsi1,id=scsi1,device_id=drive-scsi1,write-cache=on' \
   -machine 'type=pc+pve0'
diff --git a/src/test/cfg2cmd/simple-btrfs.conf.cmd b/src/test/cfg2cmd/simple-btrfs.conf.cmd
index 12ddeead..d9af7997 100644
--- a/src/test/cfg2cmd/simple-btrfs.conf.cmd
+++ b/src/test/cfg2cmd/simple-btrfs.conf.cmd
@@ -31,13 +31,13 @@
   -iscsi 'initiator-name=iqn.1993-08.org.debian:01:aabbccddeeff' \
   -device 'ide-cd,bus=ide.1,unit=0,id=ide2,bootindex=200' \
   -device 'virtio-scsi-pci,id=scsihw0,bus=pci.0,addr=0x5' \
-  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"io_uring","cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/butter/bread/vms/8006/vol-vm-8006-disk-0/disk.raw","node-name":"e99aff0ff797aa030a22e9f580076dd","read-only":false},"node-name":"f99aff0ff797aa030a22e9f580076dd","read-only":false},"node-name":"drive-scsi0","read-only":false,"throttle-group":"throttle-drive-scsi0"}' \
+  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"io_uring","cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/butter/bread/vms/8006/vol-vm-8006-disk-0/disk.raw","node-name":"e0239e32a6bc9e59ed24fd6b0454b45","read-only":false},"node-name":"f0239e32a6bc9e59ed24fd6b0454b45","read-only":false},"node-name":"drive-scsi0","read-only":false,"throttle-group":"throttle-drive-scsi0"}' \
   -device 'scsi-hd,bus=scsihw0.0,channel=0,scsi-id=0,lun=0,drive=drive-scsi0,id=scsi0,device_id=drive-scsi0,bootindex=100,write-cache=on' \
-  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"io_uring","cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/butter/bread/vms/8006/vol-vm-8006-disk-0/disk.raw","node-name":"e7b2fd2a8c5dbfc550d9781e5df8841","read-only":false},"node-name":"f7b2fd2a8c5dbfc550d9781e5df8841","read-only":false},"node-name":"drive-scsi1","read-only":false,"throttle-group":"throttle-drive-scsi1"}' \
+  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"io_uring","cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/butter/bread/vms/8006/vol-vm-8006-disk-0/disk.raw","node-name":"e0cb0b8632271512e5c7d94bb914ba9","read-only":false},"node-name":"f0cb0b8632271512e5c7d94bb914ba9","read-only":false},"node-name":"drive-scsi1","read-only":false,"throttle-group":"throttle-drive-scsi1"}' \
   -device 'scsi-hd,bus=scsihw0.0,channel=0,scsi-id=0,lun=1,drive=drive-scsi1,id=scsi1,device_id=drive-scsi1,write-cache=on' \
-  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"io_uring","cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/butter/bread/vms/8006/vol-vm-8006-disk-0/disk.raw","node-name":"ed78b07bb04c2cbd8aedc648e885569","read-only":false},"node-name":"fd78b07bb04c2cbd8aedc648e885569","read-only":false},"node-name":"drive-scsi2","read-only":false,"throttle-group":"throttle-drive-scsi2"}' \
+  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"io_uring","cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/butter/bread/vms/8006/vol-vm-8006-disk-0/disk.raw","node-name":"eaee3317bd37f841a34c0bfe79621f1","read-only":false},"node-name":"faee3317bd37f841a34c0bfe79621f1","read-only":false},"node-name":"drive-scsi2","read-only":false,"throttle-group":"throttle-drive-scsi2"}' \
   -device 'scsi-hd,bus=scsihw0.0,channel=0,scsi-id=0,lun=2,drive=drive-scsi2,id=scsi2,device_id=drive-scsi2,write-cache=off' \
-  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/butter/bread/vms/8006/vol-vm-8006-disk-0/disk.raw","node-name":"e7487c01d831e2b51a5446980170ec9","read-only":false},"node-name":"f7487c01d831e2b51a5446980170ec9","read-only":false},"node-name":"drive-scsi3","read-only":false,"throttle-group":"throttle-drive-scsi3"}' \
+  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/butter/bread/vms/8006/vol-vm-8006-disk-0/disk.raw","node-name":"e155197021a082240ff5de14d4c2c9a","read-only":false},"node-name":"f155197021a082240ff5de14d4c2c9a","read-only":false},"node-name":"drive-scsi3","read-only":false,"throttle-group":"throttle-drive-scsi3"}' \
   -device 'scsi-hd,bus=scsihw0.0,channel=0,scsi-id=0,lun=3,drive=drive-scsi3,id=scsi3,device_id=drive-scsi3,write-cache=off' \
   -netdev 'type=tap,id=net0,ifname=tap8006i0,script=/usr/libexec/qemu-server/pve-bridge,downscript=/usr/libexec/qemu-server/pve-bridgedown,vhost=on' \
   -device 'virtio-net-pci,mac=A2:C0:43:77:08:A0,netdev=net0,bus=pci.0,addr=0x12,id=net0,rx_queue_size=1024,tx_queue_size=256,bootindex=300' \
diff --git a/src/test/cfg2cmd/simple-cifs.conf.cmd b/src/test/cfg2cmd/simple-cifs.conf.cmd
index a3b75065..2c21fdc7 100644
--- a/src/test/cfg2cmd/simple-cifs.conf.cmd
+++ b/src/test/cfg2cmd/simple-cifs.conf.cmd
@@ -29,12 +29,12 @@
   -iscsi 'initiator-name=iqn.1993-08.org.debian:01:aabbccddeeff' \
   -device 'ide-cd,bus=ide.1,unit=0,id=ide2,bootindex=200' \
   -device 'virtio-scsi-pci,id=scsihw0,bus=pci.0,addr=0x5' \
-  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"native","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/mnt/pve/cifs-store/vms/8006/vol-vm-8006-disk-0.raw","node-name":"e2b3b8f2d6a23adc1aa3ecd195dbaf5","read-only":false},"node-name":"f2b3b8f2d6a23adc1aa3ecd195dbaf5","read-only":false},"node-name":"drive-scsi0","read-only":false,"throttle-group":"throttle-drive-scsi0"}' \
+  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"native","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/mnt/pve/cifs-store/vms/8006/vol-vm-8006-disk-0.raw","node-name":"e8ea238e81499b0dd18f0e777f3921e","read-only":false},"node-name":"f8ea238e81499b0dd18f0e777f3921e","read-only":false},"node-name":"drive-scsi0","read-only":false,"throttle-group":"throttle-drive-scsi0"}' \
   -device 'scsi-hd,bus=scsihw0.0,channel=0,scsi-id=0,lun=0,drive=drive-scsi0,id=scsi0,device_id=drive-scsi0,write-cache=on' \
-  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"threads","cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/mnt/pve/cifs-store/vms/8006/vol-vm-8006-disk-0.raw","node-name":"ee4d9a961200a669c1a8182632aba3e","read-only":false},"node-name":"fe4d9a961200a669c1a8182632aba3e","read-only":false},"node-name":"drive-scsi1","read-only":false,"throttle-group":"throttle-drive-scsi1"}' \
+  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"threads","cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/mnt/pve/cifs-store/vms/8006/vol-vm-8006-disk-0.raw","node-name":"ed5563ee262694e92d52e6db4151209","read-only":false},"node-name":"fd5563ee262694e92d52e6db4151209","read-only":false},"node-name":"drive-scsi1","read-only":false,"throttle-group":"throttle-drive-scsi1"}' \
   -device 'scsi-hd,bus=scsihw0.0,channel=0,scsi-id=0,lun=1,drive=drive-scsi1,id=scsi1,device_id=drive-scsi1,write-cache=on' \
-  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"threads","cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/mnt/pve/cifs-store/vms/8006/vol-vm-8006-disk-0.raw","node-name":"e6a3bf7eee1e2636cbe31f62b537b6c","read-only":false},"node-name":"f6a3bf7eee1e2636cbe31f62b537b6c","read-only":false},"node-name":"drive-scsi2","read-only":false,"throttle-group":"throttle-drive-scsi2"}' \
+  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"threads","cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/mnt/pve/cifs-store/vms/8006/vol-vm-8006-disk-0.raw","node-name":"eee958fd64d8acc43d6ce2ee1b93987","read-only":false},"node-name":"fee958fd64d8acc43d6ce2ee1b93987","read-only":false},"node-name":"drive-scsi2","read-only":false,"throttle-group":"throttle-drive-scsi2"}' \
   -device 'scsi-hd,bus=scsihw0.0,channel=0,scsi-id=0,lun=2,drive=drive-scsi2,id=scsi2,device_id=drive-scsi2,write-cache=off' \
-  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"native","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/mnt/pve/cifs-store/vms/8006/vol-vm-8006-disk-0.raw","node-name":"e7042ee58e764b1296ad54014cb9a03","read-only":false},"node-name":"f7042ee58e764b1296ad54014cb9a03","read-only":false},"node-name":"drive-scsi3","read-only":false,"throttle-group":"throttle-drive-scsi3"}' \
+  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"native","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/mnt/pve/cifs-store/vms/8006/vol-vm-8006-disk-0.raw","node-name":"ed770db6a0b0fb912808ab1de78c58d","read-only":false},"node-name":"fd770db6a0b0fb912808ab1de78c58d","read-only":false},"node-name":"drive-scsi3","read-only":false,"throttle-group":"throttle-drive-scsi3"}' \
   -device 'scsi-hd,bus=scsihw0.0,channel=0,scsi-id=0,lun=3,drive=drive-scsi3,id=scsi3,device_id=drive-scsi3,write-cache=off' \
   -machine 'type=pc+pve0'
diff --git a/src/test/cfg2cmd/simple-lvm.conf.cmd b/src/test/cfg2cmd/simple-lvm.conf.cmd
index 0ab09c87..0d38738a 100644
--- a/src/test/cfg2cmd/simple-lvm.conf.cmd
+++ b/src/test/cfg2cmd/simple-lvm.conf.cmd
@@ -28,12 +28,12 @@
   -device 'virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3,free-page-reporting=on' \
   -iscsi 'initiator-name=iqn.1993-08.org.debian:01:aabbccddeeff' \
   -device 'virtio-scsi-pci,id=scsihw0,bus=pci.0,addr=0x5' \
-  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"native","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"host_device","filename":"/dev/veegee/vol-vm-8006-disk-0","node-name":"e0378a375d635b0f473569544c7c207","read-only":false},"node-name":"f0378a375d635b0f473569544c7c207","read-only":false},"node-name":"drive-scsi0","read-only":false,"throttle-group":"throttle-drive-scsi0"}' \
+  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"native","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"host_device","filename":"/dev/veegee/vol-vm-8006-disk-0","node-name":"ea2788c1d4a95b47a772c061c8c40fa","read-only":false},"node-name":"fa2788c1d4a95b47a772c061c8c40fa","read-only":false},"node-name":"drive-scsi0","read-only":false,"throttle-group":"throttle-drive-scsi0"}' \
   -device 'scsi-hd,bus=scsihw0.0,channel=0,scsi-id=0,lun=0,drive=drive-scsi0,id=scsi0,device_id=drive-scsi0,bootindex=100,write-cache=on' \
-  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"threads","cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"host_device","filename":"/dev/veegee/vol-vm-8006-disk-0","node-name":"e2fbae024c8a771f708f4a5391211b0","read-only":false},"node-name":"f2fbae024c8a771f708f4a5391211b0","read-only":false},"node-name":"drive-scsi1","read-only":false,"throttle-group":"throttle-drive-scsi1"}' \
+  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"threads","cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"host_device","filename":"/dev/veegee/vol-vm-8006-disk-0","node-name":"ee1d7a20f694b544e5c06a4d2826d07","read-only":false},"node-name":"fe1d7a20f694b544e5c06a4d2826d07","read-only":false},"node-name":"drive-scsi1","read-only":false,"throttle-group":"throttle-drive-scsi1"}' \
   -device 'scsi-hd,bus=scsihw0.0,channel=0,scsi-id=0,lun=1,drive=drive-scsi1,id=scsi1,device_id=drive-scsi1,write-cache=on' \
-  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"threads","cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"host_device","filename":"/dev/veegee/vol-vm-8006-disk-0","node-name":"e4328c26b141e3efe1564cb60bf1155","read-only":false},"node-name":"f4328c26b141e3efe1564cb60bf1155","read-only":false},"node-name":"drive-scsi2","read-only":false,"throttle-group":"throttle-drive-scsi2"}' \
+  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"threads","cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"host_device","filename":"/dev/veegee/vol-vm-8006-disk-0","node-name":"e00b120cbcd9ff17322890eebbd9218","read-only":false},"node-name":"f00b120cbcd9ff17322890eebbd9218","read-only":false},"node-name":"drive-scsi2","read-only":false,"throttle-group":"throttle-drive-scsi2"}' \
   -device 'scsi-hd,bus=scsihw0.0,channel=0,scsi-id=0,lun=2,drive=drive-scsi2,id=scsi2,device_id=drive-scsi2,write-cache=off' \
-  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"native","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"host_device","filename":"/dev/veegee/vol-vm-8006-disk-0","node-name":"e68e10f8128f05fe5f7e85cc1f9922b","read-only":false},"node-name":"f68e10f8128f05fe5f7e85cc1f9922b","read-only":false},"node-name":"drive-scsi3","read-only":false,"throttle-group":"throttle-drive-scsi3"}' \
+  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"native","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"host_device","filename":"/dev/veegee/vol-vm-8006-disk-0","node-name":"e0dfc626540419d40b3cc4f89ad4cde","read-only":false},"node-name":"f0dfc626540419d40b3cc4f89ad4cde","read-only":false},"node-name":"drive-scsi3","read-only":false,"throttle-group":"throttle-drive-scsi3"}' \
   -device 'scsi-hd,bus=scsihw0.0,channel=0,scsi-id=0,lun=3,drive=drive-scsi3,id=scsi3,device_id=drive-scsi3,write-cache=off' \
   -machine 'type=pc+pve0'
diff --git a/src/test/cfg2cmd/simple-lvmthin.conf.cmd b/src/test/cfg2cmd/simple-lvmthin.conf.cmd
index c4dc173d..a7cf1c13 100644
--- a/src/test/cfg2cmd/simple-lvmthin.conf.cmd
+++ b/src/test/cfg2cmd/simple-lvmthin.conf.cmd
@@ -28,12 +28,12 @@
   -device 'virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3,free-page-reporting=on' \
   -iscsi 'initiator-name=iqn.1993-08.org.debian:01:aabbccddeeff' \
   -device 'virtio-scsi-pci,id=scsihw0,bus=pci.0,addr=0x5' \
-  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"host_device","filename":"/dev/pve/vol-vm-8006-disk-0","node-name":"e6d87b01b7bb888b8426534a542ff1c","read-only":false},"node-name":"f6d87b01b7bb888b8426534a542ff1c","read-only":false},"node-name":"drive-scsi0","read-only":false,"throttle-group":"throttle-drive-scsi0"}' \
+  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"host_device","filename":"/dev/pve/vol-vm-8006-disk-0","node-name":"e72966e642e5281429a4e4c1d265263","read-only":false},"node-name":"f72966e642e5281429a4e4c1d265263","read-only":false},"node-name":"drive-scsi0","read-only":false,"throttle-group":"throttle-drive-scsi0"}' \
   -device 'scsi-hd,bus=scsihw0.0,channel=0,scsi-id=0,lun=0,drive=drive-scsi0,id=scsi0,device_id=drive-scsi0,bootindex=100,write-cache=on' \
-  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"io_uring","cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"host_device","filename":"/dev/pve/vol-vm-8006-disk-0","node-name":"e96d9ece81aa4271aa2d8485184f66b","read-only":false},"node-name":"f96d9ece81aa4271aa2d8485184f66b","read-only":false},"node-name":"drive-scsi1","read-only":false,"throttle-group":"throttle-drive-scsi1"}' \
+  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"io_uring","cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"host_device","filename":"/dev/pve/vol-vm-8006-disk-0","node-name":"e5354d4dc5e32f04e48f99a6b4a0762","read-only":false},"node-name":"f5354d4dc5e32f04e48f99a6b4a0762","read-only":false},"node-name":"drive-scsi1","read-only":false,"throttle-group":"throttle-drive-scsi1"}' \
   -device 'scsi-hd,bus=scsihw0.0,channel=0,scsi-id=0,lun=1,drive=drive-scsi1,id=scsi1,device_id=drive-scsi1,write-cache=on' \
-  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"io_uring","cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"host_device","filename":"/dev/pve/vol-vm-8006-disk-0","node-name":"e0b89788ef97beda10a850ab45897d9","read-only":false},"node-name":"f0b89788ef97beda10a850ab45897d9","read-only":false},"node-name":"drive-scsi2","read-only":false,"throttle-group":"throttle-drive-scsi2"}' \
+  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"io_uring","cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"host_device","filename":"/dev/pve/vol-vm-8006-disk-0","node-name":"e35f8ce63c4e72d4a368aefe52297c8","read-only":false},"node-name":"f35f8ce63c4e72d4a368aefe52297c8","read-only":false},"node-name":"drive-scsi2","read-only":false,"throttle-group":"throttle-drive-scsi2"}' \
   -device 'scsi-hd,bus=scsihw0.0,channel=0,scsi-id=0,lun=2,drive=drive-scsi2,id=scsi2,device_id=drive-scsi2,write-cache=off' \
-  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"host_device","filename":"/dev/pve/vol-vm-8006-disk-0","node-name":"ea7b6871af66ca3e13e95bd74570aa2","read-only":false},"node-name":"fa7b6871af66ca3e13e95bd74570aa2","read-only":false},"node-name":"drive-scsi3","read-only":false,"throttle-group":"throttle-drive-scsi3"}' \
+  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"host_device","filename":"/dev/pve/vol-vm-8006-disk-0","node-name":"eb54faa199461f707458c4b22f7502f","read-only":false},"node-name":"fb54faa199461f707458c4b22f7502f","read-only":false},"node-name":"drive-scsi3","read-only":false,"throttle-group":"throttle-drive-scsi3"}' \
   -device 'scsi-hd,bus=scsihw0.0,channel=0,scsi-id=0,lun=3,drive=drive-scsi3,id=scsi3,device_id=drive-scsi3,write-cache=off' \
   -machine 'type=pc+pve0'
diff --git a/src/test/cfg2cmd/simple-rbd.conf.cmd b/src/test/cfg2cmd/simple-rbd.conf.cmd
index 2bcb9287..b4d12b34 100644
--- a/src/test/cfg2cmd/simple-rbd.conf.cmd
+++ b/src/test/cfg2cmd/simple-rbd.conf.cmd
@@ -35,21 +35,21 @@
   -iscsi 'initiator-name=iqn.1993-08.org.debian:01:aabbccddeeff' \
   -device 'ide-cd,bus=ide.1,unit=0,id=ide2,bootindex=200' \
   -device 'virtio-scsi-pci,id=scsihw0,bus=pci.0,addr=0x5' \
-  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"auth-client-required":["none"],"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"rbd","image":"vol-vm-8006-disk-0","node-name":"e8e1af6f55c6a2466f178045aa79710","pool":"cpool","read-only":false,"server":[{"host":"127.0.0.42","port":"3300"},{"host":"127.0.0.21","port":"3300"},{"host":"::1","port":"3300"}]},"node-name":"f8e1af6f55c6a2466f178045aa79710","read-only":false},"node-name":"drive-scsi0","read-only":false,"throttle-group":"throttle-drive-scsi0"}' \
+  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"auth-client-required":["none"],"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"rbd","image":"vol-vm-8006-disk-0","node-name":"ed3642e965bec041bb629397dc544f1","pool":"cpool","read-only":false,"server":[{"host":"127.0.0.42","port":"3300"},{"host":"127.0.0.21","port":"3300"},{"host":"::1","port":"3300"}]},"node-name":"fd3642e965bec041bb629397dc544f1","read-only":false},"node-name":"drive-scsi0","read-only":false,"throttle-group":"throttle-drive-scsi0"}' \
   -device 'scsi-hd,bus=scsihw0.0,channel=0,scsi-id=0,lun=0,drive=drive-scsi0,id=scsi0,device_id=drive-scsi0,bootindex=100,write-cache=on' \
-  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"auth-client-required":["none"],"cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"rbd","image":"vol-vm-8006-disk-0","node-name":"e3990bba2ed1f48c5bb23e9f37b4cec","pool":"cpool","read-only":false,"server":[{"host":"127.0.0.42","port":"3300"},{"host":"127.0.0.21","port":"3300"},{"host":"::1","port":"3300"}]},"node-name":"f3990bba2ed1f48c5bb23e9f37b4cec","read-only":false},"node-name":"drive-scsi1","read-only":false,"throttle-group":"throttle-drive-scsi1"}' \
+  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"auth-client-required":["none"],"cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"rbd","image":"vol-vm-8006-disk-0","node-name":"e713219342b3e0061adc07ab00b3b9e","pool":"cpool","read-only":false,"server":[{"host":"127.0.0.42","port":"3300"},{"host":"127.0.0.21","port":"3300"},{"host":"::1","port":"3300"}]},"node-name":"f713219342b3e0061adc07ab00b3b9e","read-only":false},"node-name":"drive-scsi1","read-only":false,"throttle-group":"throttle-drive-scsi1"}' \
   -device 'scsi-hd,bus=scsihw0.0,channel=0,scsi-id=0,lun=1,drive=drive-scsi1,id=scsi1,device_id=drive-scsi1,write-cache=on' \
-  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"auth-client-required":["none"],"cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"rbd","image":"vol-vm-8006-disk-0","node-name":"e3beccc2a8f2eacb8b5df8055a7d093","pool":"cpool","read-only":false,"server":[{"host":"127.0.0.42","port":"3300"},{"host":"127.0.0.21","port":"3300"},{"host":"::1","port":"3300"}]},"node-name":"f3beccc2a8f2eacb8b5df8055a7d093","read-only":false},"node-name":"drive-scsi2","read-only":false,"throttle-group":"throttle-drive-scsi2"}' \
+  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"auth-client-required":["none"],"cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"rbd","image":"vol-vm-8006-disk-0","node-name":"e5c0bd70b70fed198ec24ad4cabf055","pool":"cpool","read-only":false,"server":[{"host":"127.0.0.42","port":"3300"},{"host":"127.0.0.21","port":"3300"},{"host":"::1","port":"3300"}]},"node-name":"f5c0bd70b70fed198ec24ad4cabf055","read-only":false},"node-name":"drive-scsi2","read-only":false,"throttle-group":"throttle-drive-scsi2"}' \
   -device 'scsi-hd,bus=scsihw0.0,channel=0,scsi-id=0,lun=2,drive=drive-scsi2,id=scsi2,device_id=drive-scsi2,write-cache=off' \
-  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"auth-client-required":["none"],"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"rbd","image":"vol-vm-8006-disk-0","node-name":"eef923d5dfcee93fbc712b03f9f21af","pool":"cpool","read-only":false,"server":[{"host":"127.0.0.42","port":"3300"},{"host":"127.0.0.21","port":"3300"},{"host":"::1","port":"3300"}]},"node-name":"fef923d5dfcee93fbc712b03f9f21af","read-only":false},"node-name":"drive-scsi3","read-only":false,"throttle-group":"throttle-drive-scsi3"}' \
+  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"auth-client-required":["none"],"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"rbd","image":"vol-vm-8006-disk-0","node-name":"e570729e8cc07c9b174dc825f6640a9","pool":"cpool","read-only":false,"server":[{"host":"127.0.0.42","port":"3300"},{"host":"127.0.0.21","port":"3300"},{"host":"::1","port":"3300"}]},"node-name":"f570729e8cc07c9b174dc825f6640a9","read-only":false},"node-name":"drive-scsi3","read-only":false,"throttle-group":"throttle-drive-scsi3"}' \
   -device 'scsi-hd,bus=scsihw0.0,channel=0,scsi-id=0,lun=3,drive=drive-scsi3,id=scsi3,device_id=drive-scsi3,write-cache=off' \
-  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"host_device","filename":"/dev/rbd-pve/fc4181a6-56eb-4f68-b452-8ba1f381ca2a/cpool/vol-vm-8006-disk-0","node-name":"eb2c7a292f03b9f6d015cf83ae79730","read-only":false},"node-name":"fb2c7a292f03b9f6d015cf83ae79730","read-only":false},"node-name":"drive-scsi4","read-only":false,"throttle-group":"throttle-drive-scsi4"}' \
+  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"host_device","filename":"/dev/rbd-pve/fc4181a6-56eb-4f68-b452-8ba1f381ca2a/cpool/vol-vm-8006-disk-0","node-name":"e8562e5bc39a73ea44b67b78236252c","read-only":false},"node-name":"f8562e5bc39a73ea44b67b78236252c","read-only":false},"node-name":"drive-scsi4","read-only":false,"throttle-group":"throttle-drive-scsi4"}' \
   -device 'scsi-hd,bus=scsihw0.0,channel=0,scsi-id=0,lun=4,drive=drive-scsi4,id=scsi4,device_id=drive-scsi4,write-cache=on' \
-  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"threads","cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"host_device","filename":"/dev/rbd-pve/fc4181a6-56eb-4f68-b452-8ba1f381ca2a/cpool/vol-vm-8006-disk-0","node-name":"e5258ec75558b1f102af1e20e677fd0","read-only":false},"node-name":"f5258ec75558b1f102af1e20e677fd0","read-only":false},"node-name":"drive-scsi5","read-only":false,"throttle-group":"throttle-drive-scsi5"}' \
+  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"threads","cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"host_device","filename":"/dev/rbd-pve/fc4181a6-56eb-4f68-b452-8ba1f381ca2a/cpool/vol-vm-8006-disk-0","node-name":"ec5063ff68953608838c864898e4e4c","read-only":false},"node-name":"fc5063ff68953608838c864898e4e4c","read-only":false},"node-name":"drive-scsi5","read-only":false,"throttle-group":"throttle-drive-scsi5"}' \
   -device 'scsi-hd,bus=scsihw0.0,channel=0,scsi-id=0,lun=5,drive=drive-scsi5,id=scsi5,device_id=drive-scsi5,write-cache=on' \
-  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"threads","cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"host_device","filename":"/dev/rbd-pve/fc4181a6-56eb-4f68-b452-8ba1f381ca2a/cpool/vol-vm-8006-disk-0","node-name":"edb33cdcea8ec3e2225509c4945227e","read-only":false},"node-name":"fdb33cdcea8ec3e2225509c4945227e","read-only":false},"node-name":"drive-scsi6","read-only":false,"throttle-group":"throttle-drive-scsi6"}' \
+  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"threads","cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"host_device","filename":"/dev/rbd-pve/fc4181a6-56eb-4f68-b452-8ba1f381ca2a/cpool/vol-vm-8006-disk-0","node-name":"e6d1f6305834049bc1a1798ea3a0876","read-only":false},"node-name":"f6d1f6305834049bc1a1798ea3a0876","read-only":false},"node-name":"drive-scsi6","read-only":false,"throttle-group":"throttle-drive-scsi6"}' \
   -device 'scsi-hd,bus=scsihw0.0,channel=0,scsi-id=0,lun=6,drive=drive-scsi6,id=scsi6,device_id=drive-scsi6,write-cache=off' \
-  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"host_device","filename":"/dev/rbd-pve/fc4181a6-56eb-4f68-b452-8ba1f381ca2a/cpool/vol-vm-8006-disk-0","node-name":"eb0b017124a47505c97a5da052e0141","read-only":false},"node-name":"fb0b017124a47505c97a5da052e0141","read-only":false},"node-name":"drive-scsi7","read-only":false,"throttle-group":"throttle-drive-scsi7"}' \
+  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"host_device","filename":"/dev/rbd-pve/fc4181a6-56eb-4f68-b452-8ba1f381ca2a/cpool/vol-vm-8006-disk-0","node-name":"e04c00f1eee69b1e3f4dae76ee71dc1","read-only":false},"node-name":"f04c00f1eee69b1e3f4dae76ee71dc1","read-only":false},"node-name":"drive-scsi7","read-only":false,"throttle-group":"throttle-drive-scsi7"}' \
   -device 'scsi-hd,bus=scsihw0.0,channel=0,scsi-id=0,lun=7,drive=drive-scsi7,id=scsi7,device_id=drive-scsi7,write-cache=off' \
   -netdev 'type=tap,id=net0,ifname=tap8006i0,script=/usr/libexec/qemu-server/pve-bridge,downscript=/usr/libexec/qemu-server/pve-bridgedown,vhost=on' \
   -device 'virtio-net-pci,mac=A2:C0:43:77:08:A0,netdev=net0,bus=pci.0,addr=0x12,id=net0,rx_queue_size=1024,tx_queue_size=256,bootindex=300' \
diff --git a/src/test/cfg2cmd/simple-virtio-blk.conf.cmd b/src/test/cfg2cmd/simple-virtio-blk.conf.cmd
index 6eae2c1b..62f37801 100644
--- a/src/test/cfg2cmd/simple-virtio-blk.conf.cmd
+++ b/src/test/cfg2cmd/simple-virtio-blk.conf.cmd
@@ -28,7 +28,7 @@
   -device 'virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3,free-page-reporting=on' \
   -iscsi 'initiator-name=iqn.1993-08.org.debian:01:aabbccddeeff' \
   -device 'ide-cd,bus=ide.1,unit=0,id=ide2,bootindex=200' \
-  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/var/lib/vz/vms/8006/vol-vm-8006-disk-0.qcow2","node-name":"edd19f6c1b3a6d5a6248c3376a91a16","read-only":false},"node-name":"fdd19f6c1b3a6d5a6248c3376a91a16","read-only":false},"node-name":"drive-virtio0","read-only":false,"throttle-group":"throttle-drive-virtio0"}' \
+  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/var/lib/vz/vms/8006/vol-vm-8006-disk-0.qcow2","node-name":"ee6988c85939a5b45caf39810880e8d","read-only":false},"node-name":"fe6988c85939a5b45caf39810880e8d","read-only":false},"node-name":"drive-virtio0","read-only":false,"throttle-group":"throttle-drive-virtio0"}' \
   -device 'virtio-blk-pci,drive=drive-virtio0,id=virtio0,bus=pci.0,addr=0xa,iothread=iothread-virtio0,bootindex=100,write-cache=on' \
   -netdev 'type=tap,id=net0,ifname=tap8006i0,script=/usr/libexec/qemu-server/pve-bridge,downscript=/usr/libexec/qemu-server/pve-bridgedown,vhost=on' \
   -device 'virtio-net-pci,mac=A2:C0:43:77:08:A0,netdev=net0,bus=pci.0,addr=0x12,id=net0,rx_queue_size=1024,tx_queue_size=256,bootindex=300' \
diff --git a/src/test/cfg2cmd/simple-zfs-over-iscsi.conf.cmd b/src/test/cfg2cmd/simple-zfs-over-iscsi.conf.cmd
index 4fa6a5a9..6f6b4bd3 100644
--- a/src/test/cfg2cmd/simple-zfs-over-iscsi.conf.cmd
+++ b/src/test/cfg2cmd/simple-zfs-over-iscsi.conf.cmd
@@ -31,13 +31,13 @@
   -iscsi 'initiator-name=iqn.1993-08.org.debian:01:aabbccddeeff' \
   -device 'ide-cd,bus=ide.1,unit=0,id=ide2,bootindex=200' \
   -device 'virtio-scsi-pci,id=scsihw0,bus=pci.0,addr=0x5' \
-  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"iscsi","lun":0,"node-name":"e7106ac43d4f125a1911487dd9e3e42","portal":"127.0.0.1","read-only":false,"target":"iqn.2019-10.org.test:foobar","transport":"tcp"},"node-name":"f7106ac43d4f125a1911487dd9e3e42","read-only":false},"node-name":"drive-scsi0","read-only":false,"throttle-group":"throttle-drive-scsi0"}' \
+  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"iscsi","lun":0,"node-name":"e2a251fa583452d3d74690197487c92","portal":"127.0.0.1","read-only":false,"target":"iqn.2019-10.org.test:foobar","transport":"tcp"},"node-name":"f2a251fa583452d3d74690197487c92","read-only":false},"node-name":"drive-scsi0","read-only":false,"throttle-group":"throttle-drive-scsi0"}' \
   -device 'scsi-hd,bus=scsihw0.0,channel=0,scsi-id=0,lun=0,drive=drive-scsi0,id=scsi0,device_id=drive-scsi0,bootindex=100,write-cache=on' \
-  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"iscsi","lun":0,"node-name":"efdb73e0d0acc5a60e3ff438cb20113","portal":"127.0.0.1","read-only":false,"target":"iqn.2019-10.org.test:foobar","transport":"tcp"},"node-name":"ffdb73e0d0acc5a60e3ff438cb20113","read-only":false},"node-name":"drive-scsi1","read-only":false,"throttle-group":"throttle-drive-scsi1"}' \
+  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"iscsi","lun":0,"node-name":"e11b9f185d5cc1a4ff6b6f17e70db53","portal":"127.0.0.1","read-only":false,"target":"iqn.2019-10.org.test:foobar","transport":"tcp"},"node-name":"f11b9f185d5cc1a4ff6b6f17e70db53","read-only":false},"node-name":"drive-scsi1","read-only":false,"throttle-group":"throttle-drive-scsi1"}' \
   -device 'scsi-hd,bus=scsihw0.0,channel=0,scsi-id=0,lun=1,drive=drive-scsi1,id=scsi1,device_id=drive-scsi1,write-cache=on' \
-  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"iscsi","lun":0,"node-name":"eab527a81b458aa9603dca5e2505f6e","portal":"127.0.0.1","read-only":false,"target":"iqn.2019-10.org.test:foobar","transport":"tcp"},"node-name":"fab527a81b458aa9603dca5e2505f6e","read-only":false},"node-name":"drive-scsi2","read-only":false,"throttle-group":"throttle-drive-scsi2"}' \
+  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"iscsi","lun":0,"node-name":"e89631b9d318c36c543e6369996cac6","portal":"127.0.0.1","read-only":false,"target":"iqn.2019-10.org.test:foobar","transport":"tcp"},"node-name":"f89631b9d318c36c543e6369996cac6","read-only":false},"node-name":"drive-scsi2","read-only":false,"throttle-group":"throttle-drive-scsi2"}' \
   -device 'scsi-hd,bus=scsihw0.0,channel=0,scsi-id=0,lun=2,drive=drive-scsi2,id=scsi2,device_id=drive-scsi2,write-cache=off' \
-  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"iscsi","lun":0,"node-name":"e915a332310039f7a3feed6901eb5da","portal":"127.0.0.1","read-only":false,"target":"iqn.2019-10.org.test:foobar","transport":"tcp"},"node-name":"f915a332310039f7a3feed6901eb5da","read-only":false},"node-name":"drive-scsi3","read-only":false,"throttle-group":"throttle-drive-scsi3"}' \
+  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"iscsi","lun":0,"node-name":"e5aada8a1e0226a55200927381977c2","portal":"127.0.0.1","read-only":false,"target":"iqn.2019-10.org.test:foobar","transport":"tcp"},"node-name":"f5aada8a1e0226a55200927381977c2","read-only":false},"node-name":"drive-scsi3","read-only":false,"throttle-group":"throttle-drive-scsi3"}' \
   -device 'scsi-hd,bus=scsihw0.0,channel=0,scsi-id=0,lun=3,drive=drive-scsi3,id=scsi3,device_id=drive-scsi3,write-cache=off' \
   -netdev 'type=tap,id=net0,ifname=tap8006i0,script=/usr/libexec/qemu-server/pve-bridge,downscript=/usr/libexec/qemu-server/pve-bridgedown,vhost=on' \
   -device 'virtio-net-pci,mac=A2:C0:43:77:08:A0,netdev=net0,bus=pci.0,addr=0x12,id=net0,rx_queue_size=1024,tx_queue_size=256,bootindex=300' \
diff --git a/src/test/cfg2cmd/simple1.conf.cmd b/src/test/cfg2cmd/simple1.conf.cmd
index c17d3262..de8e61a7 100644
--- a/src/test/cfg2cmd/simple1.conf.cmd
+++ b/src/test/cfg2cmd/simple1.conf.cmd
@@ -28,7 +28,7 @@
   -iscsi 'initiator-name=iqn.1993-08.org.debian:01:aabbccddeeff' \
   -device 'ide-cd,bus=ide.1,unit=0,id=ide2,bootindex=200' \
   -device 'virtio-scsi-pci,id=scsihw0,bus=pci.0,addr=0x5' \
-  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/var/lib/vz/vms/8006/vol-vm-8006-disk-0.qcow2","node-name":"ecd04be4259153b8293415fefa2a84c","read-only":false},"node-name":"fcd04be4259153b8293415fefa2a84c","read-only":false},"node-name":"drive-scsi0","read-only":false,"throttle-group":"throttle-drive-scsi0"}' \
+  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/var/lib/vz/vms/8006/vol-vm-8006-disk-0.qcow2","node-name":"ed3a7e1debf641484f3aa78b2657af1","read-only":false},"node-name":"fd3a7e1debf641484f3aa78b2657af1","read-only":false},"node-name":"drive-scsi0","read-only":false,"throttle-group":"throttle-drive-scsi0"}' \
   -device 'scsi-hd,bus=scsihw0.0,channel=0,scsi-id=0,lun=0,drive=drive-scsi0,id=scsi0,device_id=drive-scsi0,bootindex=100,write-cache=on' \
   -netdev 'type=tap,id=net0,ifname=tap8006i0,script=/usr/libexec/qemu-server/pve-bridge,downscript=/usr/libexec/qemu-server/pve-bridgedown,vhost=on' \
   -device 'virtio-net-pci,mac=A2:C0:43:77:08:A0,netdev=net0,bus=pci.0,addr=0x12,id=net0,rx_queue_size=1024,tx_queue_size=256,bootindex=300' \
-- 
2.47.2



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] 74+ messages in thread

* Re: [pve-devel] [PATCH storage 07/26] common: add pve-storage-vtype standard option with new types
  2025-07-29 11:15 ` [pve-devel] [PATCH storage 07/26] common: add pve-storage-vtype standard option with new types Wolfgang Bumiller
@ 2025-07-29 13:50   ` Fiona Ebner
  0 siblings, 0 replies; 74+ messages in thread
From: Fiona Ebner @ 2025-07-29 13:50 UTC (permalink / raw)
  To: Proxmox VE development discussion, Wolfgang Bumiller

Am 29.07.25 um 1:16 PM schrieb Wolfgang Bumiller:
> This adds the vm-vol and ct-vol vtypes introduced in the upcoming
> commits.
> 
> Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
> ---
>  src/PVE/Storage/Common.pm | 17 +++++++++++++++++
>  1 file changed, 17 insertions(+)
> 
> diff --git a/src/PVE/Storage/Common.pm b/src/PVE/Storage/Common.pm
> index 222dc76..b2ebd50 100644
> --- a/src/PVE/Storage/Common.pm
> +++ b/src/PVE/Storage/Common.pm
> @@ -59,6 +59,23 @@ PVE::JSONSchema::register_standard_option(
>      },
>  );
>  
> +=head3 pve-storage-vtype
> +
> +Possible vtypes a guest image can have.

IMHO, this should be renamed to make it clear that it's only for guest
images, not all vtypes.

> +
> +=cut
> +
> +PVE::JSONSchema::register_standard_option(
> +    'pve-storage-vtype',
> +    {
> +        type => 'string',
> +        enum => [qw(vm-vol ct-vol images rootdir)],
> +        description =>
> +            "The volume type indicates whether the volume is meant for VMs or containers."
> +            . " The 'images' and 'rootdir' types are for legacy support and should be avoided.",
> +    },
> +);
> +
>  =pod
>  
>  =head1 FUNCTIONS



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] 74+ messages in thread

* Re: [pve-devel] [PATCH storage 06/26] common: use v5.36
  2025-07-29 11:15 ` [pve-devel] [PATCH storage 06/26] common: use v5.36 Wolfgang Bumiller
@ 2025-07-29 13:59   ` Fiona Ebner
  2025-07-29 14:42     ` Thomas Lamprecht
  0 siblings, 1 reply; 74+ messages in thread
From: Fiona Ebner @ 2025-07-29 13:59 UTC (permalink / raw)
  To: Proxmox VE development discussion, Wolfgang Bumiller

Am 29.07.25 um 1:16 PM schrieb Wolfgang Bumiller:
> Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
> ---
>  src/PVE/Storage/Common.pm | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/src/PVE/Storage/Common.pm b/src/PVE/Storage/Common.pm
> index 746a262..222dc76 100644
> --- a/src/PVE/Storage/Common.pm
> +++ b/src/PVE/Storage/Common.pm
> @@ -1,7 +1,6 @@
>  package PVE::Storage::Common;
>  
> -use strict;
> -use warnings;
> +use v5.36;
>  
>  use PVE::JSONSchema;
>  use PVE::Syscall;

Do you need a specific feature from v5.36? Would be great to have some
context. And should we go for v5.40, since that's what we have in
Trixie? Or are there any reservations about specific language changes?


_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] 74+ messages in thread

* Re: [pve-devel] [PATCH qemu-server 06/10] tests: scripted: update tests to new vtypes and paths
  2025-07-29 11:15 ` [pve-devel] [PATCH qemu-server 06/10] tests: scripted: update tests to new vtypes and paths Wolfgang Bumiller
@ 2025-07-29 14:13   ` Max R. Carrara
  0 siblings, 0 replies; 74+ messages in thread
From: Max R. Carrara @ 2025-07-29 14:13 UTC (permalink / raw)
  To: Proxmox VE development discussion

On Tue Jul 29, 2025 at 1:15 PM CEST, Wolfgang Bumiller wrote:
> This is the result of:
>
> $ find src/test/ -type f -print0 | xargs -0 sed -ri -e 's/\<vm-[0-9]+-disk-/vol-&/g'
> $ find src/test/ -type f -print0 | xargs -0 sed -ri -e 's/\<vm-\$vmid-disk-/vol-&/g'
> $ find src/test/ -type f -print0 | xargs -0 sed -ri -e 's/snap_(vm-\$vmid-disk-)/snap_vol-\1/g'
> $ find src/test/ -type f -print0 | xargs -0 sed -ri -e 's/snap_(vm-[0-9]+-disk-)/snap_vol-\1/g'
> $ find src/test/ -type f -print0 | xargs -0 sed -ri -e 's|/images/([0-9]+/vol-vm)|/vms/\1|g'
> $ find src/test/ -type f -print0 | xargs -0 sed -ri -e 's|/images/([0-9]+/vol-ct)|/cts/\1|g'
> $ find src/test/ -type f -print0 | xargs -0 sed -ri -e 's|/images/(\$vmid/vol-vm)|/vms/\1|g'
> $ find src/test/ -type f -print0 | xargs -0 sed -ri -e 's|/images/(\$vmid/vol-ct)|/cts/\1|g'
>
> Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
> ---

Seems like this patch here can't be applied:

    Applying: tests: scripted: update tests to new vtypes and paths
    error: corrupt patch at line 954
    Patch failed at 0001 tests: scripted: update tests to new vtypes and paths

Seems like those the lines starting with no. 954 have been split into
multiple ones.

Fixing the lines in that hunk by hand allows the patch to apply.

>  src/test/cfg2cmd/aio.conf                     |  28 +--
>  src/test/cfg2cmd/aio.conf.cmd                 |  28 +--
>  src/test/cfg2cmd/bootorder-empty.conf         |   6 +-
>  src/test/cfg2cmd/bootorder-empty.conf.cmd     |   6 +-
>  src/test/cfg2cmd/bootorder-legacy.conf        |   6 +-
>  src/test/cfg2cmd/bootorder-legacy.conf.cmd    |   6 +-
>  src/test/cfg2cmd/bootorder.conf               |   6 +-
>  src/test/cfg2cmd/bootorder.conf.cmd           |   6 +-
>  src/test/cfg2cmd/efi-raw-old.conf             |   2 +-
>  src/test/cfg2cmd/efi-raw-old.conf.cmd         |   2 +-
>  src/test/cfg2cmd/efi-raw.conf                 |   2 +-
>  src/test/cfg2cmd/efi-raw.conf.cmd             |   2 +-
>  src/test/cfg2cmd/efi-secboot-and-tpm-q35.conf |   4 +-
>  .../cfg2cmd/efi-secboot-and-tpm-q35.conf.cmd  |   2 +-
>  src/test/cfg2cmd/efi-secboot-and-tpm.conf     |   4 +-
>  src/test/cfg2cmd/efi-secboot-and-tpm.conf.cmd |   2 +-
>  src/test/cfg2cmd/efidisk-on-rbd.conf          |   2 +-
>  src/test/cfg2cmd/efidisk-on-rbd.conf.cmd      |   2 +-
>  src/test/cfg2cmd/i440fx-win10-hostpci.conf    |   2 +-
>  .../cfg2cmd/i440fx-win10-hostpci.conf.cmd     |   2 +-
>  src/test/cfg2cmd/ide-no-media-error.conf      |   2 +-
>  src/test/cfg2cmd/ide.conf                     |   2 +-
>  src/test/cfg2cmd/ide.conf.cmd                 |   2 +-
>  src/test/cfg2cmd/pinned-version-pxe-pve.conf  |   2 +-
>  .../cfg2cmd/pinned-version-pxe-pve.conf.cmd   |   2 +-
>  src/test/cfg2cmd/pinned-version-pxe.conf      |   2 +-
>  src/test/cfg2cmd/pinned-version-pxe.conf.cmd  |   2 +-
>  src/test/cfg2cmd/pinned-version.conf          |   2 +-
>  src/test/cfg2cmd/pinned-version.conf.cmd      |   2 +-
>  src/test/cfg2cmd/q35-ide.conf                 |   2 +-
>  src/test/cfg2cmd/q35-ide.conf.cmd             |   2 +-
>  .../cfg2cmd/q35-linux-hostpci-mapping.conf    |   2 +-
>  .../q35-linux-hostpci-mapping.conf.cmd        |   2 +-
>  .../q35-linux-hostpci-multifunction.conf      |   2 +-
>  .../q35-linux-hostpci-multifunction.conf.cmd  |   2 +-
>  .../q35-linux-hostpci-x-pci-overrides.conf    |   2 +-
>  ...q35-linux-hostpci-x-pci-overrides.conf.cmd |   2 +-
>  src/test/cfg2cmd/q35-linux-hostpci.conf       |   2 +-
>  src/test/cfg2cmd/q35-linux-hostpci.conf.cmd   |   2 +-
>  src/test/cfg2cmd/q35-simple-6.0.conf          |   2 +-
>  src/test/cfg2cmd/q35-simple-6.0.conf.cmd      |   2 +-
>  src/test/cfg2cmd/q35-simple-7.0.conf          |   2 +-
>  src/test/cfg2cmd/q35-simple-7.0.conf.cmd      |   2 +-
>  src/test/cfg2cmd/q35-simple-pinned-6.1.conf   |   2 +-
>  .../cfg2cmd/q35-simple-pinned-6.1.conf.cmd    |   2 +-
>  src/test/cfg2cmd/q35-simple.conf              |   2 +-
>  src/test/cfg2cmd/q35-simple.conf.cmd          |   2 +-
>  src/test/cfg2cmd/q35-win10-hostpci.conf       |   2 +-
>  src/test/cfg2cmd/q35-win10-hostpci.conf.cmd   |   2 +-
>  src/test/cfg2cmd/seabios_serial.conf          |   2 +-
>  src/test/cfg2cmd/seabios_serial.conf.cmd      |   2 +-
>  src/test/cfg2cmd/sev-es.conf                  |   2 +-
>  src/test/cfg2cmd/sev-es.conf.cmd              |   2 +-
>  src/test/cfg2cmd/sev-std.conf                 |   2 +-
>  src/test/cfg2cmd/sev-std.conf.cmd             |   2 +-
>  src/test/cfg2cmd/simple-backingchain.conf     |  16 +-
>  src/test/cfg2cmd/simple-backingchain.conf.cmd |   4 +-
>  .../simple-balloon-free-page-reporting.conf   |   2 +-
>  ...imple-balloon-free-page-reporting.conf.cmd |   2 +-
>  src/test/cfg2cmd/simple-btrfs.conf            |   8 +-
>  src/test/cfg2cmd/simple-btrfs.conf.cmd        |   8 +-
>  src/test/cfg2cmd/simple-cifs.conf             |   8 +-
>  src/test/cfg2cmd/simple-cifs.conf.cmd         |   8 +-
>  src/test/cfg2cmd/simple-lvm.conf              |   8 +-
>  src/test/cfg2cmd/simple-lvm.conf.cmd          |   8 +-
>  src/test/cfg2cmd/simple-lvmthin.conf          |   8 +-
>  src/test/cfg2cmd/simple-lvmthin.conf.cmd      |   8 +-
>  src/test/cfg2cmd/simple-rbd.conf              |  16 +-
>  src/test/cfg2cmd/simple-rbd.conf.cmd          |  16 +-
>  src/test/cfg2cmd/simple-virtio-blk.conf       |   2 +-
>  src/test/cfg2cmd/simple-virtio-blk.conf.cmd   |   2 +-
>  src/test/cfg2cmd/simple-zfs-over-iscsi.conf   |   8 +-
>  src/test/cfg2cmd/simple1.conf                 |   2 +-
>  src/test/cfg2cmd/simple1.conf.cmd             |   2 +-
>  .../unsupported-storage-content-type.conf     |   2 +-
>  .../cloudinit-snapshot.conf                   |   6 +-
>  .../duplicate-sections.conf                   |   6 +-
>  .../unknown-sections.conf                     |   6 +-
>  .../verify-snapshot.conf                      |   6 +-
>  .../cloudinit-snapshot.conf                   |   6 +-
>  .../duplicate-sections.conf                   |   8 +-
>  .../parse-config-input/fleecing-section.conf  |   4 +-
>  src/test/parse-config-input/locked.conf       |   4 +-
>  src/test/parse-config-input/plain.conf        |   2 +-
>  .../parse-config-input/regular-vm-efi.conf    |   4 +-
>  src/test/parse-config-input/sections.conf     |   6 +-
>  src/test/parse-config-input/snapshots.conf    |  56 ++---
>  .../parse-config-input/unknown-sections.conf  |   6 +-
>  .../parse-config-input/verify-snapshot.conf   |   6 +-
>  src/test/restore-config-expected/139.conf     |   4 +-
>  src/test/restore-config-expected/142.conf     |   2 +-
>  src/test/restore-config-expected/1422.conf    |   2 +-
>  src/test/restore-config-expected/179.conf     |  10 +-
>  src/test/restore-config-input/139.conf        |   4 +-
>  src/test/restore-config-input/142.conf        |   2 +-
>  src/test/restore-config-input/1422.conf       |   4 +-
>  src/test/restore-config-input/179.conf        |  10 +-
>  src/test/run_config2command_tests.pl          |  12 +-
>  src/test/run_qemu_img_convert_tests.pl        | 160 +++++++-------
>  src/test/run_qemu_migrate_tests.pl            | 204 +++++++++---------
>  src/test/test_get_replicatable_volumes.pl     |  40 ++--
>  101 files changed, 454 insertions(+), 454 deletions(-)
>
> diff --git a/src/test/cfg2cmd/aio.conf b/src/test/cfg2cmd/aio.conf
> index d83c23d7..b4b57038 100644
> --- a/src/test/cfg2cmd/aio.conf
> +++ b/src/test/cfg2cmd/aio.conf
> @@ -1,14 +1,14 @@
> -scsi0: local:8006/vm-8006-disk-0.raw,discard=on,size=104858K,aio=threads
> -scsi1: local:8006/vm-8006-disk-1.raw,discard=on,size=104858K,aio=native
> -scsi2: local:8006/vm-8006-disk-2.raw,discard=on,size=104858K,aio=io_uring
> -scsi3: local:8006/vm-8006-disk-3.raw,discard=on,size=104858K
> -scsi4: cifs-store:8006/vm-8006-disk-4.raw,discard=on,size=104858K
> -scsi5: cifs-store:8006/vm-8006-disk-5.raw,discard=on,size=104858K,aio=io_uring
> -scsi6: krbd-store:vm-8006-disk-6,discard=on,size=104858K
> -scsi7: krbd-store:vm-8006-disk-7,discard=on,size=104858K,aio=io_uring
> -scsi8: krbd-store:vm-8006-disk-8,discard=on,size=104858K,cache=writeback
> -scsi9: krbd-store:vm-8006-disk-9,discard=on,size=104858K,cache=writeback,aio=io_uring
> -scsi10: rbd-store:vm-8006-disk-8,discard=on,size=104858K
> -scsi11: rbd-store:vm-8006-disk-8,discard=on,size=104858K,aio=io_uring
> -scsi12: lvm-store:vm-8006-disk-9,discard=on,size=104858K
> -scsi13: lvm-store:vm-8006-disk-9,discard=on,size=104858K,aio=io_uring
> +scsi0: local:8006/vol-vm-8006-disk-0.raw,discard=on,size=104858K,aio=threads
> +scsi1: local:8006/vol-vm-8006-disk-1.raw,discard=on,size=104858K,aio=native
> +scsi2: local:8006/vol-vm-8006-disk-2.raw,discard=on,size=104858K,aio=io_uring
> +scsi3: local:8006/vol-vm-8006-disk-3.raw,discard=on,size=104858K
> +scsi4: cifs-store:8006/vol-vm-8006-disk-4.raw,discard=on,size=104858K
> +scsi5: cifs-store:8006/vol-vm-8006-disk-5.raw,discard=on,size=104858K,aio=io_uring
> +scsi6: krbd-store:vol-vm-8006-disk-6,discard=on,size=104858K
> +scsi7: krbd-store:vol-vm-8006-disk-7,discard=on,size=104858K,aio=io_uring
> +scsi8: krbd-store:vol-vm-8006-disk-8,discard=on,size=104858K,cache=writeback
> +scsi9: krbd-store:vol-vm-8006-disk-9,discard=on,size=104858K,cache=writeback,aio=io_uring
> +scsi10: rbd-store:vol-vm-8006-disk-8,discard=on,size=104858K
> +scsi11: rbd-store:vol-vm-8006-disk-8,discard=on,size=104858K,aio=io_uring
> +scsi12: lvm-store:vol-vm-8006-disk-9,discard=on,size=104858K
> +scsi13: lvm-store:vol-vm-8006-disk-9,discard=on,size=104858K,aio=io_uring
> diff --git a/src/test/cfg2cmd/aio.conf.cmd b/src/test/cfg2cmd/aio.conf.cmd
> index fbeccc9f..7544b1db 100644
> --- a/src/test/cfg2cmd/aio.conf.cmd
> +++ b/src/test/cfg2cmd/aio.conf.cmd
> @@ -38,33 +38,33 @@
>    -device 'virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3,free-page-reporting=on' \
>    -iscsi 'initiator-name=iqn.1993-08.org.debian:01:aabbccddeeff' \
>    -device 'lsi,id=scsihw0,bus=pci.0,addr=0x5' \
> -  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"threads","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/var/lib/vz/images/8006/vm-8006-disk-0.raw","node-name":"e3b2553803d55d43b9986a0aac3e9a7","read-only":false},"node-name":"f3b2553803d55d43b9986a0aac3e9a7","read-only":false},"node-name":"drive-scsi0","read-only":false,"throttle-group":"throttle-drive-scsi0"}' \
> +  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"threads","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/var/lib/vz/vms/8006/vol-vm-8006-disk-0.raw","node-name":"e3b2553803d55d43b9986a0aac3e9a7","read-only":false},"node-name":"f3b2553803d55d43b9986a0aac3e9a7","read-only":false},"node-name":"drive-scsi0","read-only":false,"throttle-group":"throttle-drive-scsi0"}' \
>    -device 'scsi-hd,bus=scsihw0.0,scsi-id=0,drive=drive-scsi0,id=scsi0,device_id=drive-scsi0,write-cache=on' \
> -  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"native","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/var/lib/vz/images/8006/vm-8006-disk-1.raw","node-name":"e08707d013893852b3d4d42301a4298","read-only":false},"node-name":"f08707d013893852b3d4d42301a4298","read-only":false},"node-name":"drive-scsi1","read-only":false,"throttle-group":"throttle-drive-scsi1"}' \
> +  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"native","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/var/lib/vz/vms/8006/vol-vm-8006-disk-1.raw","node-name":"e08707d013893852b3d4d42301a4298","read-only":false},"node-name":"f08707d013893852b3d4d42301a4298","read-only":false},"node-name":"drive-scsi1","read-only":false,"throttle-group":"throttle-drive-scsi1"}' \
>    -device 'scsi-hd,bus=scsihw0.0,scsi-id=1,drive=drive-scsi1,id=scsi1,device_id=drive-scsi1,write-cache=on' \
> -  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/var/lib/vz/images/8006/vm-8006-disk-2.raw","node-name":"edb0854bba55e8b2544ad937c9f5afc","read-only":false},"node-name":"fdb0854bba55e8b2544ad937c9f5afc","read-only":false},"node-name":"drive-scsi2","read-only":false,"throttle-group":"throttle-drive-scsi2"}' \
> +  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/var/lib/vz/vms/8006/vol-vm-8006-disk-2.raw","node-name":"edb0854bba55e8b2544ad937c9f5afc","read-only":false},"node-name":"fdb0854bba55e8b2544ad937c9f5afc","read-only":false},"node-name":"drive-scsi2","read-only":false,"throttle-group":"throttle-drive-scsi2"}' \
>    -device 'scsi-hd,bus=scsihw0.0,scsi-id=2,drive=drive-scsi2,id=scsi2,device_id=drive-scsi2,write-cache=on' \
> -  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/var/lib/vz/images/8006/vm-8006-disk-3.raw","node-name":"e9c170cb9491763cad3f31718205efc","read-only":false},"node-name":"f9c170cb9491763cad3f31718205efc","read-only":false},"node-name":"drive-scsi3","read-only":false,"throttle-group":"throttle-drive-scsi3"}' \
> +  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/var/lib/vz/vms/8006/vol-vm-8006-disk-3.raw","node-name":"e9c170cb9491763cad3f31718205efc","read-only":false},"node-name":"f9c170cb9491763cad3f31718205efc","read-only":false},"node-name":"drive-scsi3","read-only":false,"throttle-group":"throttle-drive-scsi3"}' \
>    -device 'scsi-hd,bus=scsihw0.0,scsi-id=3,drive=drive-scsi3,id=scsi3,device_id=drive-scsi3,write-cache=on' \
> -  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"native","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/mnt/pve/cifs-store/images/8006/vm-8006-disk-4.raw","node-name":"ea34ecc24c40da0d53420ef344ced37","read-only":false},"node-name":"fa34ecc24c40da0d53420ef344ced37","read-only":false},"node-name":"drive-scsi4","read-only":false,"throttle-group":"throttle-drive-scsi4"}' \
> +  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"native","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/mnt/pve/cifs-store/vms/8006/vol-vm-8006-disk-4.raw","node-name":"ea34ecc24c40da0d53420ef344ced37","read-only":false},"node-name":"fa34ecc24c40da0d53420ef344ced37","read-only":false},"node-name":"drive-scsi4","read-only":false,"throttle-group":"throttle-drive-scsi4"}' \
>    -device 'scsi-hd,bus=scsihw0.0,scsi-id=4,drive=drive-scsi4,id=scsi4,device_id=drive-scsi4,write-cache=on' \
> -  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/mnt/pve/cifs-store/images/8006/vm-8006-disk-5.raw","node-name":"e39cacf47a4f4877072601505d90949","read-only":false},"node-name":"f39cacf47a4f4877072601505d90949","read-only":false},"node-name":"drive-scsi5","read-only":false,"throttle-group":"throttle-drive-scsi5"}' \
> +  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/mnt/pve/cifs-store/vms/8006/vol-vm-8006-disk-5.raw","node-name":"e39cacf47a4f4877072601505d90949","read-only":false},"node-name":"f39cacf47a4f4877072601505d90949","read-only":false},"node-name":"drive-scsi5","read-only":false,"throttle-group":"throttle-drive-scsi5"}' \
>    -device 'scsi-hd,bus=scsihw0.0,scsi-id=5,drive=drive-scsi5,id=scsi5,device_id=drive-scsi5,write-cache=on' \
> -  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"host_device","filename":"/dev/rbd-pve/fc4181a6-56eb-4f68-b452-8ba1f381ca2a/cpool/vm-8006-disk-6","node-name":"e7db1ee70981087e4a2861bc7da417b","read-only":false},"node-name":"f7db1ee70981087e4a2861bc7da417b","read-only":false},"node-name":"drive-scsi6","read-only":false,"throttle-group":"throttle-drive-scsi6"}' \
> +  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"host_device","filename":"/dev/rbd-pve/fc4181a6-56eb-4f68-b452-8ba1f381ca2a/cpool/vol-vm-8006-disk-6","node-name":"e7db1ee70981087e4a2861bc7da417b","read-only":false},"node-name":"f7db1ee70981087e4a2861bc7da417b","read-only":false},"node-name":"drive-scsi6","read-only":false,"throttle-group":"throttle-drive-scsi6"}' \
>    -device 'scsi-hd,bus=scsihw0.0,scsi-id=6,drive=drive-scsi6,id=scsi6,device_id=drive-scsi6,write-cache=on' \
>    -device 'lsi,id=scsihw1,bus=pci.0,addr=0x6' \
> -  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"host_device","filename":"/dev/rbd-pve/fc4181a6-56eb-4f68-b452-8ba1f381ca2a/cpool/vm-8006-disk-7","node-name":"e2d2deac808301140a96c862fe3ea85","read-only":false},"node-name":"f2d2deac808301140a96c862fe3ea85","read-only":false},"node-name":"drive-scsi7","read-only":false,"throttle-group":"throttle-drive-scsi7"}' \
> +  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"host_device","filename":"/dev/rbd-pve/fc4181a6-56eb-4f68-b452-8ba1f381ca2a/cpool/vol-vm-8006-disk-7","node-name":"e2d2deac808301140a96c862fe3ea85","read-only":false},"node-name":"f2d2deac808301140a96c862fe3ea85","read-only":false},"node-name":"drive-scsi7","read-only":false,"throttle-group":"throttle-drive-scsi7"}' \
>    -device 'scsi-hd,bus=scsihw1.0,scsi-id=0,drive=drive-scsi7,id=scsi7,device_id=drive-scsi7,write-cache=on' \
> -  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"threads","cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"host_device","filename":"/dev/rbd-pve/fc4181a6-56eb-4f68-b452-8ba1f381ca2a/cpool/vm-8006-disk-8","node-name":"e9796b73db57b8943746ede7d0d3060","read-only":false},"node-name":"f9796b73db57b8943746ede7d0d3060","read-only":false},"node-name":"drive-scsi8","read-only":false,"throttle-group":"throttle-drive-scsi8"}' \
> +  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"threads","cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"host_device","filename":"/dev/rbd-pve/fc4181a6-56eb-4f68-b452-8ba1f381ca2a/cpool/vol-vm-8006-disk-8","node-name":"e9796b73db57b8943746ede7d0d3060","read-only":false},"node-name":"f9796b73db57b8943746ede7d0d3060","read-only":false},"node-name":"drive-scsi8","read-only":false,"throttle-group":"throttle-drive-scsi8"}' \
>    -device 'scsi-hd,bus=scsihw1.0,scsi-id=1,drive=drive-scsi8,id=scsi8,device_id=drive-scsi8,write-cache=on' \
> -  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"io_uring","cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"host_device","filename":"/dev/rbd-pve/fc4181a6-56eb-4f68-b452-8ba1f381ca2a/cpool/vm-8006-disk-9","node-name":"efa538892acc012edbdc5810035bf7d","read-only":false},"node-name":"ffa538892acc012edbdc5810035bf7d","read-only":false},"node-name":"drive-scsi9","read-only":false,"throttle-group":"throttle-drive-scsi9"}' \
> +  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"io_uring","cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"host_device","filename":"/dev/rbd-pve/fc4181a6-56eb-4f68-b452-8ba1f381ca2a/cpool/vol-vm-8006-disk-9","node-name":"efa538892acc012edbdc5810035bf7d","read-only":false},"node-name":"ffa538892acc012edbdc5810035bf7d","read-only":false},"node-name":"drive-scsi9","read-only":false,"throttle-group":"throttle-drive-scsi9"}' \
>    -device 'scsi-hd,bus=scsihw1.0,scsi-id=2,drive=drive-scsi9,id=scsi9,device_id=drive-scsi9,write-cache=on' \
> -  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"auth-client-required":["none"],"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"rbd","image":"vm-8006-disk-8","node-name":"e6f4cbffa741d16bba69304eb2800ef","pool":"cpool","read-only":false,"server":[{"host":"127.0.0.42","port":"3300"},{"host":"127.0.0.21","port":"3300"},{"host":"::1","port":"3300"}]},"node-name":"f6f4cbffa741d16bba69304eb2800ef","read-only":false},"node-name":"drive-scsi10","read-only":false,"throttle-group":"throttle-drive-scsi10"}' \
> +  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"auth-client-required":["none"],"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"rbd","image":"vol-vm-8006-disk-8","node-name":"e6f4cbffa741d16bba69304eb2800ef","pool":"cpool","read-only":false,"server":[{"host":"127.0.0.42","port":"3300"},{"host":"127.0.0.21","port":"3300"},{"host":"::1","port":"3300"}]},"node-name":"f6f4cbffa741d16bba69304eb2800ef","read-only":false},"node-name":"drive-scsi10","read-only":false,"throttle-group":"throttle-drive-scsi10"}' \
>    -device 'scsi-hd,bus=scsihw1.0,scsi-id=3,drive=drive-scsi10,id=scsi10,device_id=drive-scsi10,write-cache=on' \
> -  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"auth-client-required":["none"],"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"rbd","image":"vm-8006-disk-8","node-name":"e42375c54de70f5f4be966d98c90255","pool":"cpool","read-only":false,"server":[{"host":"127.0.0.42","port":"3300"},{"host":"127.0.0.21","port":"3300"},{"host":"::1","port":"3300"}]},"node-name":"f42375c54de70f5f4be966d98c90255","read-only":false},"node-name":"drive-scsi11","read-only":false,"throttle-group":"throttle-drive-scsi11"}' \
> +  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"auth-client-required":["none"],"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"rbd","image":"vol-vm-8006-disk-8","node-name":"e42375c54de70f5f4be966d98c90255","pool":"cpool","read-only":false,"server":[{"host":"127.0.0.42","port":"3300"},{"host":"127.0.0.21","port":"3300"},{"host":"::1","port":"3300"}]},"node-name":"f42375c54de70f5f4be966d98c90255","read-only":false},"node-name":"drive-scsi11","read-only":false,"throttle-group":"throttle-drive-scsi11"}' \
>    -device 'scsi-hd,bus=scsihw1.0,scsi-id=4,drive=drive-scsi11,id=scsi11,device_id=drive-scsi11,write-cache=on' \
> -  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"native","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"host_device","filename":"/dev/veegee/vm-8006-disk-9","node-name":"ed7b2c9e0133619fcf6cb8ce5903502","read-only":false},"node-name":"fd7b2c9e0133619fcf6cb8ce5903502","read-only":false},"node-name":"drive-scsi12","read-only":false,"throttle-group":"throttle-drive-scsi12"}' \
> +  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"native","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"host_device","filename":"/dev/veegee/vol-vm-8006-disk-9","node-name":"ed7b2c9e0133619fcf6cb8ce5903502","read-only":false},"node-name":"fd7b2c9e0133619fcf6cb8ce5903502","read-only":false},"node-name":"drive-scsi12","read-only":false,"throttle-group":"throttle-drive-scsi12"}' \
>    -device 'scsi-hd,bus=scsihw1.0,scsi-id=5,drive=drive-scsi12,id=scsi12,device_id=drive-scsi12,write-cache=on' \
> -  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"host_device","filename":"/dev/veegee/vm-8006-disk-9","node-name":"ed85420a880203ca1401d00a8edf132","read-only":false},"node-name":"fd85420a880203ca1401d00a8edf132","read-only":false},"node-name":"drive-scsi13","read-only":false,"throttle-group":"throttle-drive-scsi13"}' \
> +  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"host_device","filename":"/dev/veegee/vol-vm-8006-disk-9","node-name":"ed85420a880203ca1401d00a8edf132","read-only":false},"node-name":"fd85420a880203ca1401d00a8edf132","read-only":false},"node-name":"drive-scsi13","read-only":false,"throttle-group":"throttle-drive-scsi13"}' \
>    -device 'scsi-hd,bus=scsihw1.0,scsi-id=6,drive=drive-scsi13,id=scsi13,device_id=drive-scsi13,write-cache=on' \
>    -machine 'type=pc+pve0'
> diff --git a/src/test/cfg2cmd/bootorder-empty.conf b/src/test/cfg2cmd/bootorder-empty.conf
> index ccfadb9f..0f6934a8 100644
> --- a/src/test/cfg2cmd/bootorder-empty.conf
> +++ b/src/test/cfg2cmd/bootorder-empty.conf
> @@ -7,9 +7,9 @@ name: simple
>  net0: virtio=A2:C0:43:77:08:A0,bridge=vmbr0
>  numa: 0
>  ostype: l26
> -scsi4: local:8006/vm-8006-disk-0.qcow2,discard=on,size=104858K
> +scsi4: local:8006/vol-vm-8006-disk-0.qcow2,discard=on,size=104858K
>  smbios1: uuid=7b10d7af-b932-4c66-b2c3-3996152ec465
>  sockets: 1
> -virtio0: local:8006/vm-8006-disk-0.qcow2,discard=on,iothread=1,size=104858K
> -virtio1: local:8006/vm-8006-disk-0.qcow2,discard=on,iothread=1,size=104858K
> +virtio0: local:8006/vol-vm-8006-disk-0.qcow2,discard=on,iothread=1,size=104858K
> +virtio1: local:8006/vol-vm-8006-disk-0.qcow2,discard=on,iothread=1,size=104858K
>  vmgenid: c773c261-d800-4348-9f5d-167fadd53cf8
> diff --git a/src/test/cfg2cmd/bootorder-empty.conf.cmd b/src/test/cfg2cmd/bootorder-empty.conf.cmd
> index 3516b344..b53e303b 100644
> --- a/src/test/cfg2cmd/bootorder-empty.conf.cmd
> +++ b/src/test/cfg2cmd/bootorder-empty.conf.cmd
> @@ -32,11 +32,11 @@
>    -iscsi 'initiator-name=iqn.1993-08.org.debian:01:aabbccddeeff' \
>    -device 'ide-cd,bus=ide.1,unit=0,id=ide2' \
>    -device 'lsi,id=scsihw0,bus=pci.0,addr=0x5' \
> -  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/var/lib/vz/images/8006/vm-8006-disk-0.qcow2","node-name":"e6bf62e20f6c14a2c19bd6f1f5ac36c","read-only":false},"node-name":"f6bf62e20f6c14a2c19bd6f1f5ac36c","read-only":false},"node-name":"drive-scsi4","read-only":false,"throttle-group":"throttle-drive-scsi4"}' \
> +  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/var/lib/vz/vms/8006/vol-vm-8006-disk-0.qcow2","node-name":"e6bf62e20f6c14a2c19bd6f1f5ac36c","read-only":false},"node-name":"f6bf62e20f6c14a2c19bd6f1f5ac36c","read-only":false},"node-name":"drive-scsi4","read-only":false,"throttle-group":"throttle-drive-scsi4"}' \
>    -device 'scsi-hd,bus=scsihw0.0,scsi-id=4,drive=drive-scsi4,id=scsi4,device_id=drive-scsi4,write-cache=on' \
> -  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/var/lib/vz/images/8006/vm-8006-disk-0.qcow2","node-name":"edd19f6c1b3a6d5a6248c3376a91a16","read-only":false},"node-name":"fdd19f6c1b3a6d5a6248c3376a91a16","read-only":false},"node-name":"drive-virtio0","read-only":false,"throttle-group":"throttle-drive-virtio0"}' \
> +  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/var/lib/vz/vms/8006/vol-vm-8006-disk-0.qcow2","node-name":"edd19f6c1b3a6d5a6248c3376a91a16","read-only":false},"node-name":"fdd19f6c1b3a6d5a6248c3376a91a16","read-only":false},"node-name":"drive-virtio0","read-only":false,"throttle-group":"throttle-drive-virtio0"}' \
>    -device 'virtio-blk-pci,drive=drive-virtio0,id=virtio0,bus=pci.0,addr=0xa,iothread=iothread-virtio0,write-cache=on' \
> -  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/var/lib/vz/images/8006/vm-8006-disk-0.qcow2","node-name":"eeb683fb9c516c1a8707c917f0d7a38","read-only":false},"node-name":"feb683fb9c516c1a8707c917f0d7a38","read-only":false},"node-name":"drive-virtio1","read-only":false,"throttle-group":"throttle-drive-virtio1"}' \
> +  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/var/lib/vz/vms/8006/vol-vm-8006-disk-0.qcow2","node-name":"eeb683fb9c516c1a8707c917f0d7a38","read-only":false},"node-name":"feb683fb9c516c1a8707c917f0d7a38","read-only":false},"node-name":"drive-virtio1","read-only":false,"throttle-group":"throttle-drive-virtio1"}' \
>    -device 'virtio-blk-pci,drive=drive-virtio1,id=virtio1,bus=pci.0,addr=0xb,iothread=iothread-virtio1,write-cache=on' \
>    -netdev 'type=tap,id=net0,ifname=tap8006i0,script=/usr/libexec/qemu-server/pve-bridge,downscript=/usr/libexec/qemu-server/pve-bridgedown,vhost=on' \
>    -device 'virtio-net-pci,mac=A2:C0:43:77:08:A0,netdev=net0,bus=pci.0,addr=0x12,id=net0,rx_queue_size=1024,tx_queue_size=256' \
> diff --git a/src/test/cfg2cmd/bootorder-legacy.conf b/src/test/cfg2cmd/bootorder-legacy.conf
> index 4e59268b..da521616 100644
> --- a/src/test/cfg2cmd/bootorder-legacy.conf
> +++ b/src/test/cfg2cmd/bootorder-legacy.conf
> @@ -8,9 +8,9 @@ name: simple
>  net0: virtio=A2:C0:43:77:08:A0,bridge=vmbr0
>  numa: 0
>  ostype: l26
> -scsi4: local:8006/vm-8006-disk-0.qcow2,discard=on,size=104858K
> +scsi4: local:8006/vol-vm-8006-disk-0.qcow2,discard=on,size=104858K
>  smbios1: uuid=7b10d7af-b932-4c66-b2c3-3996152ec465
>  sockets: 1
> -virtio0: local:8006/vm-8006-disk-0.qcow2,discard=on,iothread=1,size=104858K
> -virtio1: local:8006/vm-8006-disk-0.qcow2,discard=on,iothread=1,size=104858K
> +virtio0: local:8006/vol-vm-8006-disk-0.qcow2,discard=on,iothread=1,size=104858K
> +virtio1: local:8006/vol-vm-8006-disk-0.qcow2,discard=on,iothread=1,size=104858K
>  vmgenid: c773c261-d800-4348-9f5d-167fadd53cf8
> diff --git a/src/test/cfg2cmd/bootorder-legacy.conf.cmd b/src/test/cfg2cmd/bootorder-legacy.conf.cmd
> index c86ab6f9..85b2ec50 100644
> --- a/src/test/cfg2cmd/bootorder-legacy.conf.cmd
> +++ b/src/test/cfg2cmd/bootorder-legacy.conf.cmd
> @@ -32,11 +32,11 @@
>    -iscsi 'initiator-name=iqn.1993-08.org.debian:01:aabbccddeeff' \
>    -device 'ide-cd,bus=ide.1,unit=0,id=ide2,bootindex=200' \
>    -device 'lsi,id=scsihw0,bus=pci.0,addr=0x5' \
> -  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/var/lib/vz/images/8006/vm-8006-disk-0.qcow2","node-name":"e6bf62e20f6c14a2c19bd6f1f5ac36c","read-only":false},"node-name":"f6bf62e20f6c14a2c19bd6f1f5ac36c","read-only":false},"node-name":"drive-scsi4","read-only":false,"throttle-group":"throttle-drive-scsi4"}' \
> +  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/var/lib/vz/vms/8006/vol-vm-8006-disk-0.qcow2","node-name":"e6bf62e20f6c14a2c19bd6f1f5ac36c","read-only":false},"node-name":"f6bf62e20f6c14a2c19bd6f1f5ac36c","read-only":false},"node-name":"drive-scsi4","read-only":false,"throttle-group":"throttle-drive-scsi4"}' \
>    -device 'scsi-hd,bus=scsihw0.0,scsi-id=4,drive=drive-scsi4,id=scsi4,device_id=drive-scsi4,write-cache=on' \
> -  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/var/lib/vz/images/8006/vm-8006-disk-0.qcow2","node-name":"edd19f6c1b3a6d5a6248c3376a91a16","read-only":false},"node-name":"fdd19f6c1b3a6d5a6248c3376a91a16","read-only":false},"node-name":"drive-virtio0","read-only":false,"throttle-group":"throttle-drive-virtio0"}' \
> +  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/var/lib/vz/vms/8006/vol-vm-8006-disk-0.qcow2","node-name":"edd19f6c1b3a6d5a6248c3376a91a16","read-only":false},"node-name":"fdd19f6c1b3a6d5a6248c3376a91a16","read-only":false},"node-name":"drive-virtio0","read-only":false,"throttle-group":"throttle-drive-virtio0"}' \
>    -device 'virtio-blk-pci,drive=drive-virtio0,id=virtio0,bus=pci.0,addr=0xa,iothread=iothread-virtio0,write-cache=on' \
> -  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/var/lib/vz/images/8006/vm-8006-disk-0.qcow2","node-name":"eeb683fb9c516c1a8707c917f0d7a38","read-only":false},"node-name":"feb683fb9c516c1a8707c917f0d7a38","read-only":false},"node-name":"drive-virtio1","read-only":false,"throttle-group":"throttle-drive-virtio1"}' \
> +  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/var/lib/vz/vms/8006/vol-vm-8006-disk-0.qcow2","node-name":"eeb683fb9c516c1a8707c917f0d7a38","read-only":false},"node-name":"feb683fb9c516c1a8707c917f0d7a38","read-only":false},"node-name":"drive-virtio1","read-only":false,"throttle-group":"throttle-drive-virtio1"}' \
>    -device 'virtio-blk-pci,drive=drive-virtio1,id=virtio1,bus=pci.0,addr=0xb,iothread=iothread-virtio1,bootindex=302,write-cache=on' \
>    -netdev 'type=tap,id=net0,ifname=tap8006i0,script=/usr/libexec/qemu-server/pve-bridge,downscript=/usr/libexec/qemu-server/pve-bridgedown,vhost=on' \
>    -device 'virtio-net-pci,mac=A2:C0:43:77:08:A0,netdev=net0,bus=pci.0,addr=0x12,id=net0,rx_queue_size=1024,tx_queue_size=256,bootindex=100' \
> diff --git a/src/test/cfg2cmd/bootorder.conf b/src/test/cfg2cmd/bootorder.conf
> index 7991065d..edd7c4fd 100644
> --- a/src/test/cfg2cmd/bootorder.conf
> +++ b/src/test/cfg2cmd/bootorder.conf
> @@ -7,9 +7,9 @@ name: simple
>  net0: virtio=A2:C0:43:77:08:A0,bridge=vmbr0
>  numa: 0
>  ostype: l26
> -scsi4: local:8006/vm-8006-disk-0.qcow2,discard=on,size=104858K
> +scsi4: local:8006/vol-vm-8006-disk-0.qcow2,discard=on,size=104858K
>  smbios1: uuid=7b10d7af-b932-4c66-b2c3-3996152ec465
>  sockets: 1
> -virtio0: local:8006/vm-8006-disk-0.qcow2,discard=on,iothread=1,size=104858K
> -virtio1: local:8006/vm-8006-disk-0.qcow2,discard=on,iothread=1,size=104858K
> +virtio0: local:8006/vol-vm-8006-disk-0.qcow2,discard=on,iothread=1,size=104858K
> +virtio1: local:8006/vol-vm-8006-disk-0.qcow2,discard=on,iothread=1,size=104858K
>  vmgenid: c773c261-d800-4348-9f5d-167fadd53cf8
> diff --git a/src/test/cfg2cmd/bootorder.conf.cmd b/src/test/cfg2cmd/bootorder.conf.cmd
> index 48f9da8b..78e6c51b 100644
> --- a/src/test/cfg2cmd/bootorder.conf.cmd
> +++ b/src/test/cfg2cmd/bootorder.conf.cmd
> @@ -32,11 +32,11 @@
>    -iscsi 'initiator-name=iqn.1993-08.org.debian:01:aabbccddeeff' \
>    -device 'ide-cd,bus=ide.1,unit=0,id=ide2,bootindex=103' \
>    -device 'lsi,id=scsihw0,bus=pci.0,addr=0x5' \
> -  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/var/lib/vz/images/8006/vm-8006-disk-0.qcow2","node-name":"e6bf62e20f6c14a2c19bd6f1f5ac36c","read-only":false},"node-name":"f6bf62e20f6c14a2c19bd6f1f5ac36c","read-only":false},"node-name":"drive-scsi4","read-only":false,"throttle-group":"throttle-drive-scsi4"}' \
> +  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/var/lib/vz/vms/8006/vol-vm-8006-disk-0.qcow2","node-name":"e6bf62e20f6c14a2c19bd6f1f5ac36c","read-only":false},"node-name":"f6bf62e20f6c14a2c19bd6f1f5ac36c","read-only":false},"node-name":"drive-scsi4","read-only":false,"throttle-group":"throttle-drive-scsi4"}' \
>    -device 'scsi-hd,bus=scsihw0.0,scsi-id=4,drive=drive-scsi4,id=scsi4,device_id=drive-scsi4,bootindex=102,write-cache=on' \
> -  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/var/lib/vz/images/8006/vm-8006-disk-0.qcow2","node-name":"edd19f6c1b3a6d5a6248c3376a91a16","read-only":false},"node-name":"fdd19f6c1b3a6d5a6248c3376a91a16","read-only":false},"node-name":"drive-virtio0","read-only":false,"throttle-group":"throttle-drive-virtio0"}' \
> +  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/var/lib/vz/vms/8006/vol-vm-8006-disk-0.qcow2","node-name":"edd19f6c1b3a6d5a6248c3376a91a16","read-only":false},"node-name":"fdd19f6c1b3a6d5a6248c3376a91a16","read-only":false},"node-name":"drive-virtio0","read-only":false,"throttle-group":"throttle-drive-virtio0"}' \
>    -device 'virtio-blk-pci,drive=drive-virtio0,id=virtio0,bus=pci.0,addr=0xa,iothread=iothread-virtio0,write-cache=on' \
> -  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/var/lib/vz/images/8006/vm-8006-disk-0.qcow2","node-name":"eeb683fb9c516c1a8707c917f0d7a38","read-only":false},"node-name":"feb683fb9c516c1a8707c917f0d7a38","read-only":false},"node-name":"drive-virtio1","read-only":false,"throttle-group":"throttle-drive-virtio1"}' \
> +  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/var/lib/vz/vms/8006/vol-vm-8006-disk-0.qcow2","node-name":"eeb683fb9c516c1a8707c917f0d7a38","read-only":false},"node-name":"feb683fb9c516c1a8707c917f0d7a38","read-only":false},"node-name":"drive-virtio1","read-only":false,"throttle-group":"throttle-drive-virtio1"}' \
>    -device 'virtio-blk-pci,drive=drive-virtio1,id=virtio1,bus=pci.0,addr=0xb,iothread=iothread-virtio1,bootindex=100,write-cache=on' \
>    -netdev 'type=tap,id=net0,ifname=tap8006i0,script=/usr/libexec/qemu-server/pve-bridge,downscript=/usr/libexec/qemu-server/pve-bridgedown,vhost=on' \
>    -device 'virtio-net-pci,mac=A2:C0:43:77:08:A0,netdev=net0,bus=pci.0,addr=0x12,id=net0,rx_queue_size=1024,tx_queue_size=256,bootindex=101' \
> diff --git a/src/test/cfg2cmd/efi-raw-old.conf b/src/test/cfg2cmd/efi-raw-old.conf
> index 621470ed..0437d2e6 100644
> --- a/src/test/cfg2cmd/efi-raw-old.conf
> +++ b/src/test/cfg2cmd/efi-raw-old.conf
> @@ -2,4 +2,4 @@
>  smbios1: uuid=7b10d7af-b932-4c66-b2c3-3996152ec465
>  bios: ovmf
>  machine: pc-i440fx-4.1+pve0
> -efidisk0: local:100/vm-100-disk-0.raw
> +efidisk0: local:100/vol-vm-100-disk-0.raw
> diff --git a/src/test/cfg2cmd/efi-raw-old.conf.cmd b/src/test/cfg2cmd/efi-raw-old.conf.cmd
> index b62967bd..14acfa6e 100644
> --- a/src/test/cfg2cmd/efi-raw-old.conf.cmd
> +++ b/src/test/cfg2cmd/efi-raw-old.conf.cmd
> @@ -10,7 +10,7 @@
>    -daemonize \
>    -smbios 'type=1,uuid=7b10d7af-b932-4c66-b2c3-3996152ec465' \
>    -drive 'if=pflash,unit=0,format=raw,readonly=on,file=/usr/share/pve-edk2-firmware//OVMF_CODE.fd' \
> -  -drive 'if=pflash,unit=1,id=drive-efidisk0,format=raw,file=/var/lib/vz/images/100/vm-100-disk-0.raw' \
> +  -drive 'if=pflash,unit=1,id=drive-efidisk0,format=raw,file=/var/lib/vz/vms/100/vol-vm-100-disk-0.raw' \
>    -smp '1,sockets=1,cores=1,maxcpus=1' \
>    -nodefaults \
>    -boot 'menu=on,strict=on,reboot-timeout=1000,splash=/usr/share/qemu-server/bootsplash.jpg' \
> diff --git a/src/test/cfg2cmd/efi-raw.conf b/src/test/cfg2cmd/efi-raw.conf
> index 37f0358f..5f7399be 100644
> --- a/src/test/cfg2cmd/efi-raw.conf
> +++ b/src/test/cfg2cmd/efi-raw.conf
> @@ -1,4 +1,4 @@
>  # TEST: Test raw efidisk size parameter
>  smbios1: uuid=7b10d7af-b932-4c66-b2c3-3996152ec465
>  bios: ovmf
> -efidisk0: local:100/vm-100-disk-0.raw
> +efidisk0: local:100/vol-vm-100-disk-0.raw
> diff --git a/src/test/cfg2cmd/efi-raw.conf.cmd b/src/test/cfg2cmd/efi-raw.conf.cmd
> index d3b2ec8c..74841d17 100644
> --- a/src/test/cfg2cmd/efi-raw.conf.cmd
> +++ b/src/test/cfg2cmd/efi-raw.conf.cmd
> @@ -11,7 +11,7 @@
>    -smbios 'type=1,uuid=7b10d7af-b932-4c66-b2c3-3996152ec465' \
>    -object '{"id":"throttle-drive-efidisk0","limits":{},"qom-type":"throttle-group"}' \
>    -blockdev '{"driver":"raw","file":{"driver":"file","filename":"/usr/share/pve-edk2-firmware//OVMF_CODE.fd"},"node-name":"pflash0","read-only":true}' \
> -  -blockdev '{"detect-zeroes":"on","discard":"ignore","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"raw","file":{"aio":"io_uring","cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"file","filename":"/var/lib/vz/images/100/vm-100-disk-0.raw","node-name":"e1175f2a490414e7c53337589fde17a","read-only":false},"node-name":"f1175f2a490414e7c53337589fde17a","read-only":false,"size":131072},"node-name":"drive-efidisk0","read-only":false,"throttle-group":"throttle-drive-efidisk0"}' \
> +  -blockdev '{"detect-zeroes":"on","discard":"ignore","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"raw","file":{"aio":"io_uring","cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"file","filename":"/var/lib/vz/vms/100/vol-vm-100-disk-0.raw","node-name":"e1175f2a490414e7c53337589fde17a","read-only":false},"node-name":"f1175f2a490414e7c53337589fde17a","read-only":false,"size":131072},"node-name":"drive-efidisk0","read-only":false,"throttle-group":"throttle-drive-efidisk0"}' \
>    -smp '1,sockets=1,cores=1,maxcpus=1' \
>    -nodefaults \
>    -boot 'menu=on,strict=on,reboot-timeout=1000,splash=/usr/share/qemu-server/bootsplash.jpg' \
> diff --git a/src/test/cfg2cmd/efi-secboot-and-tpm-q35.conf b/src/test/cfg2cmd/efi-secboot-and-tpm-q35.conf
> index 51e525b3..65ebec5f 100644
> --- a/src/test/cfg2cmd/efi-secboot-and-tpm-q35.conf
> +++ b/src/test/cfg2cmd/efi-secboot-and-tpm-q35.conf
> @@ -2,5 +2,5 @@
>  smbios1: uuid=7b10d7af-b932-4c66-b2c3-3996152ec465
>  bios: ovmf
>  machine: q35
> -efidisk0: local:100/vm-100-disk-0.raw,efitype=4m,pre-enrolled-keys=1,size=528K
> -tpmstate0: local:108/vm-100-disk-1.raw,size=4M,version=v2.0
> +efidisk0: local:100/vol-vm-100-disk-0.raw,efitype=4m,pre-enrolled-keys=1,size=528K
> +tpmstate0: local:108/vol-vm-100-disk-1.raw,size=4M,version=v2.0
> diff --git a/src/test/cfg2cmd/efi-secboot-and-tpm-q35.conf.cmd b/src/test/cfg2cmd/efi-secboot-and-tpm-q35.conf.cmd
> index 3d6279e9..905fd1b6 100644
> --- a/src/test/cfg2cmd/efi-secboot-and-tpm-q35.conf.cmd
> +++ b/src/test/cfg2cmd/efi-secboot-and-tpm-q35.conf.cmd
> @@ -11,7 +11,7 @@
>    -smbios 'type=1,uuid=7b10d7af-b932-4c66-b2c3-3996152ec465' \
>    -object '{"id":"throttle-drive-efidisk0","limits":{},"qom-type":"throttle-group"}' \
>    -blockdev '{"driver":"raw","file":{"driver":"file","filename":"/usr/share/pve-edk2-firmware//OVMF_CODE_4M.secboot.fd"},"node-name":"pflash0","read-only":true}' \
> -  -blockdev '{"detect-zeroes":"on","discard":"ignore","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"raw","file":{"aio":"io_uring","cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"file","filename":"/var/lib/vz/images/100/vm-100-disk-0.raw","node-name":"e1175f2a490414e7c53337589fde17a","read-only":false},"node-name":"f1175f2a490414e7c53337589fde17a","read-only":false,"size":540672},"node-name":"drive-efidisk0","read-only":false,"throttle-group":"throttle-drive-efidisk0"}' \
> +  -blockdev '{"detect-zeroes":"on","discard":"ignore","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"raw","file":{"aio":"io_uring","cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"file","filename":"/var/lib/vz/vms/100/vol-vm-100-disk-0.raw","node-name":"e1175f2a490414e7c53337589fde17a","read-only":false},"node-name":"f1175f2a490414e7c53337589fde17a","read-only":false,"size":540672},"node-name":"drive-efidisk0","read-only":false,"throttle-group":"throttle-drive-efidisk0"}' \
>    -smp '1,sockets=1,cores=1,maxcpus=1' \
>    -nodefaults \
>    -boot 'menu=on,strict=on,reboot-timeout=1000,splash=/usr/share/qemu-server/bootsplash.jpg' \
> diff --git a/src/test/cfg2cmd/efi-secboot-and-tpm.conf b/src/test/cfg2cmd/efi-secboot-and-tpm.conf
> index 4856b531..7dda3d14 100644
> --- a/src/test/cfg2cmd/efi-secboot-and-tpm.conf
> +++ b/src/test/cfg2cmd/efi-secboot-and-tpm.conf
> @@ -1,5 +1,5 @@
>  # TEST: Test newer 4MB efidisk with secureboot and a TPM device
>  smbios1: uuid=7b10d7af-b932-4c66-b2c3-3996152ec465
>  bios: ovmf
> -efidisk0: local:100/vm-100-disk-0.raw,efitype=4m,pre-enrolled-keys=1,size=528K
> -tpmstate0: local:108/vm-100-disk-1.raw,size=4M,version=v2.0
> +efidisk0: local:100/vol-vm-100-disk-0.raw,efitype=4m,pre-enrolled-keys=1,size=528K
> +tpmstate0: local:108/vol-vm-100-disk-1.raw,size=4M,version=v2.0
> diff --git a/src/test/cfg2cmd/efi-secboot-and-tpm.conf.cmd b/src/test/cfg2cmd/efi-secboot-and-tpm.conf.cmd
> index f705aa84..96d9c285 100644
> --- a/src/test/cfg2cmd/efi-secboot-and-tpm.conf.cmd
> +++ b/src/test/cfg2cmd/efi-secboot-and-tpm.conf.cmd
> @@ -11,7 +11,7 @@
>    -smbios 'type=1,uuid=7b10d7af-b932-4c66-b2c3-3996152ec465' \
>    -object '{"id":"throttle-drive-efidisk0","limits":{},"qom-type":"throttle-group"}' \
>    -blockdev '{"driver":"raw","file":{"driver":"file","filename":"/usr/share/pve-edk2-firmware//OVMF_CODE_4M.fd"},"node-name":"pflash0","read-only":true}' \
> -  -blockdev '{"detect-zeroes":"on","discard":"ignore","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"raw","file":{"aio":"io_uring","cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"file","filename":"/var/lib/vz/images/100/vm-100-disk-0.raw","node-name":"e1175f2a490414e7c53337589fde17a","read-only":false},"node-name":"f1175f2a490414e7c53337589fde17a","read-only":false,"size":540672},"node-name":"drive-efidisk0","read-only":false,"throttle-group":"throttle-drive-efidisk0"}' \
> +  -blockdev '{"detect-zeroes":"on","discard":"ignore","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"raw","file":{"aio":"io_uring","cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"file","filename":"/var/lib/vz/vms/100/vol-vm-100-disk-0.raw","node-name":"e1175f2a490414e7c53337589fde17a","read-only":false},"node-name":"f1175f2a490414e7c53337589fde17a","read-only":false,"size":540672},"node-name":"drive-efidisk0","read-only":false,"throttle-group":"throttle-drive-efidisk0"}' \
>    -smp '1,sockets=1,cores=1,maxcpus=1' \
>    -nodefaults \
>    -boot 'menu=on,strict=on,reboot-timeout=1000,splash=/usr/share/qemu-server/bootsplash.jpg' \
> diff --git a/src/test/cfg2cmd/efidisk-on-rbd.conf b/src/test/cfg2cmd/efidisk-on-rbd.conf
> index 1958fe61..d6d9361e 100644
> --- a/src/test/cfg2cmd/efidisk-on-rbd.conf
> +++ b/src/test/cfg2cmd/efidisk-on-rbd.conf
> @@ -2,7 +2,7 @@
>  bios: ovmf
>  bootdisk: scsi0
>  cores: 1
> -efidisk0: rbd-store:vm-100-disk-1,size=128K
> +efidisk0: rbd-store:vol-vm-100-disk-1,size=128K
>  memory: 512
>  net0: virtio=2E:01:68:F9:9C:87,bridge=vmbr0
>  numa: 1
> diff --git a/src/test/cfg2cmd/efidisk-on-rbd.conf.cmd b/src/test/cfg2cmd/efidisk-on-rbd.conf.cmd
> index 5d0c8aff..dcab512c 100644
> --- a/src/test/cfg2cmd/efidisk-on-rbd.conf.cmd
> +++ b/src/test/cfg2cmd/efidisk-on-rbd.conf.cmd
> @@ -11,7 +11,7 @@
>    -smbios 'type=1,uuid=3dd750ce-d910-44d0-9493-525c0be4e688' \
>    -object '{"id":"throttle-drive-efidisk0","limits":{},"qom-type":"throttle-group"}' \
>    -blockdev '{"driver":"raw","file":{"driver":"file","filename":"/usr/share/pve-edk2-firmware//OVMF_CODE.fd"},"node-name":"pflash0","read-only":true}' \
> -  -blockdev '{"detect-zeroes":"on","discard":"ignore","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"raw","file":{"auth-client-required":["none"],"cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"rbd","image":"vm-100-disk-1","node-name":"eeb8f022b5551ad1d795611f112c767","pool":"cpool","read-only":false,"server":[{"host":"127.0.0.42","port":"3300"},{"host":"127.0.0.21","port":"3300"},{"host":"::1","port":"3300"}]},"node-name":"feb8f022b5551ad1d795611f112c767","read-only":false,"size":131072},"node-name":"drive-efidisk0","read-only":false,"throttle-group":"throttle-drive-efidisk0"}' \
> +  -blockdev '{"detect-zeroes":"on","discard":"ignore","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"raw","file":{"auth-client-required":["none"],"cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"rbd","image":"vol-vm-100-disk-1","node-name":"eeb8f022b5551ad1d795611f112c767","pool":"cpool","read-only":false,"server":[{"host":"127.0.0.42","port":"3300"},{"host":"127.0.0.21","port":"3300"},{"host":"::1","port":"3300"}]},"node-name":"feb8f022b5551ad1d795611f112c767","read-only":false,"size":131072},"node-name":"drive-efidisk0","read-only":false,"throttle-group":"throttle-drive-efidisk0"}' \
>    -smp '1,sockets=1,cores=1,maxcpus=1' \
>    -nodefaults \
>    -boot 'menu=on,strict=on,reboot-timeout=1000,splash=/usr/share/qemu-server/bootsplash.jpg' \
> diff --git a/src/test/cfg2cmd/i440fx-win10-hostpci.conf b/src/test/cfg2cmd/i440fx-win10-hostpci.conf
> index 2ab2dda1..3585ce7e 100644
> --- a/src/test/cfg2cmd/i440fx-win10-hostpci.conf
> +++ b/src/test/cfg2cmd/i440fx-win10-hostpci.conf
> @@ -2,7 +2,7 @@
>  bios: ovmf
>  bootdisk: scsi0
>  cores: 1
> -efidisk0: local:100/vm-100-disk-1.qcow2,size=128K
> +efidisk0: local:100/vol-vm-100-disk-1.qcow2,size=128K
>  hostpci0: 0f:f2.0
>  machine: pc
>  memory: 512
> diff --git a/src/test/cfg2cmd/i440fx-win10-hostpci.conf.cmd b/src/test/cfg2cmd/i440fx-win10-hostpci.conf.cmd
> index ca648dab..437b1772 100644
> --- a/src/test/cfg2cmd/i440fx-win10-hostpci.conf.cmd
> +++ b/src/test/cfg2cmd/i440fx-win10-hostpci.conf.cmd
> @@ -10,7 +10,7 @@
>    -daemonize \
>    -smbios 'type=1,uuid=3dd750ce-d910-44d0-9493-525c0be4e687' \
>    -drive 'if=pflash,unit=0,format=raw,readonly=on,file=/usr/share/pve-edk2-firmware//OVMF_CODE.fd' \
> -  -drive 'if=pflash,unit=1,id=drive-efidisk0,format=qcow2,file=/var/lib/vz/images/100/vm-100-disk-1.qcow2' \
> +  -drive 'if=pflash,unit=1,id=drive-efidisk0,format=qcow2,file=/var/lib/vz/vms/100/vol-vm-100-disk-1.qcow2' \
>    -smp '2,sockets=2,cores=1,maxcpus=2' \
>    -nodefaults \
>    -boot 'menu=on,strict=on,reboot-timeout=1000,splash=/usr/share/qemu-server/bootsplash.jpg' \
> diff --git a/src/test/cfg2cmd/ide-no-media-error.conf b/src/test/cfg2cmd/ide-no-media-error.conf
> index 48971463..e42771a2 100644
> --- a/src/test/cfg2cmd/ide-no-media-error.conf
> +++ b/src/test/cfg2cmd/ide-no-media-error.conf
> @@ -9,7 +9,7 @@ ide3: cifs-store:iso/three.iso,size=112M
>  memory: 512
>  net0: virtio=2E:01:68:F9:9C:87,bridge=vmbr0
>  ostype: l26
> -scsi0: local:100/vm-100-disk-2.qcow2,size=10G
> +scsi0: local:100/vol-vm-100-disk-2.qcow2,size=10G
>  scsihw: virtio-scsi-pci
>  smbios1: uuid=3dd750ce-d910-44d0-9493-525c0be4e687
>  vmgenid: 54d1c06c-8f5b-440f-b5b2-6eab1380e13d
> diff --git a/src/test/cfg2cmd/ide.conf b/src/test/cfg2cmd/ide.conf
> index 8f565ab1..a2cb70bf 100644
> --- a/src/test/cfg2cmd/ide.conf
> +++ b/src/test/cfg2cmd/ide.conf
> @@ -8,7 +8,7 @@ ide3: cifs-store:iso/three.iso,media=cdrom,size=112M
>  memory: 512
>  net0: virtio=2E:01:68:F9:9C:87,bridge=vmbr0
>  ostype: l26
> -scsi0: local:100/vm-100-disk-2.qcow2,size=10G
> +scsi0: local:100/vol-vm-100-disk-2.qcow2,size=10G
>  scsihw: virtio-scsi-pci
>  smbios1: uuid=3dd750ce-d910-44d0-9493-525c0be4e687
>  vmgenid: 54d1c06c-8f5b-440f-b5b2-6eab1380e13d
> diff --git a/src/test/cfg2cmd/ide.conf.cmd b/src/test/cfg2cmd/ide.conf.cmd
> index 6b5a52a9..73dfdfab 100644
> --- a/src/test/cfg2cmd/ide.conf.cmd
> +++ b/src/test/cfg2cmd/ide.conf.cmd
> @@ -39,7 +39,7 @@
>    -blockdev '{"driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"driver":"raw","file":{"aio":"threads","cache":{"direct":false,"no-flush":false},"driver":"file","filename":"/mnt/pve/cifs-store/template/iso/three.iso","node-name":"e35557bae4bcbf9edc9f7ff7f132f30","read-only":true},"node-name":"f35557bae4bcbf9edc9f7ff7f132f30","read-only":true},"node-name":"drive-ide3","read-only":true,"throttle-group":"throttle-drive-ide3"}' \
>    -device 'ide-cd,bus=ide.1,unit=1,drive=drive-ide3,id=ide3,bootindex=203' \
>    -device 'virtio-scsi-pci,id=scsihw0,bus=pci.0,addr=0x5' \
> -  -blockdev '{"detect-zeroes":"on","discard":"ignore","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"file","filename":"/var/lib/vz/images/100/vm-100-disk-2.qcow2","node-name":"ec11e0572184321efc5835152b95d5d","read-only":false},"node-name":"fc11e0572184321efc5835152b95d5d","read-only":false},"node-name":"drive-scsi0","read-only":false,"throttle-group":"throttle-drive-scsi0"}' \
> +  -blockdev '{"detect-zeroes":"on","discard":"ignore","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"file","filename":"/var/lib/vz/vms/100/vol-vm-100-disk-2.qcow2","node-name":"ec11e0572184321efc5835152b95d5d","read-only":false},"node-name":"fc11e0572184321efc5835152b95d5d","read-only":false},"node-name":"drive-scsi0","read-only":false,"throttle-group":"throttle-drive-scsi0"}' \
>    -device 'scsi-hd,bus=scsihw0.0,channel=0,scsi-id=0,lun=0,drive=drive-scsi0,id=scsi0,device_id=drive-scsi0,bootindex=100,write-cache=on' \
>    -netdev 'type=tap,id=net0,ifname=tap8006i0,script=/usr/libexec/qemu-server/pve-bridge,downscript=/usr/libexec/qemu-server/pve-bridgedown,vhost=on' \
>    -device 'virtio-net-pci,mac=2E:01:68:F9:9C:87,netdev=net0,bus=pci.0,addr=0x12,id=net0,rx_queue_size=1024,tx_queue_size=256,bootindex=300' \
> diff --git a/src/test/cfg2cmd/pinned-version-pxe-pve.conf b/src/test/cfg2cmd/pinned-version-pxe-pve.conf
> index 36169d7b..dc9bb4f5 100644
> --- a/src/test/cfg2cmd/pinned-version-pxe-pve.conf
> +++ b/src/test/cfg2cmd/pinned-version-pxe-pve.conf
> @@ -8,7 +8,7 @@ name: pinned
>  net0: virtio=A2:C0:43:77:08:A1,bridge=vmbr0
>  numa: 0
>  ostype: l26
> -scsi0: local:8006/vm-8006-disk-0.raw,discard=on,size=104858K
> +scsi0: local:8006/vol-vm-8006-disk-0.raw,discard=on,size=104858K
>  scsihw: virtio-scsi-pci
>  smbios1: uuid=c7fdd046-fefc-11e9-832e-770e1d5636a0
>  sockets: 1
> diff --git a/src/test/cfg2cmd/pinned-version-pxe-pve.conf.cmd b/src/test/cfg2cmd/pinned-version-pxe-pve.conf.cmd
> index 7301e3fa..b1e7e054 100644
> --- a/src/test/cfg2cmd/pinned-version-pxe-pve.conf.cmd
> +++ b/src/test/cfg2cmd/pinned-version-pxe-pve.conf.cmd
> @@ -26,7 +26,7 @@
>    -drive 'if=none,id=drive-ide2,media=cdrom,aio=io_uring' \
>    -device 'ide-cd,bus=ide.1,unit=0,drive=drive-ide2,id=ide2,bootindex=200' \
>    -device 'virtio-scsi-pci,id=scsihw0,bus=pci.0,addr=0x5' \
> -  -drive 'file=/var/lib/vz/images/8006/vm-8006-disk-0.raw,if=none,id=drive-scsi0,discard=on,format=raw,cache=none,aio=io_uring,detect-zeroes=unmap' \
> +  -drive 'file=/var/lib/vz/vms/8006/vol-vm-8006-disk-0.raw,if=none,id=drive-scsi0,discard=on,format=raw,cache=none,aio=io_uring,detect-zeroes=unmap' \
>    -device 'scsi-hd,bus=scsihw0.0,channel=0,scsi-id=0,lun=0,drive=drive-scsi0,id=scsi0,bootindex=100' \
>    -netdev 'type=tap,id=net0,ifname=tap8006i0,script=/usr/libexec/qemu-server/pve-bridge,downscript=/usr/libexec/qemu-server/pve-bridgedown,vhost=on' \
>    -device 'virtio-net-pci,mac=A2:C0:43:77:08:A1,netdev=net0,bus=pci.0,addr=0x12,id=net0,bootindex=300,romfile=pxe-virtio.rom' \
> diff --git a/src/test/cfg2cmd/pinned-version-pxe.conf b/src/test/cfg2cmd/pinned-version-pxe.conf
> index 738868f2..40ed2cdf 100644
> --- a/src/test/cfg2cmd/pinned-version-pxe.conf
> +++ b/src/test/cfg2cmd/pinned-version-pxe.conf
> @@ -8,7 +8,7 @@ name: pinned
>  net0: virtio=A2:C0:43:77:08:A1,bridge=vmbr0
>  numa: 0
>  ostype: l26
> -scsi0: local:8006/vm-8006-disk-0.raw,discard=on,size=104858K
> +scsi0: local:8006/vol-vm-8006-disk-0.raw,discard=on,size=104858K
>  scsihw: virtio-scsi-pci
>  smbios1: uuid=c7fdd046-fefc-11e9-832e-770e1d5636a0
>  sockets: 1
> diff --git a/src/test/cfg2cmd/pinned-version-pxe.conf.cmd b/src/test/cfg2cmd/pinned-version-pxe.conf.cmd
> index 89be8c69..4fd9db4d 100644
> --- a/src/test/cfg2cmd/pinned-version-pxe.conf.cmd
> +++ b/src/test/cfg2cmd/pinned-version-pxe.conf.cmd
> @@ -24,7 +24,7 @@
>    -drive 'if=none,id=drive-ide2,media=cdrom,aio=io_uring' \
>    -device 'ide-cd,bus=ide.1,unit=0,drive=drive-ide2,id=ide2,bootindex=200' \
>    -device 'virtio-scsi-pci,id=scsihw0,bus=pci.0,addr=0x5' \
> -  -drive 'file=/var/lib/vz/images/8006/vm-8006-disk-0.raw,if=none,id=drive-scsi0,discard=on,format=raw,cache=none,aio=io_uring,detect-zeroes=unmap' \
> +  -drive 'file=/var/lib/vz/vms/8006/vol-vm-8006-disk-0.raw,if=none,id=drive-scsi0,discard=on,format=raw,cache=none,aio=io_uring,detect-zeroes=unmap' \
>    -device 'scsi-hd,bus=scsihw0.0,channel=0,scsi-id=0,lun=0,drive=drive-scsi0,id=scsi0,bootindex=100' \
>    -netdev 'type=tap,id=net0,ifname=tap8006i0,script=/usr/libexec/qemu-server/pve-bridge,downscript=/usr/libexec/qemu-server/pve-bridgedown,vhost=on' \
>    -device 'virtio-net-pci,mac=A2:C0:43:77:08:A1,netdev=net0,bus=pci.0,addr=0x12,id=net0,bootindex=300,romfile=pxe-virtio.rom' \
> diff --git a/src/test/cfg2cmd/pinned-version.conf b/src/test/cfg2cmd/pinned-version.conf
> index 61191836..3a833151 100644
> --- a/src/test/cfg2cmd/pinned-version.conf
> +++ b/src/test/cfg2cmd/pinned-version.conf
> @@ -8,7 +8,7 @@ name: pinned
>  net0: virtio=A2:C0:43:77:08:A1,bridge=vmbr0
>  numa: 0
>  ostype: l26
> -scsi0: local:8006/vm-8006-disk-0.raw,discard=on,size=104858K
> +scsi0: local:8006/vol-vm-8006-disk-0.raw,discard=on,size=104858K
>  scsihw: virtio-scsi-pci
>  smbios1: uuid=c7fdd046-fefc-11e9-832e-770e1d5636a0
>  sockets: 1
> diff --git a/src/test/cfg2cmd/pinned-version.conf.cmd b/src/test/cfg2cmd/pinned-version.conf.cmd
> index da161ad9..397cee4b 100644
> --- a/src/test/cfg2cmd/pinned-version.conf.cmd
> +++ b/src/test/cfg2cmd/pinned-version.conf.cmd
> @@ -24,7 +24,7 @@
>    -drive 'if=none,id=drive-ide2,media=cdrom,aio=io_uring' \
>    -device 'ide-cd,bus=ide.1,unit=0,drive=drive-ide2,id=ide2,bootindex=200' \
>    -device 'virtio-scsi-pci,id=scsihw0,bus=pci.0,addr=0x5' \
> -  -drive 'file=/var/lib/vz/images/8006/vm-8006-disk-0.raw,if=none,id=drive-scsi0,discard=on,format=raw,cache=none,aio=io_uring,detect-zeroes=unmap' \
> +  -drive 'file=/var/lib/vz/vms/8006/vol-vm-8006-disk-0.raw,if=none,id=drive-scsi0,discard=on,format=raw,cache=none,aio=io_uring,detect-zeroes=unmap' \
>    -device 'scsi-hd,bus=scsihw0.0,channel=0,scsi-id=0,lun=0,drive=drive-scsi0,id=scsi0,bootindex=100' \
>    -netdev 'type=tap,id=net0,ifname=tap8006i0,script=/usr/libexec/qemu-server/pve-bridge,downscript=/usr/libexec/qemu-server/pve-bridgedown,vhost=on' \
>    -device 'virtio-net-pci,mac=A2:C0:43:77:08:A1,netdev=net0,bus=pci.0,addr=0x12,id=net0,bootindex=300' \
> diff --git a/src/test/cfg2cmd/q35-ide.conf b/src/test/cfg2cmd/q35-ide.conf
> index bfef0a14..00fc52ef 100644
> --- a/src/test/cfg2cmd/q35-ide.conf
> +++ b/src/test/cfg2cmd/q35-ide.conf
> @@ -9,7 +9,7 @@ machine: q35
>  memory: 512
>  net0: virtio=2E:01:68:F9:9C:87,bridge=vmbr0
>  ostype: l26
> -scsi0: local:100/vm-100-disk-2.qcow2,size=10G
> +scsi0: local:100/vol-vm-100-disk-2.qcow2,size=10G
>  scsihw: virtio-scsi-pci
>  smbios1: uuid=3dd750ce-d910-44d0-9493-525c0be4e687
>  vmgenid: 54d1c06c-8f5b-440f-b5b2-6eab1380e13d
> diff --git a/src/test/cfg2cmd/q35-ide.conf.cmd b/src/test/cfg2cmd/q35-ide.conf.cmd
> index 475e58d9..0a5ffd0e 100644
> --- a/src/test/cfg2cmd/q35-ide.conf.cmd
> +++ b/src/test/cfg2cmd/q35-ide.conf.cmd
> @@ -38,7 +38,7 @@
>    -blockdev '{"driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"driver":"raw","file":{"aio":"threads","cache":{"direct":false,"no-flush":false},"driver":"file","filename":"/mnt/pve/cifs-store/template/iso/three.iso","node-name":"e35557bae4bcbf9edc9f7ff7f132f30","read-only":true},"node-name":"f35557bae4bcbf9edc9f7ff7f132f30","read-only":true},"node-name":"drive-ide3","read-only":true,"throttle-group":"throttle-drive-ide3"}' \
>    -device 'ide-cd,bus=ide.3,unit=0,drive=drive-ide3,id=ide3,bootindex=203' \
>    -device 'virtio-scsi-pci,id=scsihw0,bus=pci.0,addr=0x5' \
> -  -blockdev '{"detect-zeroes":"on","discard":"ignore","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"file","filename":"/var/lib/vz/images/100/vm-100-disk-2.qcow2","node-name":"ec11e0572184321efc5835152b95d5d","read-only":false},"node-name":"fc11e0572184321efc5835152b95d5d","read-only":false},"node-name":"drive-scsi0","read-only":false,"throttle-group":"throttle-drive-scsi0"}' \
> +  -blockdev '{"detect-zeroes":"on","discard":"ignore","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"file","filename":"/var/lib/vz/vms/100/vol-vm-100-disk-2.qcow2","node-name":"ec11e0572184321efc5835152b95d5d","read-only":false},"node-name":"fc11e0572184321efc5835152b95d5d","read-only":false},"node-name":"drive-scsi0","read-only":false,"throttle-group":"throttle-drive-scsi0"}' \
>    -device 'scsi-hd,bus=scsihw0.0,channel=0,scsi-id=0,lun=0,drive=drive-scsi0,id=scsi0,device_id=drive-scsi0,bootindex=100,write-cache=on' \
>    -netdev 'type=tap,id=net0,ifname=tap8006i0,script=/usr/libexec/qemu-server/pve-bridge,downscript=/usr/libexec/qemu-server/pve-bridgedown,vhost=on' \
>    -device 'virtio-net-pci,mac=2E:01:68:F9:9C:87,netdev=net0,bus=pci.0,addr=0x12,id=net0,rx_queue_size=1024,tx_queue_size=256,bootindex=300' \
> diff --git a/src/test/cfg2cmd/q35-linux-hostpci-mapping.conf b/src/test/cfg2cmd/q35-linux-hostpci-mapping.conf
> index 2366fc4a..ef66f9a7 100644
> --- a/src/test/cfg2cmd/q35-linux-hostpci-mapping.conf
> +++ b/src/test/cfg2cmd/q35-linux-hostpci-mapping.conf
> @@ -2,7 +2,7 @@
>  bios: ovmf
>  bootdisk: scsi0
>  cores: 1
> -efidisk0: local:100/vm-100-disk-1.qcow2,size=128K
> +efidisk0: local:100/vol-vm-100-disk-1.qcow2,size=128K
>  hostpci0: mapping=someNic
>  hostpci1: mapping=someGpu,mdev=some-model
>  hostpci2: mapping=someNic
> diff --git a/src/test/cfg2cmd/q35-linux-hostpci-mapping.conf.cmd b/src/test/cfg2cmd/q35-linux-hostpci-mapping.conf.cmd
> index b0c3e587..2c3e4539 100644
> --- a/src/test/cfg2cmd/q35-linux-hostpci-mapping.conf.cmd
> +++ b/src/test/cfg2cmd/q35-linux-hostpci-mapping.conf.cmd
> @@ -11,7 +11,7 @@
>    -smbios 'type=1,uuid=3dd750ce-d910-44d0-9493-525c0be4e687' \
>    -object '{"id":"throttle-drive-efidisk0","limits":{},"qom-type":"throttle-group"}' \
>    -blockdev '{"driver":"raw","file":{"driver":"file","filename":"/usr/share/pve-edk2-firmware//OVMF_CODE.fd"},"node-name":"pflash0","read-only":true}' \
> -  -blockdev '{"detect-zeroes":"on","discard":"ignore","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"file","filename":"/var/lib/vz/images/100/vm-100-disk-1.qcow2","node-name":"e70e3017c5a79fdee5a04aa92ac1e9c","read-only":false},"node-name":"f70e3017c5a79fdee5a04aa92ac1e9c","read-only":false},"node-name":"drive-efidisk0","read-only":false,"throttle-group":"throttle-drive-efidisk0"}' \
> +  -blockdev '{"detect-zeroes":"on","discard":"ignore","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"file","filename":"/var/lib/vz/vms/100/vol-vm-100-disk-1.qcow2","node-name":"e70e3017c5a79fdee5a04aa92ac1e9c","read-only":false},"node-name":"f70e3017c5a79fdee5a04aa92ac1e9c","read-only":false},"node-name":"drive-efidisk0","read-only":false,"throttle-group":"throttle-drive-efidisk0"}' \
>    -global 'ICH9-LPC.acpi-pci-hotplug-with-bridge-support=off' \
>    -smp '2,sockets=2,cores=1,maxcpus=2' \
>    -nodefaults \
> diff --git a/src/test/cfg2cmd/q35-linux-hostpci-multifunction.conf b/src/test/cfg2cmd/q35-linux-hostpci-multifunction.conf
> index 5f1a3ff7..9054a025 100644
> --- a/src/test/cfg2cmd/q35-linux-hostpci-multifunction.conf
> +++ b/src/test/cfg2cmd/q35-linux-hostpci-multifunction.conf
> @@ -2,7 +2,7 @@
>  bios: ovmf
>  bootdisk: scsi0
>  cores: 1
> -efidisk0: local:100/vm-100-disk-1.qcow2,size=128K
> +efidisk0: local:100/vol-vm-100-disk-1.qcow2,size=128K
>  hostpci0: f0:43
>  hostpci1: 1234:f0:43
>  machine: q35
> diff --git a/src/test/cfg2cmd/q35-linux-hostpci-multifunction.conf.cmd b/src/test/cfg2cmd/q35-linux-hostpci-multifunction.conf.cmd
> index b4aa46f5..219af1c4 100644
> --- a/src/test/cfg2cmd/q35-linux-hostpci-multifunction.conf.cmd
> +++ b/src/test/cfg2cmd/q35-linux-hostpci-multifunction.conf.cmd
> @@ -11,7 +11,7 @@
>    -smbios 'type=1,uuid=3dd750ce-d910-44d0-9493-525c0be4e687' \
>    -object '{"id":"throttle-drive-efidisk0","limits":{},"qom-type":"throttle-group"}' \
>    -blockdev '{"driver":"raw","file":{"driver":"file","filename":"/usr/share/pve-edk2-firmware//OVMF_CODE.fd"},"node-name":"pflash0","read-only":true}' \
> -  -blockdev '{"detect-zeroes":"on","discard":"ignore","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"file","filename":"/var/lib/vz/images/100/vm-100-disk-1.qcow2","node-name":"e70e3017c5a79fdee5a04aa92ac1e9c","read-only":false},"node-name":"f70e3017c5a79fdee5a04aa92ac1e9c","read-only":false},"node-name":"drive-efidisk0","read-only":false,"throttle-group":"throttle-drive-efidisk0"}' \
> +  -blockdev '{"detect-zeroes":"on","discard":"ignore","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"file","filename":"/var/lib/vz/vms/100/vol-vm-100-disk-1.qcow2","node-name":"e70e3017c5a79fdee5a04aa92ac1e9c","read-only":false},"node-name":"f70e3017c5a79fdee5a04aa92ac1e9c","read-only":false},"node-name":"drive-efidisk0","read-only":false,"throttle-group":"throttle-drive-efidisk0"}' \
>    -global 'ICH9-LPC.acpi-pci-hotplug-with-bridge-support=off' \
>    -smp '2,sockets=2,cores=1,maxcpus=2' \
>    -nodefaults \
> diff --git a/src/test/cfg2cmd/q35-linux-hostpci-x-pci-overrides.conf b/src/test/cfg2cmd/q35-linux-hostpci-x-pci-overrides.conf
> index b726a3a4..76190056 100644
> --- a/src/test/cfg2cmd/q35-linux-hostpci-x-pci-overrides.conf
> +++ b/src/test/cfg2cmd/q35-linux-hostpci-x-pci-overrides.conf
> @@ -2,7 +2,7 @@
>  bios: ovmf
>  bootdisk: scsi0
>  cores: 1
> -efidisk0: local:100/vm-100-disk-1.qcow2,size=128K
> +efidisk0: local:100/vol-vm-100-disk-1.qcow2,size=128K
>  hostpci0: 00:ff.1,vendor-id=0x1234,device-id=0x5678,sub-vendor-id=0x2233,sub-device-id=0x0000
>  hostpci1: d0:13.0,pcie=1,vendor-id=0x1234,device-id=0x5678
>  machine: q35
> diff --git a/src/test/cfg2cmd/q35-linux-hostpci-x-pci-overrides.conf.cmd b/src/test/cfg2cmd/q35-linux-hostpci-x-pci-overrides.conf.cmd
> index 6c4937c7..bfdba6d2 100644
> --- a/src/test/cfg2cmd/q35-linux-hostpci-x-pci-overrides.conf.cmd
> +++ b/src/test/cfg2cmd/q35-linux-hostpci-x-pci-overrides.conf.cmd
> @@ -11,7 +11,7 @@
>    -smbios 'type=1,uuid=3dd750ce-d910-44d0-9493-525c0be4e687' \
>    -object '{"id":"throttle-drive-efidisk0","limits":{},"qom-type":"throttle-group"}' \
>    -blockdev '{"driver":"raw","file":{"driver":"file","filename":"/usr/share/pve-edk2-firmware//OVMF_CODE.fd"},"node-name":"pflash0","read-only":true}' \
> -  -blockdev '{"detect-zeroes":"on","discard":"ignore","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"file","filename":"/var/lib/vz/images/100/vm-100-disk-1.qcow2","node-name":"e70e3017c5a79fdee5a04aa92ac1e9c","read-only":false},"node-name":"f70e3017c5a79fdee5a04aa92ac1e9c","read-only":false},"node-name":"drive-efidisk0","read-only":false,"throttle-group":"throttle-drive-efidisk0"}' \
> +  -blockdev '{"detect-zeroes":"on","discard":"ignore","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"file","filename":"/var/lib/vz/vms/100/vol-vm-100-disk-1.qcow2","node-name":"e70e3017c5a79fdee5a04aa92ac1e9c","read-only":false},"node-name":"f70e3017c5a79fdee5a04aa92ac1e9c","read-only":false},"node-name":"drive-efidisk0","read-only":false,"throttle-group":"throttle-drive-efidisk0"}' \
>    -global 'ICH9-LPC.acpi-pci-hotplug-with-bridge-support=off' \
>    -smp '2,sockets=2,cores=1,maxcpus=2' \
>    -nodefaults \
> diff --git a/src/test/cfg2cmd/q35-linux-hostpci.conf b/src/test/cfg2cmd/q35-linux-hostpci.conf
> index 7290120a..fb5b299d 100644
> --- a/src/test/cfg2cmd/q35-linux-hostpci.conf
> +++ b/src/test/cfg2cmd/q35-linux-hostpci.conf
> @@ -2,7 +2,7 @@
>  bios: ovmf
>  bootdisk: scsi0
>  cores: 1
> -efidisk0: local:100/vm-100-disk-1.qcow2,size=128K
> +efidisk0: local:100/vol-vm-100-disk-1.qcow2,size=128K
>  hostpci0: 00:ff.1
>  hostpci1: d0:13.0,pcie=1
>  hostpci2: 00:f4.0
> diff --git a/src/test/cfg2cmd/q35-linux-hostpci.conf.cmd b/src/test/cfg2cmd/q35-linux-hostpci.conf.cmd
> index 19e6ba3c..b6edad85 100644
> --- a/src/test/cfg2cmd/q35-linux-hostpci.conf.cmd
> +++ b/src/test/cfg2cmd/q35-linux-hostpci.conf.cmd
> @@ -11,7 +11,7 @@
>    -smbios 'type=1,uuid=3dd750ce-d910-44d0-9493-525c0be4e687' \
>    -object '{"id":"throttle-drive-efidisk0","limits":{},"qom-type":"throttle-group"}' \
>    -blockdev '{"driver":"raw","file":{"driver":"file","filename":"/usr/share/pve-edk2-firmware//OVMF_CODE.fd"},"node-name":"pflash0","read-only":true}' \
> -  -blockdev '{"detect-zeroes":"on","discard":"ignore","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"file","filename":"/var/lib/vz/images/100/vm-100-disk-1.qcow2","node-name":"e70e3017c5a79fdee5a04aa92ac1e9c","read-only":false},"node-name":"f70e3017c5a79fdee5a04aa92ac1e9c","read-only":false},"node-name":"drive-efidisk0","read-only":false,"throttle-group":"throttle-drive-efidisk0"}' \
> +  -blockdev '{"detect-zeroes":"on","discard":"ignore","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"file","filename":"/var/lib/vz/vms/100/vol-vm-100-disk-1.qcow2","node-name":"e70e3017c5a79fdee5a04aa92ac1e9c","read-only":false},"node-name":"f70e3017c5a79fdee5a04aa92ac1e9c","read-only":false},"node-name":"drive-efidisk0","read-only":false,"throttle-group":"throttle-drive-efidisk0"}' \
>    -global 'ICH9-LPC.acpi-pci-hotplug-with-bridge-support=off' \
>    -smp '2,sockets=2,cores=1,maxcpus=2' \
>    -nodefaults \
> diff --git a/src/test/cfg2cmd/q35-simple-6.0.conf b/src/test/cfg2cmd/q35-simple-6.0.conf
> index d482dfea..19bb6fae 100644
> --- a/src/test/cfg2cmd/q35-simple-6.0.conf
> +++ b/src/test/cfg2cmd/q35-simple-6.0.conf
> @@ -2,7 +2,7 @@
>  bios: ovmf
>  bootdisk: scsi0
>  cores: 2
> -efidisk0: local:100/vm-100-disk-1.qcow2,size=128K
> +efidisk0: local:100/vol-vm-100-disk-1.qcow2,size=128K
>  machine: pc-q35-6.0
>  memory: 512
>  net0: virtio=2E:01:68:F9:9C:87,bridge=vmbr0
> diff --git a/src/test/cfg2cmd/q35-simple-6.0.conf.cmd b/src/test/cfg2cmd/q35-simple-6.0.conf.cmd
> index 858dd11c..2e4885df 100644
> --- a/src/test/cfg2cmd/q35-simple-6.0.conf.cmd
> +++ b/src/test/cfg2cmd/q35-simple-6.0.conf.cmd
> @@ -10,7 +10,7 @@
>    -daemonize \
>    -smbios 'type=1,uuid=3dd750ce-d910-44d0-9493-525c0be4e687' \
>    -drive 'if=pflash,unit=0,format=raw,readonly=on,file=/usr/share/pve-edk2-firmware//OVMF_CODE.fd' \
> -  -drive 'if=pflash,unit=1,id=drive-efidisk0,format=qcow2,file=/var/lib/vz/images/100/vm-100-disk-1.qcow2' \
> +  -drive 'if=pflash,unit=1,id=drive-efidisk0,format=qcow2,file=/var/lib/vz/vms/100/vol-vm-100-disk-1.qcow2' \
>    -smp '2,sockets=1,cores=2,maxcpus=2' \
>    -nodefaults \
>    -boot 'menu=on,strict=on,reboot-timeout=1000,splash=/usr/share/qemu-server/bootsplash.jpg' \
> diff --git a/src/test/cfg2cmd/q35-simple-7.0.conf b/src/test/cfg2cmd/q35-simple-7.0.conf
> index 9e3097ee..01029bc2 100644
> --- a/src/test/cfg2cmd/q35-simple-7.0.conf
> +++ b/src/test/cfg2cmd/q35-simple-7.0.conf
> @@ -2,7 +2,7 @@
>  bios: ovmf
>  bootdisk: scsi0
>  cores: 2
> -efidisk0: local:100/vm-100-disk-1.qcow2,size=128K
> +efidisk0: local:100/vol-vm-100-disk-1.qcow2,size=128K
>  machine: pc-q35-7.0
>  meta: creation-qemu=6.1
>  memory: 512
> diff --git a/src/test/cfg2cmd/q35-simple-7.0.conf.cmd b/src/test/cfg2cmd/q35-simple-7.0.conf.cmd
> index 7a241d09..af4885e5 100644
> --- a/src/test/cfg2cmd/q35-simple-7.0.conf.cmd
> +++ b/src/test/cfg2cmd/q35-simple-7.0.conf.cmd
> @@ -10,7 +10,7 @@
>    -daemonize \
>    -smbios 'type=1,uuid=3dd750ce-d910-44d0-9493-525c0be4e687' \
>    -drive 'if=pflash,unit=0,format=raw,readonly=on,file=/usr/share/pve-edk2-firmware//OVMF_CODE.fd' \
> -  -drive 'if=pflash,unit=1,id=drive-efidisk0,format=qcow2,file=/var/lib/vz/images/100/vm-100-disk-1.qcow2' \
> +  -drive 'if=pflash,unit=1,id=drive-efidisk0,format=qcow2,file=/var/lib/vz/vms/100/vol-vm-100-disk-1.qcow2' \
>    -smp '2,sockets=1,cores=2,maxcpus=2' \
>    -nodefaults \
>    -boot 'menu=on,strict=on,reboot-timeout=1000,splash=/usr/share/qemu-server/bootsplash.jpg' \
> diff --git a/src/test/cfg2cmd/q35-simple-pinned-6.1.conf b/src/test/cfg2cmd/q35-simple-pinned-6.1.conf
> index 9ecfe006..5028e8e4 100644
> --- a/src/test/cfg2cmd/q35-simple-pinned-6.1.conf
> +++ b/src/test/cfg2cmd/q35-simple-pinned-6.1.conf
> @@ -3,7 +3,7 @@
>  bios: ovmf
>  bootdisk: scsi0
>  cores: 2
> -efidisk0: local:100/vm-100-disk-1.qcow2,size=128K
> +efidisk0: local:100/vol-vm-100-disk-1.qcow2,size=128K
>  machine: pc-q35-6.1
>  memory: 512
>  net0: virtio=2E:01:68:F9:9C:87,bridge=vmbr0
> diff --git a/src/test/cfg2cmd/q35-simple-pinned-6.1.conf.cmd b/src/test/cfg2cmd/q35-simple-pinned-6.1.conf.cmd
> index 24a2e299..dd33a0a7 100644
> --- a/src/test/cfg2cmd/q35-simple-pinned-6.1.conf.cmd
> +++ b/src/test/cfg2cmd/q35-simple-pinned-6.1.conf.cmd
> @@ -10,7 +10,7 @@
>    -daemonize \
>    -smbios 'type=1,uuid=3dd750ce-d910-44d0-9493-525c0be4e687' \
>    -drive 'if=pflash,unit=0,format=raw,readonly=on,file=/usr/share/pve-edk2-firmware//OVMF_CODE.fd' \
> -  -drive 'if=pflash,unit=1,id=drive-efidisk0,format=qcow2,file=/var/lib/vz/images/100/vm-100-disk-1.qcow2' \
> +  -drive 'if=pflash,unit=1,id=drive-efidisk0,format=qcow2,file=/var/lib/vz/vms/100/vol-vm-100-disk-1.qcow2' \
>    -smp '2,sockets=1,cores=2,maxcpus=2' \
>    -nodefaults \
>    -boot 'menu=on,strict=on,reboot-timeout=1000,splash=/usr/share/qemu-server/bootsplash.jpg' \
> diff --git a/src/test/cfg2cmd/q35-simple.conf b/src/test/cfg2cmd/q35-simple.conf
> index 21f78122..27fafed2 100644
> --- a/src/test/cfg2cmd/q35-simple.conf
> +++ b/src/test/cfg2cmd/q35-simple.conf
> @@ -3,7 +3,7 @@
>  bios: ovmf
>  bootdisk: scsi0
>  cores: 2
> -efidisk0: local:100/vm-100-disk-1.qcow2,size=128K
> +efidisk0: local:100/vol-vm-100-disk-1.qcow2,size=128K
>  machine: q35
>  memory: 512
>  net0: virtio=2E:01:68:F9:9C:87,bridge=vmbr0
> diff --git a/src/test/cfg2cmd/q35-simple.conf.cmd b/src/test/cfg2cmd/q35-simple.conf.cmd
> index e3f712c3..deed9c2d 100644
> --- a/src/test/cfg2cmd/q35-simple.conf.cmd
> +++ b/src/test/cfg2cmd/q35-simple.conf.cmd
> @@ -11,7 +11,7 @@
>    -smbios 'type=1,uuid=3dd750ce-d910-44d0-9493-525c0be4e687' \
>    -object '{"id":"throttle-drive-efidisk0","limits":{},"qom-type":"throttle-group"}' \
>    -blockdev '{"driver":"raw","file":{"driver":"file","filename":"/usr/share/pve-edk2-firmware//OVMF_CODE.fd"},"node-name":"pflash0","read-only":true}' \
> -  -blockdev '{"detect-zeroes":"on","discard":"ignore","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"file","filename":"/var/lib/vz/images/100/vm-100-disk-1.qcow2","node-name":"e70e3017c5a79fdee5a04aa92ac1e9c","read-only":false},"node-name":"f70e3017c5a79fdee5a04aa92ac1e9c","read-only":false},"node-name":"drive-efidisk0","read-only":false,"throttle-group":"throttle-drive-efidisk0"}' \
> +  -blockdev '{"detect-zeroes":"on","discard":"ignore","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"file","filename":"/var/lib/vz/vms/100/vol-vm-100-disk-1.qcow2","node-name":"e70e3017c5a79fdee5a04aa92ac1e9c","read-only":false},"node-name":"f70e3017c5a79fdee5a04aa92ac1e9c","read-only":false},"node-name":"drive-efidisk0","read-only":false,"throttle-group":"throttle-drive-efidisk0"}' \
>    -global 'ICH9-LPC.acpi-pci-hotplug-with-bridge-support=off' \
>    -smp '2,sockets=1,cores=2,maxcpus=2' \
>    -nodefaults \
> diff --git a/src/test/cfg2cmd/q35-win10-hostpci.conf b/src/test/cfg2cmd/q35-win10-hostpci.conf
> index a8f6e342..5ea44ac6 100644
> --- a/src/test/cfg2cmd/q35-win10-hostpci.conf
> +++ b/src/test/cfg2cmd/q35-win10-hostpci.conf
> @@ -2,7 +2,7 @@
>  bios: ovmf
>  bootdisk: scsi0
>  cores: 1
> -efidisk0: local:100/vm-100-disk-1.qcow2,size=128K
> +efidisk0: local:100/vol-vm-100-disk-1.qcow2,size=128K
>  hostpci0: f0:42.0
>  hostpci1: f0:43.0,pcie=1
>  hostpci4: 00:43.1,pcie=1
> diff --git a/src/test/cfg2cmd/q35-win10-hostpci.conf.cmd b/src/test/cfg2cmd/q35-win10-hostpci.conf.cmd
> index 3a4dd6ec..12b2f268 100644
> --- a/src/test/cfg2cmd/q35-win10-hostpci.conf.cmd
> +++ b/src/test/cfg2cmd/q35-win10-hostpci.conf.cmd
> @@ -10,7 +10,7 @@
>    -daemonize \
>    -smbios 'type=1,uuid=3dd750ce-d910-44d0-9493-525c0be4e687' \
>    -drive 'if=pflash,unit=0,format=raw,readonly=on,file=/usr/share/pve-edk2-firmware//OVMF_CODE.fd' \
> -  -drive 'if=pflash,unit=1,id=drive-efidisk0,format=qcow2,file=/var/lib/vz/images/100/vm-100-disk-1.qcow2' \
> +  -drive 'if=pflash,unit=1,id=drive-efidisk0,format=qcow2,file=/var/lib/vz/vms/100/vol-vm-100-disk-1.qcow2' \
>    -smp '2,sockets=2,cores=1,maxcpus=2' \
>    -nodefaults \
>    -boot 'menu=on,strict=on,reboot-timeout=1000,splash=/usr/share/qemu-server/bootsplash.jpg' \
> diff --git a/src/test/cfg2cmd/seabios_serial.conf b/src/test/cfg2cmd/seabios_serial.conf
> index 7ebfa504..35fb60f9 100644
> --- a/src/test/cfg2cmd/seabios_serial.conf
> +++ b/src/test/cfg2cmd/seabios_serial.conf
> @@ -7,7 +7,7 @@ name: seabiosserial
>  net0: virtio=A2:C0:43:77:08:A0,bridge=vmbr0
>  numa: 0
>  ostype: l26
> -scsi0: local:8006/vm-8006-disk-0.qcow2,discard=on,size=104858K
> +scsi0: local:8006/vol-vm-8006-disk-0.qcow2,discard=on,size=104858K
>  scsihw: virtio-scsi-pci
>  serial0: socket
>  smbios1: uuid=7b10d7af-b932-4c66-b2c3-3996152ec465
> diff --git a/src/test/cfg2cmd/seabios_serial.conf.cmd b/src/test/cfg2cmd/seabios_serial.conf.cmd
> index 8fc0509b..b401d58b 100644
> --- a/src/test/cfg2cmd/seabios_serial.conf.cmd
> +++ b/src/test/cfg2cmd/seabios_serial.conf.cmd
> @@ -28,7 +28,7 @@
>    -iscsi 'initiator-name=iqn.1993-08.org.debian:01:aabbccddeeff' \
>    -device 'ide-cd,bus=ide.1,unit=0,id=ide2,bootindex=200' \
>    -device 'virtio-scsi-pci,id=scsihw0,bus=pci.0,addr=0x5' \
> -  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/var/lib/vz/images/8006/vm-8006-disk-0.qcow2","node-name":"ecd04be4259153b8293415fefa2a84c","read-only":false},"node-name":"fcd04be4259153b8293415fefa2a84c","read-only":false},"node-name":"drive-scsi0","read-only":false,"throttle-group":"throttle-drive-scsi0"}' \
> +  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/var/lib/vz/vms/8006/vol-vm-8006-disk-0.qcow2","node-name":"ecd04be4259153b8293415fefa2a84c","read-only":false},"node-name":"fcd04be4259153b8293415fefa2a84c","read-only":false},"node-name":"drive-scsi0","read-only":false,"throttle-group":"throttle-drive-scsi0"}' \
>    -device 'scsi-hd,bus=scsihw0.0,channel=0,scsi-id=0,lun=0,drive=drive-scsi0,id=scsi0,device_id=drive-scsi0,bootindex=100,write-cache=on' \
>    -netdev 'type=tap,id=net0,ifname=tap8006i0,script=/usr/libexec/qemu-server/pve-bridge,downscript=/usr/libexec/qemu-server/pve-bridgedown,vhost=on' \
>    -device 'virtio-net-pci,mac=A2:C0:43:77:08:A0,netdev=net0,bus=pci.0,addr=0x12,id=net0,rx_queue_size=1024,tx_queue_size=256,bootindex=300' \
> diff --git a/src/test/cfg2cmd/sev-es.conf b/src/test/cfg2cmd/sev-es.conf
> index 3da71e76..af11fa3a 100644
> --- a/src/test/cfg2cmd/sev-es.conf
> +++ b/src/test/cfg2cmd/sev-es.conf
> @@ -2,5 +2,5 @@
>  # HW_CAPABILITIES: amd-turin-9005
>  smbios1: uuid=7b10d7af-b932-4c66-b2c3-3996152ec465
>  bios: ovmf
> -efidisk0: local:100/vm-100-disk-0.raw,efitype=4m,pre-enrolled-keys=1,size=528K
> +efidisk0: local:100/vol-vm-100-disk-0.raw,efitype=4m,pre-enrolled-keys=1,size=528K
>  amd-sev: type=es
> diff --git a/src/test/cfg2cmd/sev-es.conf.cmd b/src/test/cfg2cmd/sev-es.conf.cmd
> index 3cc2dbc6..d8b9394e 100644
> --- a/src/test/cfg2cmd/sev-es.conf.cmd
> +++ b/src/test/cfg2cmd/sev-es.conf.cmd
> @@ -11,7 +11,7 @@
>    -smbios 'type=1,uuid=7b10d7af-b932-4c66-b2c3-3996152ec465' \
>    -object '{"id":"throttle-drive-efidisk0","limits":{},"qom-type":"throttle-group"}' \
>    -blockdev '{"driver":"raw","file":{"driver":"file","filename":"/usr/share/pve-edk2-firmware//OVMF_CVM_CODE_4M.fd"},"node-name":"pflash0","read-only":true}' \
> -  -blockdev '{"detect-zeroes":"on","discard":"ignore","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"raw","file":{"aio":"io_uring","cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"file","filename":"/var/lib/vz/images/100/vm-100-disk-0.raw","node-name":"e1175f2a490414e7c53337589fde17a","read-only":false},"node-name":"f1175f2a490414e7c53337589fde17a","read-only":false,"size":540672},"node-name":"drive-efidisk0","read-only":false,"throttle-group":"throttle-drive-efidisk0"}' \
> +  -blockdev '{"detect-zeroes":"on","discard":"ignore","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"raw","file":{"aio":"io_uring","cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"file","filename":"/var/lib/vz/vms/100/vol-vm-100-disk-0.raw","node-name":"e1175f2a490414e7c53337589fde17a","read-only":false},"node-name":"f1175f2a490414e7c53337589fde17a","read-only":false,"size":540672},"node-name":"drive-efidisk0","read-only":false,"throttle-group":"throttle-drive-efidisk0"}' \
>    -smp '1,sockets=1,cores=1,maxcpus=1' \
>    -nodefaults \
>    -boot 'menu=on,strict=on,reboot-timeout=1000,splash=/usr/share/qemu-server/bootsplash.jpg' \
> diff --git a/src/test/cfg2cmd/sev-std.conf b/src/test/cfg2cmd/sev-std.conf
> index a85a08c9..d14605ab 100644
> --- a/src/test/cfg2cmd/sev-std.conf
> +++ b/src/test/cfg2cmd/sev-std.conf
> @@ -2,5 +2,5 @@
>  # HW_CAPABILITIES: amd-turin-9005
>  smbios1: uuid=7b10d7af-b932-4c66-b2c3-3996152ec465
>  bios: ovmf
> -efidisk0: local:100/vm-100-disk-0.raw,efitype=4m,pre-enrolled-keys=1,size=528K
> +efidisk0: local:100/vol-vm-100-disk-0.raw,efitype=4m,pre-enrolled-keys=1,size=528K
>  amd-sev: type=std
> diff --git a/src/test/cfg2cmd/sev-std.conf.cmd b/src/test/cfg2cmd/sev-std.conf.cmd
> index 6291a302..177edae4 100644
> --- a/src/test/cfg2cmd/sev-std.conf.cmd
> +++ b/src/test/cfg2cmd/sev-std.conf.cmd
> @@ -11,7 +11,7 @@
>    -smbios 'type=1,uuid=7b10d7af-b932-4c66-b2c3-3996152ec465' \
>    -object '{"id":"throttle-drive-efidisk0","limits":{},"qom-type":"throttle-group"}' \
>    -blockdev '{"driver":"raw","file":{"driver":"file","filename":"/usr/share/pve-edk2-firmware//OVMF_CVM_CODE_4M.fd"},"node-name":"pflash0","read-only":true}' \
> -  -blockdev '{"detect-zeroes":"on","discard":"ignore","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"raw","file":{"aio":"io_uring","cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"file","filename":"/var/lib/vz/images/100/vm-100-disk-0.raw","node-name":"e1175f2a490414e7c53337589fde17a","read-only":false},"node-name":"f1175f2a490414e7c53337589fde17a","read-only":false,"size":540672},"node-name":"drive-efidisk0","read-only":false,"throttle-group":"throttle-drive-efidisk0"}' \
> +  -blockdev '{"detect-zeroes":"on","discard":"ignore","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"raw","file":{"aio":"io_uring","cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"file","filename":"/var/lib/vz/vms/100/vol-vm-100-disk-0.raw","node-name":"e1175f2a490414e7c53337589fde17a","read-only":false},"node-name":"f1175f2a490414e7c53337589fde17a","read-only":false,"size":540672},"node-name":"drive-efidisk0","read-only":false,"throttle-group":"throttle-drive-efidisk0"}' \
>    -smp '1,sockets=1,cores=1,maxcpus=1' \
>    -nodefaults \
>    -boot 'menu=on,strict=on,reboot-timeout=1000,splash=/usr/share/qemu-server/bootsplash.jpg' \
> diff --git a/src/test/cfg2cmd/simple-backingchain.conf b/src/test/cfg2cmd/simple-backingchain.conf
> index 2c0b0f2c..b3e7654f 100644
> --- a/src/test/cfg2cmd/simple-backingchain.conf
> +++ b/src/test/cfg2cmd/simple-backingchain.conf
> @@ -1,25 +1,25 @@
>  # TEST: Simple test for external snapshot backing chain
>  name: simple
>  parent: snap3
> -scsi0: localsnapext:8006/vm-8006-disk-0.qcow2,size=1G
> -scsi1: lvm-store:vm-8006-disk-0.qcow2,size=1G
> +scsi0: localsnapext:8006/vol-vm-8006-disk-0.qcow2,size=1G
> +scsi1: lvm-store:vol-vm-8006-disk-0.qcow2,size=1G
>  
>  [snap1]
>  name: simple
> -scsi0: localsnapext:8006/vm-8006-disk-0.qcow2,size=1G
> -scsi1: lvm-store:vm-8006-disk-0.qcow2,size=1G
> +scsi0: localsnapext:8006/vol-vm-8006-disk-0.qcow2,size=1G
> +scsi1: lvm-store:vol-vm-8006-disk-0.qcow2,size=1G
>  snaptime: 1748933042
>  
>  [snap2]
>  parent: snap1
>  name: simple
> -scsi0: localsnapext:8006/vm-8006-disk-0.qcow2,size=1G
> -scsi1: lvm-store:vm-8006-disk-0.qcow2,size=1G
> +scsi0: localsnapext:8006/vol-vm-8006-disk-0.qcow2,size=1G
> +scsi1: lvm-store:vol-vm-8006-disk-0.qcow2,size=1G
>  snaptime: 1748933043
>  
>  [snap3]
>  parent: snap2
>  name: simple
> -scsi0: localsnapext:8006/vm-8006-disk-0.qcow2,size=1G
> -scsi1: lvm-store:vm-8006-disk-0.qcow2,size=1G
> +scsi0: localsnapext:8006/vol-vm-8006-disk-0.qcow2,size=1G
> +scsi1: lvm-store:vol-vm-8006-disk-0.qcow2,size=1G
>  snaptime: 1748933044
> diff --git a/src/test/cfg2cmd/simple-backingchain.conf.cmd b/src/test/cfg2cmd/simple-backingchain.conf.cmd
> index 4ac24b93..8ae2ca7a 100644
> --- a/src/test/cfg2cmd/simple-backingchain.conf.cmd
> +++ b/src/test/cfg2cmd/simple-backingchain.conf.cmd
> @@ -26,8 +26,8 @@
>    -device 'virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3,free-page-reporting=on' \
>    -iscsi 'initiator-name=iqn.1993-08.org.debian:01:aabbccddeeff' \
>    -device 'lsi,id=scsihw0,bus=pci.0,addr=0x5' \
> -  -blockdev '{"detect-zeroes":"on","discard":"ignore","driver":"throttle","file":{"backing":{"backing":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"on","discard":"ignore","discard-no-unref":true,"driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"file","filename":"/var/lib/vzsnapext/images/8006/snap1-vm-8006-disk-0.qcow2","node-name":"ea91a385a49a008a4735c0aec5c6749","read-only":false},"node-name":"fa91a385a49a008a4735c0aec5c6749","read-only":false},"cache":{"direct":true,"no-flush":false},"detect-zeroes":"on","discard":"ignore","discard-no-unref":true,"driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"file","filename":"/var/lib/vzsnapext/images/8006/snap2-vm-8006-disk-0.qcow2","node-name":"ec0289317073959d450248d8cd7a480","read-only":false},"node-name":"fc0289317073959d450248d8cd7a480","read-only":false},"
 ca
>  che":{"direct":true,"no-flush":false},"detect-zeroes":"on","discard":"ignore","discard-no-unref":true,"driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"file","filename":"/var/lib/vzsnapext/images/8006/vm-8006-disk-0.qcow2","node-name":"e74f4959037afb46eddc7313c43dfdd","read-only":false},"node-name":"f74f4959037afb46eddc7313c43dfdd","read-only":false},"node-name":"drive-scsi0","read-only":false,"throttle-group":"throttle-drive-scsi0"}' \
> +  -blockdev '{"detect-zeroes":"on","discard":"ignore","driver":"throttle","file":{"backing":{"backing":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"on","discard":"ignore","discard-no-unref":true,"driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"file","filename":"/var/lib/vzsnapext/images/8006/snap1-vol-vm-8006-disk-0.qcow2","node-name":"ea91a385a49a008a4735c0aec5c6749","read-only":false},"node-name":"fa91a385a49a008a4735c0aec5c6749","read-only":false},"cache":{"direct":true,"no-flush":false},"detect-zeroes":"on","discard":"ignore","discard-no-unref":true,"driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"file","filename":"/var/lib/vzsnapext/images/8006/snap2-vol-vm-8006-disk-0.qcow2","node-name":"ec0289317073959d450248d8cd7a480","read-only":false},"node-name":"fc0289317073959d450248d8cd7a480","read-only":
 fa
>  lse},"cache":{"direct":true,"no-flush":false},"detect-zeroes":"on","discard":"ignore","discard-no-unref":true,"driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"file","filename":"/var/lib/vzsnapext/vms/8006/vol-vm-8006-disk-0.qcow2","node-name":"e74f4959037afb46eddc7313c43dfdd","read-only":false},"node-name":"f74f4959037afb46eddc7313c43dfdd","read-only":false},"node-name":"drive-scsi0","read-only":false,"throttle-group":"throttle-drive-scsi0"}' \
>    -device 'scsi-hd,bus=scsihw0.0,scsi-id=0,drive=drive-scsi0,id=scsi0,device_id=drive-scsi0,write-cache=on' \
> -  -blockdev '{"detect-zeroes":"on","discard":"ignore","driver":"throttle","file":{"backing":{"backing":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"qcow2","file":{"aio":"native","cache":{"direct":true,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"host_device","filename":"/dev/veegee/snap1-vm-8006-disk-0.qcow2","node-name":"e25f58d3e6e11f2065ad41253988915","read-only":false},"node-name":"f25f58d3e6e11f2065ad41253988915","read-only":false},"cache":{"direct":true,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"qcow2","file":{"aio":"native","cache":{"direct":true,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"host_device","filename":"/dev/veegee/snap2-vm-8006-disk-0.qcow2","node-name":"e9415bb5e484c1e25d25063b01686fe","read-only":false},"node-name":"f9415bb5e484c1e25d25063b01686fe","read-only":false},"cache":{"direct":true,"no-flush":false},"detect-zeroes":"on","discard":"igno
 re
>  ","driver":"qcow2","file":{"aio":"native","cache":{"direct":true,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"host_device","filename":"/dev/veegee/vm-8006-disk-0.qcow2","node-name":"e87358a470ca311f94d5cc61d1eb428","read-only":false},"node-name":"f87358a470ca311f94d5cc61d1eb428","read-only":false},"node-name":"drive-scsi1","read-only":false,"throttle-group":"throttle-drive-scsi1"}' \
> +  -blockdev '{"detect-zeroes":"on","discard":"ignore","driver":"throttle","file":{"backing":{"backing":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"qcow2","file":{"aio":"native","cache":{"direct":true,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"host_device","filename":"/dev/veegee/snap1-vol-vm-8006-disk-0.qcow2","node-name":"e25f58d3e6e11f2065ad41253988915","read-only":false},"node-name":"f25f58d3e6e11f2065ad41253988915","read-only":false},"cache":{"direct":true,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"qcow2","file":{"aio":"native","cache":{"direct":true,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"host_device","filename":"/dev/veegee/snap2-vol-vm-8006-disk-0.qcow2","node-name":"e9415bb5e484c1e25d25063b01686fe","read-only":false},"node-name":"f9415bb5e484c1e25d25063b01686fe","read-only":false},"cache":{"direct":true,"no-flush":false},"detect-zeroes":"on","discar
 d"
>  :"ignore","driver":"qcow2","file":{"aio":"native","cache":{"direct":true,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"host_device","filename":"/dev/veegee/vol-vm-8006-disk-0.qcow2","node-name":"e87358a470ca311f94d5cc61d1eb428","read-only":false},"node-name":"f87358a470ca311f94d5cc61d1eb428","read-only":false},"node-name":"drive-scsi1","read-only":false,"throttle-group":"throttle-drive-scsi1"}' \
>    -device 'scsi-hd,bus=scsihw0.0,scsi-id=1,drive=drive-scsi1,id=scsi1,device_id=drive-scsi1,write-cache=on' \
>    -machine 'type=pc+pve0'
> diff --git a/src/test/cfg2cmd/simple-balloon-free-page-reporting.conf b/src/test/cfg2cmd/simple-balloon-free-page-reporting.conf
> index ae71eaf6..bbb60788 100644
> --- a/src/test/cfg2cmd/simple-balloon-free-page-reporting.conf
> +++ b/src/test/cfg2cmd/simple-balloon-free-page-reporting.conf
> @@ -8,7 +8,7 @@ name: simple
>  net0: virtio=A2:C0:43:77:08:A0,bridge=vmbr0
>  numa: 0
>  ostype: l26
> -scsi0: local:8006/vm-8006-disk-0.qcow2,discard=on,size=104858K
> +scsi0: local:8006/vol-vm-8006-disk-0.qcow2,discard=on,size=104858K
>  scsihw: virtio-scsi-pci
>  smbios1: uuid=7b10d7af-b932-4c66-b2c3-3996152ec465
>  sockets: 1
> diff --git a/src/test/cfg2cmd/simple-balloon-free-page-reporting.conf.cmd b/src/test/cfg2cmd/simple-balloon-free-page-reporting.conf.cmd
> index 0c61d334..1c7cd183 100644
> --- a/src/test/cfg2cmd/simple-balloon-free-page-reporting.conf.cmd
> +++ b/src/test/cfg2cmd/simple-balloon-free-page-reporting.conf.cmd
> @@ -26,7 +26,7 @@
>    -drive 'if=none,id=drive-ide2,media=cdrom,aio=io_uring' \
>    -device 'ide-cd,bus=ide.1,unit=0,drive=drive-ide2,id=ide2,bootindex=200' \
>    -device 'virtio-scsi-pci,id=scsihw0,bus=pci.0,addr=0x5' \
> -  -drive 'file=/var/lib/vz/images/8006/vm-8006-disk-0.qcow2,if=none,id=drive-scsi0,discard=on,format=qcow2,cache=none,aio=io_uring,detect-zeroes=unmap' \
> +  -drive 'file=/var/lib/vz/vms/8006/vol-vm-8006-disk-0.qcow2,if=none,id=drive-scsi0,discard=on,format=qcow2,cache=none,aio=io_uring,detect-zeroes=unmap' \
>    -device 'scsi-hd,bus=scsihw0.0,channel=0,scsi-id=0,lun=0,drive=drive-scsi0,id=scsi0,bootindex=100' \
>    -netdev 'type=tap,id=net0,ifname=tap8006i0,script=/usr/libexec/qemu-server/pve-bridge,downscript=/usr/libexec/qemu-server/pve-bridgedown,vhost=on' \
>    -device 'virtio-net-pci,mac=A2:C0:43:77:08:A0,netdev=net0,bus=pci.0,addr=0x12,id=net0,bootindex=300' \
> diff --git a/src/test/cfg2cmd/simple-btrfs.conf b/src/test/cfg2cmd/simple-btrfs.conf
> index 27de3b03..c5d9503a 100644
> --- a/src/test/cfg2cmd/simple-btrfs.conf
> +++ b/src/test/cfg2cmd/simple-btrfs.conf
> @@ -7,10 +7,10 @@ name: simple
>  net0: virtio=A2:C0:43:77:08:A0,bridge=vmbr0
>  numa: 0
>  ostype: l26
> -scsi0: btrfs-store:8006/vm-8006-disk-0.raw,discard=on,size=104858K
> -scsi1: btrfs-store:8006/vm-8006-disk-0.raw,cache=writeback,discard=on,size=104858K
> -scsi2: btrfs-store:8006/vm-8006-disk-0.raw,cache=writethrough,discard=on,size=104858K
> -scsi3: btrfs-store:8006/vm-8006-disk-0.raw,cache=directsync,discard=on,size=104858K
> +scsi0: btrfs-store:8006/vol-vm-8006-disk-0.raw,discard=on,size=104858K
> +scsi1: btrfs-store:8006/vol-vm-8006-disk-0.raw,cache=writeback,discard=on,size=104858K
> +scsi2: btrfs-store:8006/vol-vm-8006-disk-0.raw,cache=writethrough,discard=on,size=104858K
> +scsi3: btrfs-store:8006/vol-vm-8006-disk-0.raw,cache=directsync,discard=on,size=104858K
>  scsihw: virtio-scsi-pci
>  smbios1: uuid=7b10d7af-b932-4c66-b2c3-3996152ec465
>  sockets: 1
> diff --git a/src/test/cfg2cmd/simple-btrfs.conf.cmd b/src/test/cfg2cmd/simple-btrfs.conf.cmd
> index f80421ad..12ddeead 100644
> --- a/src/test/cfg2cmd/simple-btrfs.conf.cmd
> +++ b/src/test/cfg2cmd/simple-btrfs.conf.cmd
> @@ -31,13 +31,13 @@
>    -iscsi 'initiator-name=iqn.1993-08.org.debian:01:aabbccddeeff' \
>    -device 'ide-cd,bus=ide.1,unit=0,id=ide2,bootindex=200' \
>    -device 'virtio-scsi-pci,id=scsihw0,bus=pci.0,addr=0x5' \
> -  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"io_uring","cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/butter/bread/images/8006/vm-8006-disk-0/disk.raw","node-name":"e99aff0ff797aa030a22e9f580076dd","read-only":false},"node-name":"f99aff0ff797aa030a22e9f580076dd","read-only":false},"node-name":"drive-scsi0","read-only":false,"throttle-group":"throttle-drive-scsi0"}' \
> +  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"io_uring","cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/butter/bread/vms/8006/vol-vm-8006-disk-0/disk.raw","node-name":"e99aff0ff797aa030a22e9f580076dd","read-only":false},"node-name":"f99aff0ff797aa030a22e9f580076dd","read-only":false},"node-name":"drive-scsi0","read-only":false,"throttle-group":"throttle-drive-scsi0"}' \
>    -device 'scsi-hd,bus=scsihw0.0,channel=0,scsi-id=0,lun=0,drive=drive-scsi0,id=scsi0,device_id=drive-scsi0,bootindex=100,write-cache=on' \
> -  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"io_uring","cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/butter/bread/images/8006/vm-8006-disk-0/disk.raw","node-name":"e7b2fd2a8c5dbfc550d9781e5df8841","read-only":false},"node-name":"f7b2fd2a8c5dbfc550d9781e5df8841","read-only":false},"node-name":"drive-scsi1","read-only":false,"throttle-group":"throttle-drive-scsi1"}' \
> +  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"io_uring","cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/butter/bread/vms/8006/vol-vm-8006-disk-0/disk.raw","node-name":"e7b2fd2a8c5dbfc550d9781e5df8841","read-only":false},"node-name":"f7b2fd2a8c5dbfc550d9781e5df8841","read-only":false},"node-name":"drive-scsi1","read-only":false,"throttle-group":"throttle-drive-scsi1"}' \
>    -device 'scsi-hd,bus=scsihw0.0,channel=0,scsi-id=0,lun=1,drive=drive-scsi1,id=scsi1,device_id=drive-scsi1,write-cache=on' \
> -  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"io_uring","cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/butter/bread/images/8006/vm-8006-disk-0/disk.raw","node-name":"ed78b07bb04c2cbd8aedc648e885569","read-only":false},"node-name":"fd78b07bb04c2cbd8aedc648e885569","read-only":false},"node-name":"drive-scsi2","read-only":false,"throttle-group":"throttle-drive-scsi2"}' \
> +  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"io_uring","cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/butter/bread/vms/8006/vol-vm-8006-disk-0/disk.raw","node-name":"ed78b07bb04c2cbd8aedc648e885569","read-only":false},"node-name":"fd78b07bb04c2cbd8aedc648e885569","read-only":false},"node-name":"drive-scsi2","read-only":false,"throttle-group":"throttle-drive-scsi2"}' \
>    -device 'scsi-hd,bus=scsihw0.0,channel=0,scsi-id=0,lun=2,drive=drive-scsi2,id=scsi2,device_id=drive-scsi2,write-cache=off' \
> -  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/butter/bread/images/8006/vm-8006-disk-0/disk.raw","node-name":"e7487c01d831e2b51a5446980170ec9","read-only":false},"node-name":"f7487c01d831e2b51a5446980170ec9","read-only":false},"node-name":"drive-scsi3","read-only":false,"throttle-group":"throttle-drive-scsi3"}' \
> +  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/butter/bread/vms/8006/vol-vm-8006-disk-0/disk.raw","node-name":"e7487c01d831e2b51a5446980170ec9","read-only":false},"node-name":"f7487c01d831e2b51a5446980170ec9","read-only":false},"node-name":"drive-scsi3","read-only":false,"throttle-group":"throttle-drive-scsi3"}' \
>    -device 'scsi-hd,bus=scsihw0.0,channel=0,scsi-id=0,lun=3,drive=drive-scsi3,id=scsi3,device_id=drive-scsi3,write-cache=off' \
>    -netdev 'type=tap,id=net0,ifname=tap8006i0,script=/usr/libexec/qemu-server/pve-bridge,downscript=/usr/libexec/qemu-server/pve-bridgedown,vhost=on' \
>    -device 'virtio-net-pci,mac=A2:C0:43:77:08:A0,netdev=net0,bus=pci.0,addr=0x12,id=net0,rx_queue_size=1024,tx_queue_size=256,bootindex=300' \
> diff --git a/src/test/cfg2cmd/simple-cifs.conf b/src/test/cfg2cmd/simple-cifs.conf
> index fe0fed81..6af966a3 100644
> --- a/src/test/cfg2cmd/simple-cifs.conf
> +++ b/src/test/cfg2cmd/simple-cifs.conf
> @@ -2,8 +2,8 @@
>  ide2: none,media=cdrom
>  name: simple
>  ostype: l26
> -scsi0: cifs-store:8006/vm-8006-disk-0.raw,discard=on,size=104858K
> -scsi1: cifs-store:8006/vm-8006-disk-0.raw,cache=writeback,discard=on,size=104858K
> -scsi2: cifs-store:8006/vm-8006-disk-0.raw,cache=writethrough,discard=on,size=104858K
> -scsi3: cifs-store:8006/vm-8006-disk-0.raw,cache=directsync,discard=on,size=104858K
> +scsi0: cifs-store:8006/vol-vm-8006-disk-0.raw,discard=on,size=104858K
> +scsi1: cifs-store:8006/vol-vm-8006-disk-0.raw,cache=writeback,discard=on,size=104858K
> +scsi2: cifs-store:8006/vol-vm-8006-disk-0.raw,cache=writethrough,discard=on,size=104858K
> +scsi3: cifs-store:8006/vol-vm-8006-disk-0.raw,cache=directsync,discard=on,size=104858K
>  scsihw: virtio-scsi-pci
> diff --git a/src/test/cfg2cmd/simple-cifs.conf.cmd b/src/test/cfg2cmd/simple-cifs.conf.cmd
> index 4174d061..a3b75065 100644
> --- a/src/test/cfg2cmd/simple-cifs.conf.cmd
> +++ b/src/test/cfg2cmd/simple-cifs.conf.cmd
> @@ -29,12 +29,12 @@
>    -iscsi 'initiator-name=iqn.1993-08.org.debian:01:aabbccddeeff' \
>    -device 'ide-cd,bus=ide.1,unit=0,id=ide2,bootindex=200' \
>    -device 'virtio-scsi-pci,id=scsihw0,bus=pci.0,addr=0x5' \
> -  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"native","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/mnt/pve/cifs-store/images/8006/vm-8006-disk-0.raw","node-name":"e2b3b8f2d6a23adc1aa3ecd195dbaf5","read-only":false},"node-name":"f2b3b8f2d6a23adc1aa3ecd195dbaf5","read-only":false},"node-name":"drive-scsi0","read-only":false,"throttle-group":"throttle-drive-scsi0"}' \
> +  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"native","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/mnt/pve/cifs-store/vms/8006/vol-vm-8006-disk-0.raw","node-name":"e2b3b8f2d6a23adc1aa3ecd195dbaf5","read-only":false},"node-name":"f2b3b8f2d6a23adc1aa3ecd195dbaf5","read-only":false},"node-name":"drive-scsi0","read-only":false,"throttle-group":"throttle-drive-scsi0"}' \
>    -device 'scsi-hd,bus=scsihw0.0,channel=0,scsi-id=0,lun=0,drive=drive-scsi0,id=scsi0,device_id=drive-scsi0,write-cache=on' \
> -  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"threads","cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/mnt/pve/cifs-store/images/8006/vm-8006-disk-0.raw","node-name":"ee4d9a961200a669c1a8182632aba3e","read-only":false},"node-name":"fe4d9a961200a669c1a8182632aba3e","read-only":false},"node-name":"drive-scsi1","read-only":false,"throttle-group":"throttle-drive-scsi1"}' \
> +  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"threads","cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/mnt/pve/cifs-store/vms/8006/vol-vm-8006-disk-0.raw","node-name":"ee4d9a961200a669c1a8182632aba3e","read-only":false},"node-name":"fe4d9a961200a669c1a8182632aba3e","read-only":false},"node-name":"drive-scsi1","read-only":false,"throttle-group":"throttle-drive-scsi1"}' \
>    -device 'scsi-hd,bus=scsihw0.0,channel=0,scsi-id=0,lun=1,drive=drive-scsi1,id=scsi1,device_id=drive-scsi1,write-cache=on' \
> -  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"threads","cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/mnt/pve/cifs-store/images/8006/vm-8006-disk-0.raw","node-name":"e6a3bf7eee1e2636cbe31f62b537b6c","read-only":false},"node-name":"f6a3bf7eee1e2636cbe31f62b537b6c","read-only":false},"node-name":"drive-scsi2","read-only":false,"throttle-group":"throttle-drive-scsi2"}' \
> +  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"threads","cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/mnt/pve/cifs-store/vms/8006/vol-vm-8006-disk-0.raw","node-name":"e6a3bf7eee1e2636cbe31f62b537b6c","read-only":false},"node-name":"f6a3bf7eee1e2636cbe31f62b537b6c","read-only":false},"node-name":"drive-scsi2","read-only":false,"throttle-group":"throttle-drive-scsi2"}' \
>    -device 'scsi-hd,bus=scsihw0.0,channel=0,scsi-id=0,lun=2,drive=drive-scsi2,id=scsi2,device_id=drive-scsi2,write-cache=off' \
> -  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"native","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/mnt/pve/cifs-store/images/8006/vm-8006-disk-0.raw","node-name":"e7042ee58e764b1296ad54014cb9a03","read-only":false},"node-name":"f7042ee58e764b1296ad54014cb9a03","read-only":false},"node-name":"drive-scsi3","read-only":false,"throttle-group":"throttle-drive-scsi3"}' \
> +  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"native","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/mnt/pve/cifs-store/vms/8006/vol-vm-8006-disk-0.raw","node-name":"e7042ee58e764b1296ad54014cb9a03","read-only":false},"node-name":"f7042ee58e764b1296ad54014cb9a03","read-only":false},"node-name":"drive-scsi3","read-only":false,"throttle-group":"throttle-drive-scsi3"}' \
>    -device 'scsi-hd,bus=scsihw0.0,channel=0,scsi-id=0,lun=3,drive=drive-scsi3,id=scsi3,device_id=drive-scsi3,write-cache=off' \
>    -machine 'type=pc+pve0'
> diff --git a/src/test/cfg2cmd/simple-lvm.conf b/src/test/cfg2cmd/simple-lvm.conf
> index 4c20991b..24f08f14 100644
> --- a/src/test/cfg2cmd/simple-lvm.conf
> +++ b/src/test/cfg2cmd/simple-lvm.conf
> @@ -1,8 +1,8 @@
>  # TEST: Simple test for LVM backed VM
>  bootdisk: scsi0
>  name: simple
> -scsi0: lvm-store:vm-8006-disk-0,discard=on,size=104858K
> -scsi1: lvm-store:vm-8006-disk-0,cache=writeback,discard=on,size=104858K
> -scsi2: lvm-store:vm-8006-disk-0,cache=writethrough,discard=on,size=104858K
> -scsi3: lvm-store:vm-8006-disk-0,cache=directsync,discard=on,size=104858K
> +scsi0: lvm-store:vol-vm-8006-disk-0,discard=on,size=104858K
> +scsi1: lvm-store:vol-vm-8006-disk-0,cache=writeback,discard=on,size=104858K
> +scsi2: lvm-store:vol-vm-8006-disk-0,cache=writethrough,discard=on,size=104858K
> +scsi3: lvm-store:vol-vm-8006-disk-0,cache=directsync,discard=on,size=104858K
>  scsihw: virtio-scsi-pci
> diff --git a/src/test/cfg2cmd/simple-lvm.conf.cmd b/src/test/cfg2cmd/simple-lvm.conf.cmd
> index 96248c0d..0ab09c87 100644
> --- a/src/test/cfg2cmd/simple-lvm.conf.cmd
> +++ b/src/test/cfg2cmd/simple-lvm.conf.cmd
> @@ -28,12 +28,12 @@
>    -device 'virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3,free-page-reporting=on' \
>    -iscsi 'initiator-name=iqn.1993-08.org.debian:01:aabbccddeeff' \
>    -device 'virtio-scsi-pci,id=scsihw0,bus=pci.0,addr=0x5' \
> -  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"native","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"host_device","filename":"/dev/veegee/vm-8006-disk-0","node-name":"e0378a375d635b0f473569544c7c207","read-only":false},"node-name":"f0378a375d635b0f473569544c7c207","read-only":false},"node-name":"drive-scsi0","read-only":false,"throttle-group":"throttle-drive-scsi0"}' \
> +  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"native","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"host_device","filename":"/dev/veegee/vol-vm-8006-disk-0","node-name":"e0378a375d635b0f473569544c7c207","read-only":false},"node-name":"f0378a375d635b0f473569544c7c207","read-only":false},"node-name":"drive-scsi0","read-only":false,"throttle-group":"throttle-drive-scsi0"}' \
>    -device 'scsi-hd,bus=scsihw0.0,channel=0,scsi-id=0,lun=0,drive=drive-scsi0,id=scsi0,device_id=drive-scsi0,bootindex=100,write-cache=on' \
> -  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"threads","cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"host_device","filename":"/dev/veegee/vm-8006-disk-0","node-name":"e2fbae024c8a771f708f4a5391211b0","read-only":false},"node-name":"f2fbae024c8a771f708f4a5391211b0","read-only":false},"node-name":"drive-scsi1","read-only":false,"throttle-group":"throttle-drive-scsi1"}' \
> +  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"threads","cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"host_device","filename":"/dev/veegee/vol-vm-8006-disk-0","node-name":"e2fbae024c8a771f708f4a5391211b0","read-only":false},"node-name":"f2fbae024c8a771f708f4a5391211b0","read-only":false},"node-name":"drive-scsi1","read-only":false,"throttle-group":"throttle-drive-scsi1"}' \
>    -device 'scsi-hd,bus=scsihw0.0,channel=0,scsi-id=0,lun=1,drive=drive-scsi1,id=scsi1,device_id=drive-scsi1,write-cache=on' \
> -  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"threads","cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"host_device","filename":"/dev/veegee/vm-8006-disk-0","node-name":"e4328c26b141e3efe1564cb60bf1155","read-only":false},"node-name":"f4328c26b141e3efe1564cb60bf1155","read-only":false},"node-name":"drive-scsi2","read-only":false,"throttle-group":"throttle-drive-scsi2"}' \
> +  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"threads","cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"host_device","filename":"/dev/veegee/vol-vm-8006-disk-0","node-name":"e4328c26b141e3efe1564cb60bf1155","read-only":false},"node-name":"f4328c26b141e3efe1564cb60bf1155","read-only":false},"node-name":"drive-scsi2","read-only":false,"throttle-group":"throttle-drive-scsi2"}' \
>    -device 'scsi-hd,bus=scsihw0.0,channel=0,scsi-id=0,lun=2,drive=drive-scsi2,id=scsi2,device_id=drive-scsi2,write-cache=off' \
> -  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"native","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"host_device","filename":"/dev/veegee/vm-8006-disk-0","node-name":"e68e10f8128f05fe5f7e85cc1f9922b","read-only":false},"node-name":"f68e10f8128f05fe5f7e85cc1f9922b","read-only":false},"node-name":"drive-scsi3","read-only":false,"throttle-group":"throttle-drive-scsi3"}' \
> +  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"native","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"host_device","filename":"/dev/veegee/vol-vm-8006-disk-0","node-name":"e68e10f8128f05fe5f7e85cc1f9922b","read-only":false},"node-name":"f68e10f8128f05fe5f7e85cc1f9922b","read-only":false},"node-name":"drive-scsi3","read-only":false,"throttle-group":"throttle-drive-scsi3"}' \
>    -device 'scsi-hd,bus=scsihw0.0,channel=0,scsi-id=0,lun=3,drive=drive-scsi3,id=scsi3,device_id=drive-scsi3,write-cache=off' \
>    -machine 'type=pc+pve0'
> diff --git a/src/test/cfg2cmd/simple-lvmthin.conf b/src/test/cfg2cmd/simple-lvmthin.conf
> index 5d70622e..c898eebb 100644
> --- a/src/test/cfg2cmd/simple-lvmthin.conf
> +++ b/src/test/cfg2cmd/simple-lvmthin.conf
> @@ -1,8 +1,8 @@
>  # TEST: Simple test for LVMthin backed VM
>  bootdisk: scsi0
>  name: simple
> -scsi0: local-lvm:vm-8006-disk-0,discard=on,size=104858K
> -scsi1: local-lvm:vm-8006-disk-0,cache=writeback,discard=on,size=104858K
> -scsi2: local-lvm:vm-8006-disk-0,cache=writethrough,discard=on,size=104858K
> -scsi3: local-lvm:vm-8006-disk-0,cache=directsync,discard=on,size=104858K
> +scsi0: local-lvm:vol-vm-8006-disk-0,discard=on,size=104858K
> +scsi1: local-lvm:vol-vm-8006-disk-0,cache=writeback,discard=on,size=104858K
> +scsi2: local-lvm:vol-vm-8006-disk-0,cache=writethrough,discard=on,size=104858K
> +scsi3: local-lvm:vol-vm-8006-disk-0,cache=directsync,discard=on,size=104858K
>  scsihw: virtio-scsi-pci
> diff --git a/src/test/cfg2cmd/simple-lvmthin.conf.cmd b/src/test/cfg2cmd/simple-lvmthin.conf.cmd
> index 9c98fffc..c4dc173d 100644
> --- a/src/test/cfg2cmd/simple-lvmthin.conf.cmd
> +++ b/src/test/cfg2cmd/simple-lvmthin.conf.cmd
> @@ -28,12 +28,12 @@
>    -device 'virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3,free-page-reporting=on' \
>    -iscsi 'initiator-name=iqn.1993-08.org.debian:01:aabbccddeeff' \
>    -device 'virtio-scsi-pci,id=scsihw0,bus=pci.0,addr=0x5' \
> -  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"host_device","filename":"/dev/pve/vm-8006-disk-0","node-name":"e6d87b01b7bb888b8426534a542ff1c","read-only":false},"node-name":"f6d87b01b7bb888b8426534a542ff1c","read-only":false},"node-name":"drive-scsi0","read-only":false,"throttle-group":"throttle-drive-scsi0"}' \
> +  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"host_device","filename":"/dev/pve/vol-vm-8006-disk-0","node-name":"e6d87b01b7bb888b8426534a542ff1c","read-only":false},"node-name":"f6d87b01b7bb888b8426534a542ff1c","read-only":false},"node-name":"drive-scsi0","read-only":false,"throttle-group":"throttle-drive-scsi0"}' \
>    -device 'scsi-hd,bus=scsihw0.0,channel=0,scsi-id=0,lun=0,drive=drive-scsi0,id=scsi0,device_id=drive-scsi0,bootindex=100,write-cache=on' \
> -  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"io_uring","cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"host_device","filename":"/dev/pve/vm-8006-disk-0","node-name":"e96d9ece81aa4271aa2d8485184f66b","read-only":false},"node-name":"f96d9ece81aa4271aa2d8485184f66b","read-only":false},"node-name":"drive-scsi1","read-only":false,"throttle-group":"throttle-drive-scsi1"}' \
> +  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"io_uring","cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"host_device","filename":"/dev/pve/vol-vm-8006-disk-0","node-name":"e96d9ece81aa4271aa2d8485184f66b","read-only":false},"node-name":"f96d9ece81aa4271aa2d8485184f66b","read-only":false},"node-name":"drive-scsi1","read-only":false,"throttle-group":"throttle-drive-scsi1"}' \
>    -device 'scsi-hd,bus=scsihw0.0,channel=0,scsi-id=0,lun=1,drive=drive-scsi1,id=scsi1,device_id=drive-scsi1,write-cache=on' \
> -  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"io_uring","cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"host_device","filename":"/dev/pve/vm-8006-disk-0","node-name":"e0b89788ef97beda10a850ab45897d9","read-only":false},"node-name":"f0b89788ef97beda10a850ab45897d9","read-only":false},"node-name":"drive-scsi2","read-only":false,"throttle-group":"throttle-drive-scsi2"}' \
> +  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"io_uring","cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"host_device","filename":"/dev/pve/vol-vm-8006-disk-0","node-name":"e0b89788ef97beda10a850ab45897d9","read-only":false},"node-name":"f0b89788ef97beda10a850ab45897d9","read-only":false},"node-name":"drive-scsi2","read-only":false,"throttle-group":"throttle-drive-scsi2"}' \
>    -device 'scsi-hd,bus=scsihw0.0,channel=0,scsi-id=0,lun=2,drive=drive-scsi2,id=scsi2,device_id=drive-scsi2,write-cache=off' \
> -  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"host_device","filename":"/dev/pve/vm-8006-disk-0","node-name":"ea7b6871af66ca3e13e95bd74570aa2","read-only":false},"node-name":"fa7b6871af66ca3e13e95bd74570aa2","read-only":false},"node-name":"drive-scsi3","read-only":false,"throttle-group":"throttle-drive-scsi3"}' \
> +  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"host_device","filename":"/dev/pve/vol-vm-8006-disk-0","node-name":"ea7b6871af66ca3e13e95bd74570aa2","read-only":false},"node-name":"fa7b6871af66ca3e13e95bd74570aa2","read-only":false},"node-name":"drive-scsi3","read-only":false,"throttle-group":"throttle-drive-scsi3"}' \
>    -device 'scsi-hd,bus=scsihw0.0,channel=0,scsi-id=0,lun=3,drive=drive-scsi3,id=scsi3,device_id=drive-scsi3,write-cache=off' \
>    -machine 'type=pc+pve0'
> diff --git a/src/test/cfg2cmd/simple-rbd.conf b/src/test/cfg2cmd/simple-rbd.conf
> index 9960d72d..df092fb4 100644
> --- a/src/test/cfg2cmd/simple-rbd.conf
> +++ b/src/test/cfg2cmd/simple-rbd.conf
> @@ -7,14 +7,14 @@ name: simple
>  net0: virtio=A2:C0:43:77:08:A0,bridge=vmbr0
>  numa: 0
>  ostype: l26
> -scsi0: rbd-store:vm-8006-disk-0,discard=on,size=104858K
> -scsi1: rbd-store:vm-8006-disk-0,discard=on,cache=writeback,size=104858K
> -scsi2: rbd-store:vm-8006-disk-0,discard=on,cache=writethrough,size=104858K
> -scsi3: rbd-store:vm-8006-disk-0,discard=on,cache=directsync,size=104858K
> -scsi4: krbd-store:vm-8006-disk-0,discard=on,size=104858K
> -scsi5: krbd-store:vm-8006-disk-0,cache=writeback,discard=on,size=104858K
> -scsi6: krbd-store:vm-8006-disk-0,cache=writethrough,discard=on,size=104858K
> -scsi7: krbd-store:vm-8006-disk-0,cache=directsync,discard=on,size=104858K
> +scsi0: rbd-store:vol-vm-8006-disk-0,discard=on,size=104858K
> +scsi1: rbd-store:vol-vm-8006-disk-0,discard=on,cache=writeback,size=104858K
> +scsi2: rbd-store:vol-vm-8006-disk-0,discard=on,cache=writethrough,size=104858K
> +scsi3: rbd-store:vol-vm-8006-disk-0,discard=on,cache=directsync,size=104858K
> +scsi4: krbd-store:vol-vm-8006-disk-0,discard=on,size=104858K
> +scsi5: krbd-store:vol-vm-8006-disk-0,cache=writeback,discard=on,size=104858K
> +scsi6: krbd-store:vol-vm-8006-disk-0,cache=writethrough,discard=on,size=104858K
> +scsi7: krbd-store:vol-vm-8006-disk-0,cache=directsync,discard=on,size=104858K
>  scsihw: virtio-scsi-pci
>  smbios1: uuid=7b10d7af-b932-4c66-b2c3-3996152ec465
>  sockets: 1
> diff --git a/src/test/cfg2cmd/simple-rbd.conf.cmd b/src/test/cfg2cmd/simple-rbd.conf.cmd
> index b848672c..2bcb9287 100644
> --- a/src/test/cfg2cmd/simple-rbd.conf.cmd
> +++ b/src/test/cfg2cmd/simple-rbd.conf.cmd
> @@ -35,21 +35,21 @@
>    -iscsi 'initiator-name=iqn.1993-08.org.debian:01:aabbccddeeff' \
>    -device 'ide-cd,bus=ide.1,unit=0,id=ide2,bootindex=200' \
>    -device 'virtio-scsi-pci,id=scsihw0,bus=pci.0,addr=0x5' \
> -  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"auth-client-required":["none"],"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"rbd","image":"vm-8006-disk-0","node-name":"e8e1af6f55c6a2466f178045aa79710","pool":"cpool","read-only":false,"server":[{"host":"127.0.0.42","port":"3300"},{"host":"127.0.0.21","port":"3300"},{"host":"::1","port":"3300"}]},"node-name":"f8e1af6f55c6a2466f178045aa79710","read-only":false},"node-name":"drive-scsi0","read-only":false,"throttle-group":"throttle-drive-scsi0"}' \
> +  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"auth-client-required":["none"],"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"rbd","image":"vol-vm-8006-disk-0","node-name":"e8e1af6f55c6a2466f178045aa79710","pool":"cpool","read-only":false,"server":[{"host":"127.0.0.42","port":"3300"},{"host":"127.0.0.21","port":"3300"},{"host":"::1","port":"3300"}]},"node-name":"f8e1af6f55c6a2466f178045aa79710","read-only":false},"node-name":"drive-scsi0","read-only":false,"throttle-group":"throttle-drive-scsi0"}' \
>    -device 'scsi-hd,bus=scsihw0.0,channel=0,scsi-id=0,lun=0,drive=drive-scsi0,id=scsi0,device_id=drive-scsi0,bootindex=100,write-cache=on' \
> -  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"auth-client-required":["none"],"cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"rbd","image":"vm-8006-disk-0","node-name":"e3990bba2ed1f48c5bb23e9f37b4cec","pool":"cpool","read-only":false,"server":[{"host":"127.0.0.42","port":"3300"},{"host":"127.0.0.21","port":"3300"},{"host":"::1","port":"3300"}]},"node-name":"f3990bba2ed1f48c5bb23e9f37b4cec","read-only":false},"node-name":"drive-scsi1","read-only":false,"throttle-group":"throttle-drive-scsi1"}' \
> +  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"auth-client-required":["none"],"cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"rbd","image":"vol-vm-8006-disk-0","node-name":"e3990bba2ed1f48c5bb23e9f37b4cec","pool":"cpool","read-only":false,"server":[{"host":"127.0.0.42","port":"3300"},{"host":"127.0.0.21","port":"3300"},{"host":"::1","port":"3300"}]},"node-name":"f3990bba2ed1f48c5bb23e9f37b4cec","read-only":false},"node-name":"drive-scsi1","read-only":false,"throttle-group":"throttle-drive-scsi1"}' \
>    -device 'scsi-hd,bus=scsihw0.0,channel=0,scsi-id=0,lun=1,drive=drive-scsi1,id=scsi1,device_id=drive-scsi1,write-cache=on' \
> -  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"auth-client-required":["none"],"cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"rbd","image":"vm-8006-disk-0","node-name":"e3beccc2a8f2eacb8b5df8055a7d093","pool":"cpool","read-only":false,"server":[{"host":"127.0.0.42","port":"3300"},{"host":"127.0.0.21","port":"3300"},{"host":"::1","port":"3300"}]},"node-name":"f3beccc2a8f2eacb8b5df8055a7d093","read-only":false},"node-name":"drive-scsi2","read-only":false,"throttle-group":"throttle-drive-scsi2"}' \
> +  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"auth-client-required":["none"],"cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"rbd","image":"vol-vm-8006-disk-0","node-name":"e3beccc2a8f2eacb8b5df8055a7d093","pool":"cpool","read-only":false,"server":[{"host":"127.0.0.42","port":"3300"},{"host":"127.0.0.21","port":"3300"},{"host":"::1","port":"3300"}]},"node-name":"f3beccc2a8f2eacb8b5df8055a7d093","read-only":false},"node-name":"drive-scsi2","read-only":false,"throttle-group":"throttle-drive-scsi2"}' \
>    -device 'scsi-hd,bus=scsihw0.0,channel=0,scsi-id=0,lun=2,drive=drive-scsi2,id=scsi2,device_id=drive-scsi2,write-cache=off' \
> -  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"auth-client-required":["none"],"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"rbd","image":"vm-8006-disk-0","node-name":"eef923d5dfcee93fbc712b03f9f21af","pool":"cpool","read-only":false,"server":[{"host":"127.0.0.42","port":"3300"},{"host":"127.0.0.21","port":"3300"},{"host":"::1","port":"3300"}]},"node-name":"fef923d5dfcee93fbc712b03f9f21af","read-only":false},"node-name":"drive-scsi3","read-only":false,"throttle-group":"throttle-drive-scsi3"}' \
> +  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"auth-client-required":["none"],"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"rbd","image":"vol-vm-8006-disk-0","node-name":"eef923d5dfcee93fbc712b03f9f21af","pool":"cpool","read-only":false,"server":[{"host":"127.0.0.42","port":"3300"},{"host":"127.0.0.21","port":"3300"},{"host":"::1","port":"3300"}]},"node-name":"fef923d5dfcee93fbc712b03f9f21af","read-only":false},"node-name":"drive-scsi3","read-only":false,"throttle-group":"throttle-drive-scsi3"}' \
>    -device 'scsi-hd,bus=scsihw0.0,channel=0,scsi-id=0,lun=3,drive=drive-scsi3,id=scsi3,device_id=drive-scsi3,write-cache=off' \
> -  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"host_device","filename":"/dev/rbd-pve/fc4181a6-56eb-4f68-b452-8ba1f381ca2a/cpool/vm-8006-disk-0","node-name":"eb2c7a292f03b9f6d015cf83ae79730","read-only":false},"node-name":"fb2c7a292f03b9f6d015cf83ae79730","read-only":false},"node-name":"drive-scsi4","read-only":false,"throttle-group":"throttle-drive-scsi4"}' \
> +  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"host_device","filename":"/dev/rbd-pve/fc4181a6-56eb-4f68-b452-8ba1f381ca2a/cpool/vol-vm-8006-disk-0","node-name":"eb2c7a292f03b9f6d015cf83ae79730","read-only":false},"node-name":"fb2c7a292f03b9f6d015cf83ae79730","read-only":false},"node-name":"drive-scsi4","read-only":false,"throttle-group":"throttle-drive-scsi4"}' \
>    -device 'scsi-hd,bus=scsihw0.0,channel=0,scsi-id=0,lun=4,drive=drive-scsi4,id=scsi4,device_id=drive-scsi4,write-cache=on' \
> -  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"threads","cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"host_device","filename":"/dev/rbd-pve/fc4181a6-56eb-4f68-b452-8ba1f381ca2a/cpool/vm-8006-disk-0","node-name":"e5258ec75558b1f102af1e20e677fd0","read-only":false},"node-name":"f5258ec75558b1f102af1e20e677fd0","read-only":false},"node-name":"drive-scsi5","read-only":false,"throttle-group":"throttle-drive-scsi5"}' \
> +  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"threads","cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"host_device","filename":"/dev/rbd-pve/fc4181a6-56eb-4f68-b452-8ba1f381ca2a/cpool/vol-vm-8006-disk-0","node-name":"e5258ec75558b1f102af1e20e677fd0","read-only":false},"node-name":"f5258ec75558b1f102af1e20e677fd0","read-only":false},"node-name":"drive-scsi5","read-only":false,"throttle-group":"throttle-drive-scsi5"}' \
>    -device 'scsi-hd,bus=scsihw0.0,channel=0,scsi-id=0,lun=5,drive=drive-scsi5,id=scsi5,device_id=drive-scsi5,write-cache=on' \
> -  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"threads","cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"host_device","filename":"/dev/rbd-pve/fc4181a6-56eb-4f68-b452-8ba1f381ca2a/cpool/vm-8006-disk-0","node-name":"edb33cdcea8ec3e2225509c4945227e","read-only":false},"node-name":"fdb33cdcea8ec3e2225509c4945227e","read-only":false},"node-name":"drive-scsi6","read-only":false,"throttle-group":"throttle-drive-scsi6"}' \
> +  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"threads","cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"host_device","filename":"/dev/rbd-pve/fc4181a6-56eb-4f68-b452-8ba1f381ca2a/cpool/vol-vm-8006-disk-0","node-name":"edb33cdcea8ec3e2225509c4945227e","read-only":false},"node-name":"fdb33cdcea8ec3e2225509c4945227e","read-only":false},"node-name":"drive-scsi6","read-only":false,"throttle-group":"throttle-drive-scsi6"}' \
>    -device 'scsi-hd,bus=scsihw0.0,channel=0,scsi-id=0,lun=6,drive=drive-scsi6,id=scsi6,device_id=drive-scsi6,write-cache=off' \
> -  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"host_device","filename":"/dev/rbd-pve/fc4181a6-56eb-4f68-b452-8ba1f381ca2a/cpool/vm-8006-disk-0","node-name":"eb0b017124a47505c97a5da052e0141","read-only":false},"node-name":"fb0b017124a47505c97a5da052e0141","read-only":false},"node-name":"drive-scsi7","read-only":false,"throttle-group":"throttle-drive-scsi7"}' \
> +  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"host_device","filename":"/dev/rbd-pve/fc4181a6-56eb-4f68-b452-8ba1f381ca2a/cpool/vol-vm-8006-disk-0","node-name":"eb0b017124a47505c97a5da052e0141","read-only":false},"node-name":"fb0b017124a47505c97a5da052e0141","read-only":false},"node-name":"drive-scsi7","read-only":false,"throttle-group":"throttle-drive-scsi7"}' \
>    -device 'scsi-hd,bus=scsihw0.0,channel=0,scsi-id=0,lun=7,drive=drive-scsi7,id=scsi7,device_id=drive-scsi7,write-cache=off' \
>    -netdev 'type=tap,id=net0,ifname=tap8006i0,script=/usr/libexec/qemu-server/pve-bridge,downscript=/usr/libexec/qemu-server/pve-bridgedown,vhost=on' \
>    -device 'virtio-net-pci,mac=A2:C0:43:77:08:A0,netdev=net0,bus=pci.0,addr=0x12,id=net0,rx_queue_size=1024,tx_queue_size=256,bootindex=300' \
> diff --git a/src/test/cfg2cmd/simple-virtio-blk.conf b/src/test/cfg2cmd/simple-virtio-blk.conf
> index d9db7580..c5582792 100644
> --- a/src/test/cfg2cmd/simple-virtio-blk.conf
> +++ b/src/test/cfg2cmd/simple-virtio-blk.conf
> @@ -9,5 +9,5 @@ numa: 0
>  ostype: l26
>  smbios1: uuid=7b10d7af-b932-4c66-b2c3-3996152ec465
>  sockets: 1
> -virtio0: local:8006/vm-8006-disk-0.qcow2,discard=on,iothread=1,size=104858K
> +virtio0: local:8006/vol-vm-8006-disk-0.qcow2,discard=on,iothread=1,size=104858K
>  vmgenid: c773c261-d800-4348-9f5d-167fadd53cf8
> diff --git a/src/test/cfg2cmd/simple-virtio-blk.conf.cmd b/src/test/cfg2cmd/simple-virtio-blk.conf.cmd
> index a9acb0cf..6eae2c1b 100644
> --- a/src/test/cfg2cmd/simple-virtio-blk.conf.cmd
> +++ b/src/test/cfg2cmd/simple-virtio-blk.conf.cmd
> @@ -28,7 +28,7 @@
>    -device 'virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3,free-page-reporting=on' \
>    -iscsi 'initiator-name=iqn.1993-08.org.debian:01:aabbccddeeff' \
>    -device 'ide-cd,bus=ide.1,unit=0,id=ide2,bootindex=200' \
> -  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/var/lib/vz/images/8006/vm-8006-disk-0.qcow2","node-name":"edd19f6c1b3a6d5a6248c3376a91a16","read-only":false},"node-name":"fdd19f6c1b3a6d5a6248c3376a91a16","read-only":false},"node-name":"drive-virtio0","read-only":false,"throttle-group":"throttle-drive-virtio0"}' \
> +  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/var/lib/vz/vms/8006/vol-vm-8006-disk-0.qcow2","node-name":"edd19f6c1b3a6d5a6248c3376a91a16","read-only":false},"node-name":"fdd19f6c1b3a6d5a6248c3376a91a16","read-only":false},"node-name":"drive-virtio0","read-only":false,"throttle-group":"throttle-drive-virtio0"}' \
>    -device 'virtio-blk-pci,drive=drive-virtio0,id=virtio0,bus=pci.0,addr=0xa,iothread=iothread-virtio0,bootindex=100,write-cache=on' \
>    -netdev 'type=tap,id=net0,ifname=tap8006i0,script=/usr/libexec/qemu-server/pve-bridge,downscript=/usr/libexec/qemu-server/pve-bridgedown,vhost=on' \
>    -device 'virtio-net-pci,mac=A2:C0:43:77:08:A0,netdev=net0,bus=pci.0,addr=0x12,id=net0,rx_queue_size=1024,tx_queue_size=256,bootindex=300' \
> diff --git a/src/test/cfg2cmd/simple-zfs-over-iscsi.conf b/src/test/cfg2cmd/simple-zfs-over-iscsi.conf
> index 4dbf2b7c..0e76dbb5 100644
> --- a/src/test/cfg2cmd/simple-zfs-over-iscsi.conf
> +++ b/src/test/cfg2cmd/simple-zfs-over-iscsi.conf
> @@ -7,10 +7,10 @@ name: simple
>  net0: virtio=A2:C0:43:77:08:A0,bridge=vmbr0
>  numa: 0
>  ostype: l26
> -scsi0: zfs-over-iscsi-store:vm-8006-disk-0,discard=on,size=104858K
> -scsi1: zfs-over-iscsi-store:vm-8006-disk-0,cache=writeback,discard=on,size=104858K
> -scsi2: zfs-over-iscsi-store:vm-8006-disk-0,cache=writethrough,discard=on,size=104858K
> -scsi3: zfs-over-iscsi-store:vm-8006-disk-0,cache=directsync,discard=on,size=104858K
> +scsi0: zfs-over-iscsi-store:vol-vm-8006-disk-0,discard=on,size=104858K
> +scsi1: zfs-over-iscsi-store:vol-vm-8006-disk-0,cache=writeback,discard=on,size=104858K
> +scsi2: zfs-over-iscsi-store:vol-vm-8006-disk-0,cache=writethrough,discard=on,size=104858K
> +scsi3: zfs-over-iscsi-store:vol-vm-8006-disk-0,cache=directsync,discard=on,size=104858K
>  scsihw: virtio-scsi-pci
>  smbios1: uuid=7b10d7af-b932-4c66-b2c3-3996152ec465
>  sockets: 1
> diff --git a/src/test/cfg2cmd/simple1.conf b/src/test/cfg2cmd/simple1.conf
> index 9feb9d26..a887e736 100644
> --- a/src/test/cfg2cmd/simple1.conf
> +++ b/src/test/cfg2cmd/simple1.conf
> @@ -7,7 +7,7 @@ name: simple
>  net0: virtio=A2:C0:43:77:08:A0,bridge=vmbr0
>  numa: 0
>  ostype: l26
> -scsi0: local:8006/vm-8006-disk-0.qcow2,discard=on,size=104858K
> +scsi0: local:8006/vol-vm-8006-disk-0.qcow2,discard=on,size=104858K
>  scsihw: virtio-scsi-pci
>  smbios1: uuid=7b10d7af-b932-4c66-b2c3-3996152ec465
>  sockets: 1
> diff --git a/src/test/cfg2cmd/simple1.conf.cmd b/src/test/cfg2cmd/simple1.conf.cmd
> index 49b848f2..c17d3262 100644
> --- a/src/test/cfg2cmd/simple1.conf.cmd
> +++ b/src/test/cfg2cmd/simple1.conf.cmd
> @@ -28,7 +28,7 @@
>    -iscsi 'initiator-name=iqn.1993-08.org.debian:01:aabbccddeeff' \
>    -device 'ide-cd,bus=ide.1,unit=0,id=ide2,bootindex=200' \
>    -device 'virtio-scsi-pci,id=scsihw0,bus=pci.0,addr=0x5' \
> -  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/var/lib/vz/images/8006/vm-8006-disk-0.qcow2","node-name":"ecd04be4259153b8293415fefa2a84c","read-only":false},"node-name":"fcd04be4259153b8293415fefa2a84c","read-only":false},"node-name":"drive-scsi0","read-only":false,"throttle-group":"throttle-drive-scsi0"}' \
> +  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/var/lib/vz/vms/8006/vol-vm-8006-disk-0.qcow2","node-name":"ecd04be4259153b8293415fefa2a84c","read-only":false},"node-name":"fcd04be4259153b8293415fefa2a84c","read-only":false},"node-name":"drive-scsi0","read-only":false,"throttle-group":"throttle-drive-scsi0"}' \
>    -device 'scsi-hd,bus=scsihw0.0,channel=0,scsi-id=0,lun=0,drive=drive-scsi0,id=scsi0,device_id=drive-scsi0,bootindex=100,write-cache=on' \
>    -netdev 'type=tap,id=net0,ifname=tap8006i0,script=/usr/libexec/qemu-server/pve-bridge,downscript=/usr/libexec/qemu-server/pve-bridgedown,vhost=on' \
>    -device 'virtio-net-pci,mac=A2:C0:43:77:08:A0,netdev=net0,bus=pci.0,addr=0x12,id=net0,rx_queue_size=1024,tx_queue_size=256,bootindex=300' \
> diff --git a/src/test/cfg2cmd/unsupported-storage-content-type.conf b/src/test/cfg2cmd/unsupported-storage-content-type.conf
> index e33165a8..b2da3084 100644
> --- a/src/test/cfg2cmd/unsupported-storage-content-type.conf
> +++ b/src/test/cfg2cmd/unsupported-storage-content-type.conf
> @@ -1,3 +1,3 @@
>  # TEST: Unsupported storage content type in a volume disk
>  # EXPECT_ERROR: storage 'noimages' does not support content-type 'images'
> -scsi0: noimages:8006/vm-8006-disk-0.raw,iothread=1,size=32G
> +scsi0: noimages:8006/vol-vm-8006-disk-0.raw,iothread=1,size=32G
> diff --git a/src/test/parse-config-expected/cloudinit-snapshot.conf b/src/test/parse-config-expected/cloudinit-snapshot.conf
> index bc01f975..b9ec855b 100644
> --- a/src/test/parse-config-expected/cloudinit-snapshot.conf
> +++ b/src/test/parse-config-expected/cloudinit-snapshot.conf
> @@ -10,11 +10,11 @@ net0: vmxnet3=BC:24:11:2C:69:EC,bridge=vnet0,firewall=1
>  numa: 0
>  ostype: l26
>  parent: cloudinit
> -scsi0: nfs:120/vm-120-disk-0.qcow2,iothread=1,size=4G
> +scsi0: nfs:120/vol-vm-120-disk-0.qcow2,iothread=1,size=4G
>  scsihw: virtio-scsi-single
>  smbios1: uuid=b3247ab1-1fe6-428e-965b-08a1b64a8746
>  sockets: 1
> -unused0: rbd:vm-120-disk-0
> +unused0: rbd:vol-vm-120-disk-0
>  vmgenid: 7079e97c-50e3-4079-afe7-23e67566b946
>  
>  [special:cloudinit]
> @@ -32,7 +32,7 @@ meta: creation-qemu=9.0.2,ctime=1725975013
>  name: deb1223
>  net0: vmxnet3=BC:24:11:2C:69:EC,bridge=vnet0,firewall=1
>  ostype: l26
> -scsi0: nfs:120/vm-120-disk-0.qcow2,iothread=1,size=4G
> +scsi0: nfs:120/vol-vm-120-disk-0.qcow2,iothread=1,size=4G
>  scsihw: virtio-scsi-single
>  smbios1: uuid=b3247ab1-1fe6-428e-965b-08a1b64a8746
>  snaptime: 1737549549
> diff --git a/src/test/parse-config-expected/duplicate-sections.conf b/src/test/parse-config-expected/duplicate-sections.conf
> index 1cb7a88a..ae6aaaa1 100644
> --- a/src/test/parse-config-expected/duplicate-sections.conf
> +++ b/src/test/parse-config-expected/duplicate-sections.conf
> @@ -10,11 +10,11 @@ net0: vmxnet3=BC:24:11:2C:69:EC,bridge=vnet0,firewall=1
>  numa: 0
>  ostype: l26
>  parent: foo
> -scsi0: nfs:120/vm-120-disk-0.qcow2,iothread=1,size=4G
> +scsi0: nfs:120/vol-vm-120-disk-0.qcow2,iothread=1,size=4G
>  scsihw: virtio-scsi-single
>  smbios1: uuid=b3247ab1-1fe6-428e-965b-08a1b64a8746
>  sockets: 1
> -unused0: rbd:vm-120-disk-0
> +unused0: rbd:vol-vm-120-disk-0
>  vmgenid: 7079e97c-50e3-4079-afe7-23e67566b946
>  
>  [PENDING]
> @@ -35,7 +35,7 @@ name: deb1223
>  net0: vmxnet3=BC:24:11:2C:69:EC,bridge=vnet0,firewall=1
>  numa: 0
>  ostype: l26
> -scsi0: nfs:120/vm-120-disk-0.qcow2,iothread=1,size=4G
> +scsi0: nfs:120/vol-vm-120-disk-0.qcow2,iothread=1,size=4G
>  scsihw: virtio-scsi-single
>  smbios1: uuid=b3247ab1-1fe6-428e-965b-08a1b64a8746
>  snaptime: 1737548747
> diff --git a/src/test/parse-config-expected/unknown-sections.conf b/src/test/parse-config-expected/unknown-sections.conf
> index 6329c33a..57e8a14f 100644
> --- a/src/test/parse-config-expected/unknown-sections.conf
> +++ b/src/test/parse-config-expected/unknown-sections.conf
> @@ -10,11 +10,11 @@ net0: vmxnet3=BC:24:11:2C:69:EC,bridge=vnet0,firewall=1
>  numa: 0
>  ostype: l26
>  parent: foo
> -scsi0: nfs:120/vm-120-disk-0.qcow2,iothread=1,size=4G
> +scsi0: nfs:120/vol-vm-120-disk-0.qcow2,iothread=1,size=4G
>  scsihw: virtio-scsi-single
>  smbios1: uuid=b3247ab1-1fe6-428e-965b-08a1b64a8746
>  sockets: 1
> -unused0: rbd:vm-120-disk-0
> +unused0: rbd:vol-vm-120-disk-0
>  vmgenid: 7079e97c-50e3-4079-afe7-23e67566b946
>  
>  [PENDING]
> @@ -36,7 +36,7 @@ name: deb1223
>  net0: vmxnet3=BC:24:11:2C:69:EC,bridge=vnet0,firewall=1
>  numa: 0
>  ostype: l26
> -scsi0: nfs:120/vm-120-disk-0.qcow2,iothread=1,size=4G
> +scsi0: nfs:120/vol-vm-120-disk-0.qcow2,iothread=1,size=4G
>  scsihw: virtio-scsi-single
>  smbios1: uuid=b3247ab1-1fe6-428e-965b-08a1b64a8746
>  snaptime: 1737548747
> diff --git a/src/test/parse-config-expected/verify-snapshot.conf b/src/test/parse-config-expected/verify-snapshot.conf
> index cd503f86..04fa1ee1 100644
> --- a/src/test/parse-config-expected/verify-snapshot.conf
> +++ b/src/test/parse-config-expected/verify-snapshot.conf
> @@ -10,11 +10,11 @@ net0: vmxnet3=BC:24:11:2C:69:EC,bridge=vnet0,firewall=1
>  numa: 0
>  ostype: l26
>  parent: snap
> -scsi0: nfs:120/vm-120-disk-0.qcow2,iothread=1,size=4G
> +scsi0: nfs:120/vol-vm-120-disk-0.qcow2,iothread=1,size=4G
>  scsihw: virtio-scsi-single
>  smbios1: uuid=b3247ab1-1fe6-428e-965b-08a1b64a8746
>  sockets: 1
> -unused0: rbd:vm-120-disk-0
> +unused0: rbd:vol-vm-120-disk-0
>  vmgenid: 7079e97c-50e3-4079-afe7-23e67566b946
>  
>  [snap]
> @@ -28,7 +28,7 @@ meta: creation-qemu=9.0.2,ctime=1725975013
>  name: deb1223
>  net0: vmxnet3=BC:24:11:2C:69:EC,bridge=vnet0,firewall=1
>  ostype: l26
> -scsi0: nfs:120/vm-120-disk-0.qcow2,iothread=1,size=4G
> +scsi0: nfs:120/vol-vm-120-disk-0.qcow2,iothread=1,size=4G
>  scsihw: virtio-scsi-single
>  smbios1: uuid=b3247ab1-1fe6-428e-965b-08a1b64a8746
>  snaptime: 1737549549
> diff --git a/src/test/parse-config-input/cloudinit-snapshot.conf b/src/test/parse-config-input/cloudinit-snapshot.conf
> index 9be05b1c..98ba017f 100644
> --- a/src/test/parse-config-input/cloudinit-snapshot.conf
> +++ b/src/test/parse-config-input/cloudinit-snapshot.conf
> @@ -10,11 +10,11 @@ net0: vmxnet3=BC:24:11:2C:69:EC,bridge=vnet0,firewall=1
>  numa: 0
>  ostype: l26
>  parent: cloudinit
> -scsi0: nfs:120/vm-120-disk-0.qcow2,iothread=1,size=4G
> +scsi0: nfs:120/vol-vm-120-disk-0.qcow2,iothread=1,size=4G
>  scsihw: virtio-scsi-single
>  smbios1: uuid=b3247ab1-1fe6-428e-965b-08a1b64a8746
>  sockets: 1
> -unused0: rbd:vm-120-disk-0
> +unused0: rbd:vol-vm-120-disk-0
>  vmgenid: 7079e97c-50e3-4079-afe7-23e67566b946
>  
>  [special:cloudinit]
> @@ -33,7 +33,7 @@ name: deb1223
>  net0: vmxnet3=BC:24:11:2C:69:EC,bridge=vnet0,firewall=1
>  numa: verify meee~ :)
>  ostype: l26
> -scsi0: nfs:120/vm-120-disk-0.qcow2,iothread=1,size=4G
> +scsi0: nfs:120/vol-vm-120-disk-0.qcow2,iothread=1,size=4G
>  scsihw: virtio-scsi-single
>  smbios1: uuid=b3247ab1-1fe6-428e-965b-08a1b64a8746
>  snaptime: 1737549549
> diff --git a/src/test/parse-config-input/duplicate-sections.conf b/src/test/parse-config-input/duplicate-sections.conf
> index 41e90e37..064a7b33 100644
> --- a/src/test/parse-config-input/duplicate-sections.conf
> +++ b/src/test/parse-config-input/duplicate-sections.conf
> @@ -10,11 +10,11 @@ net0: vmxnet3=BC:24:11:2C:69:EC,bridge=vnet0,firewall=1
>  numa: 0
>  ostype: l26
>  parent: foo
> -scsi0: nfs:120/vm-120-disk-0.qcow2,iothread=1,size=4G
> +scsi0: nfs:120/vol-vm-120-disk-0.qcow2,iothread=1,size=4G
>  scsihw: virtio-scsi-single
>  smbios1: uuid=b3247ab1-1fe6-428e-965b-08a1b64a8746
>  sockets: 1
> -unused0: rbd:vm-120-disk-0
> +unused0: rbd:vol-vm-120-disk-0
>  vmgenid: 7079e97c-50e3-4079-afe7-23e67566b946
>  
>  [PENDING]
> @@ -41,7 +41,7 @@ name: deb1223
>  net0: vmxnet3=BC:24:11:2C:69:EC,bridge=vnet0,firewall=1
>  numa: 0
>  ostype: l26
> -scsi0: nfs:120/vm-120-disk-0.qcow2,iothread=1,size=4G
> +scsi0: nfs:120/vol-vm-120-disk-0.qcow2,iothread=1,size=4G
>  scsihw: virtio-scsi-single
>  smbios1: uuid=b3247ab1-1fe6-428e-965b-08a1b64a8746
>  snaptime: 1737548747
> @@ -60,7 +60,7 @@ name: deb1223
>  net0: vmxnet3=BC:24:11:2C:69:EC,bridge=vnet0,firewall=1
>  numa: 0
>  ostype: l26
> -scsi0: nfs:120/vm-120-disk-0.qcow2,iothread=1,size=4G
> +scsi0: nfs:120/vol-vm-120-disk-0.qcow2,iothread=1,size=4G
>  scsihw: virtio-scsi-single
>  smbios1: uuid=b3247ab1-1fe6-428e-965b-08a1b64a8746
>  snaptime: 1737548747
> diff --git a/src/test/parse-config-input/fleecing-section.conf b/src/test/parse-config-input/fleecing-section.conf
> index ee89dc56..30c65ede 100644
> --- a/src/test/parse-config-input/fleecing-section.conf
> +++ b/src/test/parse-config-input/fleecing-section.conf
> @@ -9,11 +9,11 @@ name: deb1223
>  net0: vmxnet3=BC:24:11:2C:69:EC,bridge=vnet0,firewall=1
>  numa: 0
>  ostype: l26
> -scsi0: nfs:120/vm-120-disk-0.qcow2,iothread=1,size=4G
> +scsi0: nfs:120/vol-vm-120-disk-0.qcow2,iothread=1,size=4G
>  scsihw: virtio-scsi-single
>  smbios1: uuid=b3247ab1-1fe6-428e-965b-08a1b64a8746
>  sockets: 1
> -unused0: rbd:vm-120-disk-0
> +unused0: rbd:vol-vm-120-disk-0
>  vmgenid: 7079e97c-50e3-4079-afe7-23e67566b946
>  
>  [special:fleecing]
> diff --git a/src/test/parse-config-input/locked.conf b/src/test/parse-config-input/locked.conf
> index 38b6e36c..610026b7 100644
> --- a/src/test/parse-config-input/locked.conf
> +++ b/src/test/parse-config-input/locked.conf
> @@ -8,9 +8,9 @@ name: apache
>  net0: virtio=92:38:11:FD:ED:87,bridge=vmbr0,firewall=1
>  numa: 0
>  ostype: l26
> -scsi0: mydir:1422/vm-1422-disk-0.qcow2,size=4G
> +scsi0: mydir:1422/vol-vm-1422-disk-0.qcow2,size=4G
>  scsihw: virtio-scsi-pci
>  smbios1: uuid=ddf91b3f-a597-42be-9a7e-fb6421dcd5cd
>  sockets: 1
> -unused7: mydir:1422/vm-1422-disk-8.qcow2
> +unused7: mydir:1422/vol-vm-1422-disk-8.qcow2
>  vmgenid: 0
> diff --git a/src/test/parse-config-input/plain.conf b/src/test/parse-config-input/plain.conf
> index 63449b9e..8e36cc5a 100644
> --- a/src/test/parse-config-input/plain.conf
> +++ b/src/test/parse-config-input/plain.conf
> @@ -7,7 +7,7 @@ name: apache
>  net0: virtio=92:38:11:FD:ED:87,bridge=vmbr0,firewall=1
>  numa: 0
>  ostype: l26
> -scsi0: mydir:142/vm-142-disk-0.qcow2,size=4G
> +scsi0: mydir:142/vol-vm-142-disk-0.qcow2,size=4G
>  scsihw: virtio-scsi-pci
>  smbios1: uuid=ddf91b3f-a597-42be-9a7e-fb6421dcd5cd
>  sockets: 1
> diff --git a/src/test/parse-config-input/regular-vm-efi.conf b/src/test/parse-config-input/regular-vm-efi.conf
> index 9d75fff2..91c9528e 100644
> --- a/src/test/parse-config-input/regular-vm-efi.conf
> +++ b/src/test/parse-config-input/regular-vm-efi.conf
> @@ -2,14 +2,14 @@
>  bios: ovmf
>  boot: order=scsi0;ide2;net0
>  cores: 1
> -efidisk0: mydir:139/vm-139-disk-0.qcow2,size=128K
> +efidisk0: mydir:139/vol-vm-139-disk-0.qcow2,size=128K
>  ide2: local:iso/debian-10.6.0-amd64-netinst.iso,media=cdrom
>  memory: 2048
>  name: eficloneclone
>  net0: virtio=7A:6C:A5:8B:11:93,bridge=vmbr0,firewall=1
>  numa: 0
>  ostype: l26
> -scsi0: rbdkvm:vm-139-disk-1,size=4G
> +scsi0: rbdkvm:vol-vm-139-disk-1,size=4G
>  scsihw: virtio-scsi-pci
>  smbios1: uuid=21a7e7bc-3cd2-4232-a009-a41f4ee992ae
>  sockets: 1
> diff --git a/src/test/parse-config-input/sections.conf b/src/test/parse-config-input/sections.conf
> index 6329c33a..57e8a14f 100644
> --- a/src/test/parse-config-input/sections.conf
> +++ b/src/test/parse-config-input/sections.conf
> @@ -10,11 +10,11 @@ net0: vmxnet3=BC:24:11:2C:69:EC,bridge=vnet0,firewall=1
>  numa: 0
>  ostype: l26
>  parent: foo
> -scsi0: nfs:120/vm-120-disk-0.qcow2,iothread=1,size=4G
> +scsi0: nfs:120/vol-vm-120-disk-0.qcow2,iothread=1,size=4G
>  scsihw: virtio-scsi-single
>  smbios1: uuid=b3247ab1-1fe6-428e-965b-08a1b64a8746
>  sockets: 1
> -unused0: rbd:vm-120-disk-0
> +unused0: rbd:vol-vm-120-disk-0
>  vmgenid: 7079e97c-50e3-4079-afe7-23e67566b946
>  
>  [PENDING]
> @@ -36,7 +36,7 @@ name: deb1223
>  net0: vmxnet3=BC:24:11:2C:69:EC,bridge=vnet0,firewall=1
>  numa: 0
>  ostype: l26
> -scsi0: nfs:120/vm-120-disk-0.qcow2,iothread=1,size=4G
> +scsi0: nfs:120/vol-vm-120-disk-0.qcow2,iothread=1,size=4G
>  scsihw: virtio-scsi-single
>  smbios1: uuid=b3247ab1-1fe6-428e-965b-08a1b64a8746
>  snaptime: 1737548747
> diff --git a/src/test/parse-config-input/snapshots.conf b/src/test/parse-config-input/snapshots.conf
> index 4f4f8675..a0ea59ac 100644
> --- a/src/test/parse-config-input/snapshots.conf
> +++ b/src/test/parse-config-input/snapshots.conf
> @@ -1,7 +1,7 @@
>  boot: order=scsi1;ide2;net0;ide1
>  cores: 4
>  cpu: x86-64-v2-AES
> -ide0: dir:111/vm-111-disk-2.qcow2,size=1G
> +ide0: dir:111/vol-vm-111-disk-2.qcow2,size=1G
>  ide1: sani:iso/virtio-win-0.1.266.iso,media=cdrom,size=707456K
>  ide2: sani:iso/Win2019-evaluation.iso,media=cdrom,size=4985424K
>  machine: pc-i440fx-9.1
> @@ -13,21 +13,21 @@ net1: e1000=BC:24:11:79:D5:65,bridge=vnet0,firewall=1
>  numa: 0
>  ostype: win10
>  parent: win19_5_2_plus_stuff
> -scsi0: dir:111/vm-111-disk-1.qcow2,iothread=1,size=1G
> -scsi1: lvmthinbig:vm-111-disk-0,iothread=1,size=32G
> +scsi0: dir:111/vol-vm-111-disk-1.qcow2,iothread=1,size=1G
> +scsi1: lvmthinbig:vol-vm-111-disk-0,iothread=1,size=32G
>  scsihw: virtio-scsi-single
>  smbios1: uuid=2c4a2cda-712b-44ab-8728-51f5e734b658
>  sockets: 1
> -unused0: rbd:vm-111-disk-0
> +unused0: rbd:vol-vm-111-disk-0
>  vga: qxl
> -virtio0: dir:111/vm-111-disk-0.qcow2,iothread=1,size=1G
> +virtio0: dir:111/vol-vm-111-disk-0.qcow2,iothread=1,size=1G
>  vmgenid: 713da648-38a6-489e-b0b2-dd9cef419f33
>  
>  [machine_version_5_1]
>  boot: order=ide0;ide2;net0
>  cores: 4
>  cpu: x86-64-v2-AES
> -ide0: lvmthinbig:vm-111-disk-0,size=32G
> +ide0: lvmthinbig:vol-vm-111-disk-0,size=32G
>  ide2: sani:iso/Win2016-1616-evaluation.ISO,media=cdrom,size=5198078K
>  memory: 4096
>  meta: creation-qemu=9.1.2,ctime=1736349024
> @@ -45,7 +45,7 @@ vmgenid: 1f314a76-50a3-4b92-9307-c8c6e313d3ca
>  boot: order=ide0;ide2;net0;ide1
>  cores: 4
>  cpu: x86-64-v2-AES
> -ide0: lvmthinbig:vm-111-disk-0,size=32G
> +ide0: lvmthinbig:vol-vm-111-disk-0,size=32G
>  ide1: sani:iso/virtio-win-0.1.266.iso,media=cdrom,size=707456K
>  ide2: sani:iso/Win2016-1616-evaluation.ISO,media=cdrom,size=5198078K
>  memory: 4096
> @@ -55,12 +55,12 @@ net0: virtio=BC:24:11:A3:DA:B1,bridge=vnet0,firewall=1
>  numa: 0
>  ostype: win10
>  parent: machine_version_5_1
> -scsi0: dir:111/vm-111-disk-1.qcow2,iothread=1,size=1G
> +scsi0: dir:111/vol-vm-111-disk-1.qcow2,iothread=1,size=1G
>  scsihw: virtio-scsi-single
>  smbios1: uuid=2c4a2cda-712b-44ab-8728-51f5e734b658
>  snaptime: 1736940462
>  sockets: 1
> -virtio0: dir:111/vm-111-disk-0.qcow2,iothread=1,size=1G
> +virtio0: dir:111/vol-vm-111-disk-0.qcow2,iothread=1,size=1G
>  vmgenid: 4f602356-cb9c-45ad-a554-d76d95c7c0f8
>  
>  [ovmf_machine_version_5_1]
> @@ -68,8 +68,8 @@ bios: ovmf
>  boot: order=ide0;ide2;net0;ide1
>  cores: 4
>  cpu: x86-64-v2-AES
> -efidisk0: rbd:vm-111-disk-0,efitype=4m,pre-enrolled-keys=1,size=1M
> -ide0: lvmthinbig:vm-111-disk-0,size=32G
> +efidisk0: rbd:vol-vm-111-disk-0,efitype=4m,pre-enrolled-keys=1,size=1M
> +ide0: lvmthinbig:vol-vm-111-disk-0,size=32G
>  ide1: sani:iso/virtio-win-0.1.266.iso,media=cdrom,size=707456K
>  ide2: sani:iso/Win2016-1616-evaluation.ISO,media=cdrom,size=5198078K
>  machine: pc-q35-5.1
> @@ -80,12 +80,12 @@ net0: e1000=BC:24:11:A3:DA:B1,bridge=vnet0,firewall=1
>  numa: 0
>  ostype: win10
>  parent: machine_version_5_1_with_virtio
> -scsi0: dir:111/vm-111-disk-1.qcow2,iothread=1,size=1G
> +scsi0: dir:111/vol-vm-111-disk-1.qcow2,iothread=1,size=1G
>  scsihw: virtio-scsi-single
>  smbios1: uuid=2c4a2cda-712b-44ab-8728-51f5e734b658
>  snaptime: 1736943308
>  sockets: 1
> -virtio0: dir:111/vm-111-disk-0.qcow2,iothread=1,size=1G
> +virtio0: dir:111/vol-vm-111-disk-0.qcow2,iothread=1,size=1G
>  vmgenid: 4f602356-cb9c-45ad-a554-d76d95c7c0f8
>  
>  [ovmf_machine_version_5_1_virtio]
> @@ -93,8 +93,8 @@ bios: ovmf
>  boot: order=ide0;ide2;net0;ide1
>  cores: 4
>  cpu: x86-64-v2-AES
> -efidisk0: rbd:vm-111-disk-0,efitype=4m,pre-enrolled-keys=1,size=1M
> -ide0: lvmthinbig:vm-111-disk-0,size=32G
> +efidisk0: rbd:vol-vm-111-disk-0,efitype=4m,pre-enrolled-keys=1,size=1M
> +ide0: lvmthinbig:vol-vm-111-disk-0,size=32G
>  ide1: sani:iso/virtio-win-0.1.266.iso,media=cdrom,size=707456K
>  ide2: sani:iso/Win2016-1616-evaluation.ISO,media=cdrom,size=5198078K
>  machine: pc-q35-5.1
> @@ -105,12 +105,12 @@ net0: virtio=BC:24:11:A3:DA:B1,bridge=vnet0,firewall=1
>  numa: 0
>  ostype: win10
>  parent: ovmf_machine_version_5_1
> -scsi0: dir:111/vm-111-disk-1.qcow2,iothread=1,size=1G
> +scsi0: dir:111/vol-vm-111-disk-1.qcow2,iothread=1,size=1G
>  scsihw: virtio-scsi-single
>  smbios1: uuid=2c4a2cda-712b-44ab-8728-51f5e734b658
>  snaptime: 1736944525
>  sockets: 1
> -virtio0: dir:111/vm-111-disk-0.qcow2,iothread=1,size=1G
> +virtio0: dir:111/vol-vm-111-disk-0.qcow2,iothread=1,size=1G
>  vmgenid: 00b95468-4f34-4faa-b0af-b214ff5bbcdf
>  
>  [static-network]
> @@ -118,8 +118,8 @@ bios: ovmf
>  boot: order=ide0;ide2;net0;ide1
>  cores: 4
>  cpu: x86-64-v2-AES
> -efidisk0: rbd:vm-111-disk-0,efitype=4m,pre-enrolled-keys=1,size=1M
> -ide0: lvmthinbig:vm-111-disk-0,size=32G
> +efidisk0: rbd:vol-vm-111-disk-0,efitype=4m,pre-enrolled-keys=1,size=1M
> +ide0: lvmthinbig:vol-vm-111-disk-0,size=32G
>  ide1: sani:iso/virtio-win-0.1.266.iso,media=cdrom,size=707456K
>  ide2: sani:iso/Win2016-1616-evaluation.ISO,media=cdrom,size=5198078K
>  machine: pc-q35-5.1
> @@ -130,12 +130,12 @@ net0: virtio=BC:24:11:A3:DA:B1,bridge=vnet0,firewall=1
>  numa: 0
>  ostype: win10
>  parent: ovmf_machine_version_5_1_virtio
> -scsi0: dir:111/vm-111-disk-1.qcow2,iothread=1,size=1G
> +scsi0: dir:111/vol-vm-111-disk-1.qcow2,iothread=1,size=1G
>  scsihw: virtio-scsi-single
>  smbios1: uuid=2c4a2cda-712b-44ab-8728-51f5e734b658
>  snaptime: 1736945713
>  sockets: 1
> -virtio0: dir:111/vm-111-disk-0.qcow2,iothread=1,size=1G
> +virtio0: dir:111/vol-vm-111-disk-0.qcow2,iothread=1,size=1G
>  vmgenid: 5d65fc62-2cb1-4945-9641-631b37c265a5
>  
>  [win19_5_2]
> @@ -153,20 +153,20 @@ net1: e1000=BC:24:11:79:D5:65,bridge=vnet0,firewall=1
>  numa: 0
>  ostype: win10
>  parent: machine_version_5_1_with_virtio
> -scsi0: dir:111/vm-111-disk-1.qcow2,iothread=1,size=1G
> -scsi1: lvmthinbig:vm-111-disk-0,iothread=1,size=32G
> +scsi0: dir:111/vol-vm-111-disk-1.qcow2,iothread=1,size=1G
> +scsi1: lvmthinbig:vol-vm-111-disk-0,iothread=1,size=32G
>  scsihw: virtio-scsi-single
>  smbios1: uuid=2c4a2cda-712b-44ab-8728-51f5e734b658
>  snaptime: 1736950690
>  sockets: 1
> -virtio0: dir:111/vm-111-disk-0.qcow2,iothread=1,size=1G
> +virtio0: dir:111/vol-vm-111-disk-0.qcow2,iothread=1,size=1G
>  vmgenid: f259de06-fa08-4ff7-8ba9-b1233a726ac4
>  
>  [win19_5_2_plus_stuff]
>  boot: order=scsi1;ide2;net0;ide1
>  cores: 4
>  cpu: x86-64-v2-AES
> -ide0: dir:111/vm-111-disk-2.qcow2,size=1G
> +ide0: dir:111/vol-vm-111-disk-2.qcow2,size=1G
>  ide1: sani:iso/virtio-win-0.1.266.iso,media=cdrom,size=707456K
>  ide2: sani:iso/Win2019-evaluation.iso,media=cdrom,size=4985424K
>  machine: pc-i440fx-5.2
> @@ -178,12 +178,12 @@ net1: e1000=BC:24:11:79:D5:65,bridge=vnet0,firewall=1
>  numa: 0
>  ostype: win10
>  parent: win19_5_2
> -scsi0: dir:111/vm-111-disk-1.qcow2,iothread=1,size=1G
> -scsi1: lvmthinbig:vm-111-disk-0,iothread=1,size=32G
> +scsi0: dir:111/vol-vm-111-disk-1.qcow2,iothread=1,size=1G
> +scsi1: lvmthinbig:vol-vm-111-disk-0,iothread=1,size=32G
>  scsihw: virtio-scsi-single
>  smbios1: uuid=2c4a2cda-712b-44ab-8728-51f5e734b658
>  snaptime: 1736951300
>  sockets: 1
>  vga: qxl
> -virtio0: dir:111/vm-111-disk-0.qcow2,iothread=1,size=1G
> +virtio0: dir:111/vol-vm-111-disk-0.qcow2,iothread=1,size=1G
>  vmgenid: 713da648-38a6-489e-b0b2-dd9cef419f33
> diff --git a/src/test/parse-config-input/unknown-sections.conf b/src/test/parse-config-input/unknown-sections.conf
> index 0dcd5951..0c86feee 100644
> --- a/src/test/parse-config-input/unknown-sections.conf
> +++ b/src/test/parse-config-input/unknown-sections.conf
> @@ -10,11 +10,11 @@ net0: vmxnet3=BC:24:11:2C:69:EC,bridge=vnet0,firewall=1
>  numa: 0
>  ostype: l26
>  parent: foo
> -scsi0: nfs:120/vm-120-disk-0.qcow2,iothread=1,size=4G
> +scsi0: nfs:120/vol-vm-120-disk-0.qcow2,iothread=1,size=4G
>  scsihw: virtio-scsi-single
>  smbios1: uuid=b3247ab1-1fe6-428e-965b-08a1b64a8746
>  sockets: 1
> -unused0: rbd:vm-120-disk-0
> +unused0: rbd:vol-vm-120-disk-0
>  vmgenid: 7079e97c-50e3-4079-afe7-23e67566b946
>  
>  [special:unknown123]
> @@ -45,7 +45,7 @@ name: deb1223
>  net0: vmxnet3=BC:24:11:2C:69:EC,bridge=vnet0,firewall=1
>  numa: 0
>  ostype: l26
> -scsi0: nfs:120/vm-120-disk-0.qcow2,iothread=1,size=4G
> +scsi0: nfs:120/vol-vm-120-disk-0.qcow2,iothread=1,size=4G
>  scsihw: virtio-scsi-single
>  smbios1: uuid=b3247ab1-1fe6-428e-965b-08a1b64a8746
>  snaptime: 1737548747
> diff --git a/src/test/parse-config-input/verify-snapshot.conf b/src/test/parse-config-input/verify-snapshot.conf
> index 5f52272d..4ad27782 100644
> --- a/src/test/parse-config-input/verify-snapshot.conf
> +++ b/src/test/parse-config-input/verify-snapshot.conf
> @@ -10,11 +10,11 @@ net0: vmxnet3=BC:24:11:2C:69:EC,bridge=vnet0,firewall=1
>  numa: 0
>  ostype: l26
>  parent: snap
> -scsi0: nfs:120/vm-120-disk-0.qcow2,iothread=1,size=4G
> +scsi0: nfs:120/vol-vm-120-disk-0.qcow2,iothread=1,size=4G
>  scsihw: virtio-scsi-single
>  smbios1: uuid=b3247ab1-1fe6-428e-965b-08a1b64a8746
>  sockets: 1
> -unused0: rbd:vm-120-disk-0
> +unused0: rbd:vol-vm-120-disk-0
>  vmgenid: 7079e97c-50e3-4079-afe7-23e67566b946
>  
>  [snap]
> @@ -29,7 +29,7 @@ name: deb1223
>  net0: vmxnet3=BC:24:11:2C:69:EC,bridge=vnet0,firewall=1
>  numa: verify meee~ :)
>  ostype: l26
> -scsi0: nfs:120/vm-120-disk-0.qcow2,iothread=1,size=4G
> +scsi0: nfs:120/vol-vm-120-disk-0.qcow2,iothread=1,size=4G
>  scsihw: virtio-scsi-single
>  smbios1: uuid=b3247ab1-1fe6-428e-965b-08a1b64a8746
>  snaptime: 1737549549
> diff --git a/src/test/restore-config-expected/139.conf b/src/test/restore-config-expected/139.conf
> index 94425f7e..9f47afa5 100644
> --- a/src/test/restore-config-expected/139.conf
> +++ b/src/test/restore-config-expected/139.conf
> @@ -2,14 +2,14 @@
>  bios: ovmf
>  boot: order=scsi0;ide2;net0
>  cores: 1
> -efidisk0: target:139/vm-139-disk-0.qcow2,size=128K
> +efidisk0: target:139/vol-vm-139-disk-0.qcow2,size=128K
>  ide2: local:iso/debian-10.6.0-amd64-netinst.iso,media=cdrom
>  memory: 2048
>  name: eficloneclone
>  net0: virtio=7A:6C:A5:8B:11:93,bridge=vmbr0,firewall=1
>  numa: 0
>  ostype: l26
> -scsi0: target:139/vm-139-disk-1.raw,size=4G
> +scsi0: target:139/vol-vm-139-disk-1.raw,size=4G
>  scsihw: virtio-scsi-pci
>  smbios1: uuid=21a7e7bc-3cd2-4232-a009-a41f4ee992ae
>  sockets: 1
> diff --git a/src/test/restore-config-expected/142.conf b/src/test/restore-config-expected/142.conf
> index ac2d2ad2..e59b40b4 100644
> --- a/src/test/restore-config-expected/142.conf
> +++ b/src/test/restore-config-expected/142.conf
> @@ -7,7 +7,7 @@ name: apache
>  net0: virtio=92:38:11:FD:ED:87,bridge=vmbr0,firewall=1
>  numa: 0
>  ostype: l26
> -scsi0: target:142/vm-142-disk-0.qcow2,size=4G
> +scsi0: target:142/vol-vm-142-disk-0.qcow2,size=4G
>  scsihw: virtio-scsi-pci
>  smbios1: uuid=ddf91b3f-a597-42be-9a7e-fb6421dcd5cd
>  sockets: 1
> diff --git a/src/test/restore-config-expected/1422.conf b/src/test/restore-config-expected/1422.conf
> index 2d77a44a..688a9b7b 100644
> --- a/src/test/restore-config-expected/1422.conf
> +++ b/src/test/restore-config-expected/1422.conf
> @@ -7,7 +7,7 @@ name: apache
>  net0: virtio=92:38:11:FD:ED:87,bridge=vmbr0,firewall=1
>  numa: 0
>  ostype: l26
> -scsi0: target:1422/vm-1422-disk-0.qcow2,size=4G
> +scsi0: target:1422/vol-vm-1422-disk-0.qcow2,size=4G
>  scsihw: virtio-scsi-pci
>  smbios1: uuid=ddf91b3f-a597-42be-9a7e-fb6421dcd5cd
>  sockets: 1
> diff --git a/src/test/restore-config-expected/179.conf b/src/test/restore-config-expected/179.conf
> index 4444efb5..6d5a7242 100644
> --- a/src/test/restore-config-expected/179.conf
> +++ b/src/test/restore-config-expected/179.conf
> @@ -6,11 +6,11 @@ memory: 2048
>  net0: virtio=26:15:5B:73:3F:7C,bridge=vmbr0,firewall=1
>  numa: 0
>  ostype: l26
> -scsi0: target:179/vm-179-disk-0.qcow2,cache=none,discard=on,size=32G,ssd=1
> -scsi1: target:179/vm-179-disk-1.qcow2,cache=writethrough,size=32G
> -scsi2: target:179/vm-179-disk-2.qcow2,mbps_rd=7,mbps_wr=7,replicate=0,size=32G
> -scsi3: target:179/vm-179-disk-3.vmdk,size=32G
> -#scsi4: myfs:179/vm-179-disk-1.qcow2,backup=0,size=32G
> +scsi0: target:179/vol-vm-179-disk-0.qcow2,cache=none,discard=on,size=32G,ssd=1
> +scsi1: target:179/vol-vm-179-disk-1.qcow2,cache=writethrough,size=32G
> +scsi2: target:179/vol-vm-179-disk-2.qcow2,mbps_rd=7,mbps_wr=7,replicate=0,size=32G
> +scsi3: target:179/vol-vm-179-disk-3.vmdk,size=32G
> +#scsi4: myfs:179/vol-vm-179-disk-1.qcow2,backup=0,size=32G
>  scsihw: virtio-scsi-pci
>  smbios1: uuid=1819ead7-a55d-4544-8d38-29ca94869a9c
>  sockets: 1
> diff --git a/src/test/restore-config-input/139.conf b/src/test/restore-config-input/139.conf
> index 5acb4d4d..b5926453 100644
> --- a/src/test/restore-config-input/139.conf
> +++ b/src/test/restore-config-input/139.conf
> @@ -2,14 +2,14 @@
>  bios: ovmf
>  boot: order=scsi0;ide2;net0
>  cores: 1
> -efidisk0: mydir:139/vm-139-disk-0.qcow2,size=128K
> +efidisk0: mydir:139/vol-vm-139-disk-0.qcow2,size=128K
>  ide2: local:iso/debian-10.6.0-amd64-netinst.iso,media=cdrom
>  memory: 2048
>  name: eficloneclone
>  net0: virtio=7A:6C:A5:8B:11:93,bridge=vmbr0,firewall=1
>  numa: 0
>  ostype: l26
> -scsi0: rbdkvm:vm-139-disk-1,size=4G
> +scsi0: rbdkvm:vol-vm-139-disk-1,size=4G
>  scsihw: virtio-scsi-pci
>  smbios1: uuid=21a7e7bc-3cd2-4232-a009-a41f4ee992ae
>  sockets: 1
> diff --git a/src/test/restore-config-input/142.conf b/src/test/restore-config-input/142.conf
> index f3633aaf..82c0a781 100644
> --- a/src/test/restore-config-input/142.conf
> +++ b/src/test/restore-config-input/142.conf
> @@ -7,7 +7,7 @@ name: apache
>  net0: virtio=92:38:11:FD:ED:87,bridge=vmbr0,firewall=1
>  numa: 0
>  ostype: l26
> -scsi0: mydir:142/vm-142-disk-0.qcow2,size=4G
> +scsi0: mydir:142/vol-vm-142-disk-0.qcow2,size=4G
>  scsihw: virtio-scsi-pci
>  smbios1: uuid=ddf91b3f-a597-42be-9a7e-fb6421dcd5cd
>  sockets: 1
> diff --git a/src/test/restore-config-input/1422.conf b/src/test/restore-config-input/1422.conf
> index d3155023..325ad557 100644
> --- a/src/test/restore-config-input/1422.conf
> +++ b/src/test/restore-config-input/1422.conf
> @@ -7,8 +7,8 @@ name: apache
>  net0: virtio=92:38:11:FD:ED:87,bridge=vmbr0,firewall=1
>  numa: 0
>  ostype: l26
> -scsi0: mydir:1422/vm-1422-disk-0.qcow2,size=4G
> -unused7: mydir:1422/vm-1422-disk-8.qcow2
> +scsi0: mydir:1422/vol-vm-1422-disk-0.qcow2,size=4G
> +unused7: mydir:1422/vol-vm-1422-disk-8.qcow2
>  parent: snap
>  lock: backup
>  scsihw: virtio-scsi-pci
> diff --git a/src/test/restore-config-input/179.conf b/src/test/restore-config-input/179.conf
> index e1ee01a5..ca3c68e6 100644
> --- a/src/test/restore-config-input/179.conf
> +++ b/src/test/restore-config-input/179.conf
> @@ -6,11 +6,11 @@ memory: 2048
>  net0: virtio=26:15:5B:73:3F:7C,bridge=vmbr0,firewall=1
>  numa: 0
>  ostype: l26
> -scsi0: myfs:179/vm-179-disk-4.qcow2,cache=none,discard=on,size=32G,ssd=1
> -scsi1: myfs:179/vm-179-disk-0.qcow2,cache=writethrough,size=32G
> -scsi2: myfs:179/vm-179-disk-2.qcow2,mbps_rd=7,mbps_wr=7,replicate=0,size=32G
> -scsi3: myfs:179/vm-179-disk-3.vmdk,size=32G
> -scsi4: myfs:179/vm-179-disk-1.qcow2,backup=0,size=32G
> +scsi0: myfs:179/vol-vm-179-disk-4.qcow2,cache=none,discard=on,size=32G,ssd=1
> +scsi1: myfs:179/vol-vm-179-disk-0.qcow2,cache=writethrough,size=32G
> +scsi2: myfs:179/vol-vm-179-disk-2.qcow2,mbps_rd=7,mbps_wr=7,replicate=0,size=32G
> +scsi3: myfs:179/vol-vm-179-disk-3.vmdk,size=32G
> +scsi4: myfs:179/vol-vm-179-disk-1.qcow2,backup=0,size=32G
>  scsihw: virtio-scsi-pci
>  smbios1: uuid=1819ead7-a55d-4544-8d38-29ca94869a9c
>  sockets: 1
> diff --git a/src/test/run_config2command_tests.pl b/src/test/run_config2command_tests.pl
> index 0623b5c1..eee72d77 100755
> --- a/src/test/run_config2command_tests.pl
> +++ b/src/test/run_config2command_tests.pl
> @@ -283,29 +283,29 @@ $storage_module->mock(
>          if ($storeid eq 'localsnapext') {
>              $snapshots = {
>                  current => {
> -                    file => 'var/lib/vzsnapext/images/8006/vm-8006-disk-0.qcow2',
> +                    file => 'var/lib/vzsnapext/vms/8006/vol-vm-8006-disk-0.qcow2',
>                      parent => 'snap2',
>                  },
>                  snap2 => {
> -                    file => '/var/lib/vzsnapext/images/8006/snap2-vm-8006-disk-0.qcow2',
> +                    file => '/var/lib/vzsnapext/images/8006/snap2-vol-vm-8006-disk-0.qcow2',
>                      parent => 'snap1',
>                  },
>                  snap1 => {
> -                    file => '/var/lib/vzsnapext/images/8006/snap1-vm-8006-disk-0.qcow2',
> +                    file => '/var/lib/vzsnapext/images/8006/snap1-vol-vm-8006-disk-0.qcow2',
>                  },
>              };
>          } elsif ($storeid eq 'lvm-store') {
>              $snapshots = {
>                  current => {
> -                    file => '/dev/veegee/vm-8006-disk-0.qcow2',
> +                    file => '/dev/veegee/vol-vm-8006-disk-0.qcow2',
>                      parent => 'snap2',
>                  },
>                  snap2 => {
> -                    file => '/dev/veegee/snap2-vm-8006-disk-0.qcow2',
> +                    file => '/dev/veegee/snap2-vol-vm-8006-disk-0.qcow2',
>                      parent => 'snap1',
>                  },
>                  snap1 => {
> -                    file => '/dev/veegee/snap1-vm-8006-disk-0.qcow2',
> +                    file => '/dev/veegee/snap1-vol-vm-8006-disk-0.qcow2',
>                  },
>              };
>          }
> diff --git a/src/test/run_qemu_img_convert_tests.pl b/src/test/run_qemu_img_convert_tests.pl
> index 3c8f09f0..2acbbef4 100755
> --- a/src/test/run_qemu_img_convert_tests.pl
> +++ b/src/test/run_qemu_img_convert_tests.pl
> @@ -93,7 +93,7 @@ my $tests = [
>      {
>          name => 'qcow2raw',
>          parameters =>
> -            ["local:$vmid/vm-$vmid-disk-0.qcow2", "local:$vmid/vm-$vmid-disk-0.raw", 1024 * 10],
> +            ["local:$vmid/vol-vm-$vmid-disk-0.qcow2", "local:$vmid/vol-vm-$vmid-disk-0.raw", 1024 * 10],
>          expected => [
>              "/usr/bin/qemu-img",
>              "convert",
> @@ -103,14 +103,14 @@ my $tests = [
>              "qcow2",
>              "-O",
>              "raw",
> -            "/var/lib/vz/images/$vmid/vm-$vmid-disk-0.qcow2",
> -            "/var/lib/vz/images/$vmid/vm-$vmid-disk-0.raw",
> +            "/var/lib/vz/vms/$vmid/vol-vm-$vmid-disk-0.qcow2",
> +            "/var/lib/vz/vms/$vmid/vol-vm-$vmid-disk-0.raw",
>          ],
>      },
>      {
>          name => "raw2qcow2",
>          parameters =>
> -            ["local:$vmid/vm-$vmid-disk-0.raw", "local:$vmid/vm-$vmid-disk-0.qcow2", 1024 * 10],
> +            ["local:$vmid/vol-vm-$vmid-disk-0.raw", "local:$vmid/vol-vm-$vmid-disk-0.qcow2", 1024 * 10],
>          expected => [
>              "/usr/bin/qemu-img",
>              "convert",
> @@ -120,14 +120,14 @@ my $tests = [
>              "raw",
>              "-O",
>              "qcow2",
> -            "/var/lib/vz/images/$vmid/vm-$vmid-disk-0.raw",
> -            "/var/lib/vz/images/$vmid/vm-$vmid-disk-0.qcow2",
> +            "/var/lib/vz/vms/$vmid/vol-vm-$vmid-disk-0.raw",
> +            "/var/lib/vz/vms/$vmid/vol-vm-$vmid-disk-0.qcow2",
>          ],
>      },
>      {
>          name => "local2rbd",
>          parameters =>
> -            ["local:$vmid/vm-$vmid-disk-0.raw", "rbd-store:vm-$vmid-disk-0", 1024 * 10],
> +            ["local:$vmid/vol-vm-$vmid-disk-0.raw", "rbd-store:vol-vm-$vmid-disk-0", 1024 * 10],
>          expected => [
>              "/usr/bin/qemu-img",
>              "convert",
> @@ -137,14 +137,14 @@ my $tests = [
>              "raw",
>              "-O",
>              "raw",
> -            "/var/lib/vz/images/$vmid/vm-$vmid-disk-0.raw",
> -            "rbd:cpool/vm-$vmid-disk-0:mon_host=127.0.0.42;127.0.0.21;[\\:\\:1]:auth_supported=none",
> +            "/var/lib/vz/vms/$vmid/vol-vm-$vmid-disk-0.raw",
> +            "rbd:cpool/vol-vm-$vmid-disk-0:mon_host=127.0.0.42;127.0.0.21;[\\:\\:1]:auth_supported=none",
>          ],
>      },
>      {
>          name => "rbd2local",
>          parameters =>
> -            ["rbd-store:vm-$vmid-disk-0", "local:$vmid/vm-$vmid-disk-0.raw", 1024 * 10],
> +            ["rbd-store:vol-vm-$vmid-disk-0", "local:$vmid/vol-vm-$vmid-disk-0.raw", 1024 * 10],
>          expected => [
>              "/usr/bin/qemu-img",
>              "convert",
> @@ -154,14 +154,14 @@ my $tests = [
>              "raw",
>              "-O",
>              "raw",
> -            "rbd:cpool/vm-$vmid-disk-0:mon_host=127.0.0.42;127.0.0.21;[\\:\\:1]:auth_supported=none",
> -            "/var/lib/vz/images/$vmid/vm-$vmid-disk-0.raw",
> +            "rbd:cpool/vol-vm-$vmid-disk-0:mon_host=127.0.0.42;127.0.0.21;[\\:\\:1]:auth_supported=none",
> +            "/var/lib/vz/vms/$vmid/vol-vm-$vmid-disk-0.raw",
>          ],
>      },
>      {
>          name => "local2zos",
>          parameters =>
> -            ["local:$vmid/vm-$vmid-disk-0.raw", "zfs-over-iscsi:vm-$vmid-disk-0", 1024 * 10],
> +            ["local:$vmid/vol-vm-$vmid-disk-0.raw", "zfs-over-iscsi:vol-vm-$vmid-disk-0", 1024 * 10],
>          expected => [
>              "/usr/bin/qemu-img",
>              "convert",
> @@ -170,14 +170,14 @@ my $tests = [
>              "-f",
>              "raw",
>              "--target-image-opts",
> -            "/var/lib/vz/images/$vmid/vm-$vmid-disk-0.raw",
> +            "/var/lib/vz/vms/$vmid/vol-vm-$vmid-disk-0.raw",
>              "file.driver=iscsi,file.transport=tcp,file.initiator-name=foobar,file.portal=127.0.0.1,file.target=iqn.2019-10.org.test:foobar,file.lun=1,driver=raw",
>          ],
>      },
>      {
>          name => "zos2local",
>          parameters =>
> -            ["zfs-over-iscsi:vm-$vmid-disk-0", "local:$vmid/vm-$vmid-disk-0.raw", 1024 * 10],
> +            ["zfs-over-iscsi:vol-vm-$vmid-disk-0", "local:$vmid/vol-vm-$vmid-disk-0.raw", 1024 * 10],
>          expected => [
>              "/usr/bin/qemu-img",
>              "convert",
> @@ -187,13 +187,13 @@ my $tests = [
>              "-O",
>              "raw",
>              "file.driver=iscsi,file.transport=tcp,file.initiator-name=foobar,file.portal=127.0.0.1,file.target=iqn.2019-10.org.test:foobar,file.lun=1,driver=raw",
> -            "/var/lib/vz/images/$vmid/vm-$vmid-disk-0.raw",
> +            "/var/lib/vz/vms/$vmid/vol-vm-$vmid-disk-0.raw",
>          ],
>      },
>      {
>          name => "zos2rbd",
>          parameters =>
> -            ["zfs-over-iscsi:vm-$vmid-disk-0", "rbd-store:vm-$vmid-disk-0", 1024 * 10],
> +            ["zfs-over-iscsi:vol-vm-$vmid-disk-0", "rbd-store:vol-vm-$vmid-disk-0", 1024 * 10],
>          expected => [
>              "/usr/bin/qemu-img",
>              "convert",
> @@ -203,13 +203,13 @@ my $tests = [
>              "-O",
>              "raw",
>              "file.driver=iscsi,file.transport=tcp,file.initiator-name=foobar,file.portal=127.0.0.1,file.target=iqn.2019-10.org.test:foobar,file.lun=1,driver=raw",
> -            "rbd:cpool/vm-$vmid-disk-0:mon_host=127.0.0.42;127.0.0.21;[\\:\\:1]:auth_supported=none",
> +            "rbd:cpool/vol-vm-$vmid-disk-0:mon_host=127.0.0.42;127.0.0.21;[\\:\\:1]:auth_supported=none",
>          ],
>      },
>      {
>          name => "rbd2zos",
>          parameters =>
> -            ["rbd-store:vm-$vmid-disk-0", "zfs-over-iscsi:vm-$vmid-disk-0", 1024 * 10],
> +            ["rbd-store:vol-vm-$vmid-disk-0", "zfs-over-iscsi:vol-vm-$vmid-disk-0", 1024 * 10],
>          expected => [
>              "/usr/bin/qemu-img",
>              "convert",
> @@ -218,14 +218,14 @@ my $tests = [
>              "-f",
>              "raw",
>              "--target-image-opts",
> -            "rbd:cpool/vm-$vmid-disk-0:mon_host=127.0.0.42;127.0.0.21;[\\:\\:1]:auth_supported=none",
> +            "rbd:cpool/vol-vm-$vmid-disk-0:mon_host=127.0.0.42;127.0.0.21;[\\:\\:1]:auth_supported=none",
>              "file.driver=iscsi,file.transport=tcp,file.initiator-name=foobar,file.portal=127.0.0.1,file.target=iqn.2019-10.org.test:foobar,file.lun=1,driver=raw",
>          ],
>      },
>      {
>          name => "local2lvmthin",
>          parameters =>
> -            ["local:$vmid/vm-$vmid-disk-0.raw", "local-lvm:vm-$vmid-disk-0", 1024 * 10],
> +            ["local:$vmid/vol-vm-$vmid-disk-0.raw", "local-lvm:vol-vm-$vmid-disk-0", 1024 * 10],
>          expected => [
>              "/usr/bin/qemu-img",
>              "convert",
> @@ -235,14 +235,14 @@ my $tests = [
>              "raw",
>              "-O",
>              "raw",
> -            "/var/lib/vz/images/$vmid/vm-$vmid-disk-0.raw",
> -            "/dev/pve/vm-$vmid-disk-0",
> +            "/var/lib/vz/vms/$vmid/vol-vm-$vmid-disk-0.raw",
> +            "/dev/pve/vol-vm-$vmid-disk-0",
>          ],
>      },
>      {
>          name => "lvmthin2local",
>          parameters =>
> -            ["local-lvm:vm-$vmid-disk-0", "local:$vmid/vm-$vmid-disk-0.raw", 1024 * 10],
> +            ["local-lvm:vol-vm-$vmid-disk-0", "local:$vmid/vol-vm-$vmid-disk-0.raw", 1024 * 10],
>          expected => [
>              "/usr/bin/qemu-img",
>              "convert",
> @@ -252,15 +252,15 @@ my $tests = [
>              "raw",
>              "-O",
>              "raw",
> -            "/dev/pve/vm-$vmid-disk-0",
> -            "/var/lib/vz/images/$vmid/vm-$vmid-disk-0.raw",
> +            "/dev/pve/vol-vm-$vmid-disk-0",
> +            "/var/lib/vz/vms/$vmid/vol-vm-$vmid-disk-0.raw",
>          ],
>      },
>      {
>          name => "zeroinit",
>          parameters => [
> -            "local-lvm:vm-$vmid-disk-0",
> -            "local:$vmid/vm-$vmid-disk-0.raw",
> +            "local-lvm:vol-vm-$vmid-disk-0",
> +            "local:$vmid/vol-vm-$vmid-disk-0.raw",
>              1024 * 10,
>              { 'is-zero-initialized' => 1 },
>          ],
> @@ -273,19 +273,19 @@ my $tests = [
>              "raw",
>              "-O",
>              "raw",
> -            "/dev/pve/vm-$vmid-disk-0",
> -            "zeroinit:/var/lib/vz/images/$vmid/vm-$vmid-disk-0.raw",
> +            "/dev/pve/vol-vm-$vmid-disk-0",
> +            "zeroinit:/var/lib/vz/vms/$vmid/vol-vm-$vmid-disk-0.raw",
>          ],
>      },
>      {
>          name => "notexistingstorage",
>          parameters =>
> -            ["local-lvm:vm-$vmid-disk-0", "not-existing:$vmid/vm-$vmid-disk-0.raw", 1024 * 10],
> +            ["local-lvm:vol-vm-$vmid-disk-0", "not-existing:$vmid/vol-vm-$vmid-disk-0.raw", 1024 * 10],
>          expected => "storage 'not-existing' does not exist\n",
>      },
>      {
>          name => "vmdkfile",
> -        parameters => ["./test.vmdk", "local:$vmid/vm-$vmid-disk-0.raw", 1024 * 10],
> +        parameters => ["./test.vmdk", "local:$vmid/vol-vm-$vmid-disk-0.raw", 1024 * 10],
>          expected => [
>              "/usr/bin/qemu-img",
>              "convert",
> @@ -296,18 +296,18 @@ my $tests = [
>              "-O",
>              "raw",
>              "./test.vmdk",
> -            "/var/lib/vz/images/$vmid/vm-$vmid-disk-0.raw",
> +            "/var/lib/vz/vms/$vmid/vol-vm-$vmid-disk-0.raw",
>          ],
>      },
>      {
>          name => "notexistingfile",
> -        parameters => ["/foo/bar", "local:$vmid/vm-$vmid-disk-0.raw", 1024 * 10],
> +        parameters => ["/foo/bar", "local:$vmid/vol-vm-$vmid-disk-0.raw", 1024 * 10],
>          expected => "source '/foo/bar' is not a valid volid nor path for qemu-img convert\n",
>      },
>      {
>          name => "efidisk",
>          parameters =>
> -            ["/usr/share/kvm/OVMF_VARS-pure-efi.fd", "local:$vmid/vm-$vmid-disk-0.raw", 1024 * 10],
> +            ["/usr/share/kvm/OVMF_VARS-pure-efi.fd", "local:$vmid/vol-vm-$vmid-disk-0.raw", 1024 * 10],
>          expected => [
>              "/usr/bin/qemu-img",
>              "convert",
> @@ -316,13 +316,13 @@ my $tests = [
>              "-O",
>              "raw",
>              "/usr/share/kvm/OVMF_VARS-pure-efi.fd",
> -            "/var/lib/vz/images/$vmid/vm-$vmid-disk-0.raw",
> +            "/var/lib/vz/vms/$vmid/vol-vm-$vmid-disk-0.raw",
>          ],
>      },
>      {
>          name => "efi2zos",
>          parameters =>
> -            ["/usr/share/kvm/OVMF_VARS-pure-efi.fd", "zfs-over-iscsi:vm-$vmid-disk-0", 1024 * 10],
> +            ["/usr/share/kvm/OVMF_VARS-pure-efi.fd", "zfs-over-iscsi:vol-vm-$vmid-disk-0", 1024 * 10],
>          expected => [
>              "/usr/bin/qemu-img",
>              "convert",
> @@ -336,8 +336,8 @@ my $tests = [
>      {
>          name => "bwlimit",
>          parameters => [
> -            "local-lvm:vm-$vmid-disk-0",
> -            "local:$vmid/vm-$vmid-disk-0.raw",
> +            "local-lvm:vol-vm-$vmid-disk-0",
> +            "local:$vmid/vol-vm-$vmid-disk-0.raw",
>              1024 * 10,
>              { bwlimit => 1024 },
>          ],
> @@ -352,15 +352,15 @@ my $tests = [
>              "raw",
>              "-O",
>              "raw",
> -            "/dev/pve/vm-$vmid-disk-0",
> -            "/var/lib/vz/images/$vmid/vm-$vmid-disk-0.raw",
> +            "/dev/pve/vol-vm-$vmid-disk-0",
> +            "/var/lib/vz/vms/$vmid/vol-vm-$vmid-disk-0.raw",
>          ],
>      },
>      {
>          name => "krbdsnapshot",
>          parameters => [
> -            "krbd-store:vm-$vmid-disk-0",
> -            "local:$vmid/vm-$vmid-disk-0.raw",
> +            "krbd-store:vol-vm-$vmid-disk-0",
> +            "local:$vmid/vol-vm-$vmid-disk-0.raw",
>              1024 * 10,
>              { snapname => 'foo' },
>          ],
> @@ -373,15 +373,15 @@ my $tests = [
>              "raw",
>              "-O",
>              "raw",
> -            "/dev/rbd-pve/fc4181a6-56eb-4f68-b452-8ba1f381ca2a/apool/vm-$vmid-disk-0\@foo",
> -            "/var/lib/vz/images/$vmid/vm-$vmid-disk-0.raw",
> +            "/dev/rbd-pve/fc4181a6-56eb-4f68-b452-8ba1f381ca2a/apool/vol-vm-$vmid-disk-0\@foo",
> +            "/var/lib/vz/vms/$vmid/vol-vm-$vmid-disk-0.raw",
>          ],
>      },
>      {
>          name => "rbdsnapshot",
>          parameters => [
> -            "rbd-store:vm-$vmid-disk-0",
> -            "local:$vmid/vm-$vmid-disk-0.raw",
> +            "rbd-store:vol-vm-$vmid-disk-0",
> +            "local:$vmid/vol-vm-$vmid-disk-0.raw",
>              1024 * 10,
>              { snapname => 'foo' },
>          ],
> @@ -394,15 +394,15 @@ my $tests = [
>              "raw",
>              "-O",
>              "raw",
> -            "rbd:cpool/vm-$vmid-disk-0\@foo:mon_host=127.0.0.42;127.0.0.21;[\\:\\:1]:auth_supported=none",
> -            "/var/lib/vz/images/$vmid/vm-$vmid-disk-0.raw",
> +            "rbd:cpool/vol-vm-$vmid-disk-0\@foo:mon_host=127.0.0.42;127.0.0.21;[\\:\\:1]:auth_supported=none",
> +            "/var/lib/vz/vms/$vmid/vol-vm-$vmid-disk-0.raw",
>          ],
>      },
>      {
>          name => "btrfs_raw_snapshots",
>          parameters => [
> -            "btrfs:$vmid/vm-$vmid-disk-0.raw",
> -            "local:$vmid/vm-$vmid-disk-0.raw",
> +            "btrfs:$vmid/vol-vm-$vmid-disk-0.raw",
> +            "local:$vmid/vol-vm-$vmid-disk-0.raw",
>              1024 * 10,
>              { snapname => 'foo' },
>          ],
> @@ -415,15 +415,15 @@ my $tests = [
>              "raw",
>              "-O",
>              "raw",
> -            "/var/lib/btrfs/images/$vmid/vm-$vmid-disk-0\@foo/disk.raw",
> -            "/var/lib/vz/images/$vmid/vm-$vmid-disk-0.raw",
> +            "/var/lib/btrfs/vms/$vmid/vol-vm-$vmid-disk-0\@foo/disk.raw",
> +            "/var/lib/vz/vms/$vmid/vol-vm-$vmid-disk-0.raw",
>          ],
>      },
>      {
>          name => "btrfs_qcow2_snapshots",
>          parameters => [
> -            "btrfs:$vmid/vm-$vmid-disk-0.qcow2",
> -            "local:$vmid/vm-$vmid-disk-0.raw",
> +            "btrfs:$vmid/vol-vm-$vmid-disk-0.qcow2",
> +            "local:$vmid/vol-vm-$vmid-disk-0.raw",
>              1024 * 10,
>              { snapname => 'snap' },
>          ],
> @@ -438,15 +438,15 @@ my $tests = [
>              "qcow2",
>              "-O",
>              "raw",
> -            "/var/lib/btrfs/images/$vmid/vm-$vmid-disk-0.qcow2",
> -            "/var/lib/vz/images/$vmid/vm-$vmid-disk-0.raw",
> +            "/var/lib/btrfs/vms/$vmid/vol-vm-$vmid-disk-0.qcow2",
> +            "/var/lib/vz/vms/$vmid/vol-vm-$vmid-disk-0.raw",
>          ],
>      },
>      {
>          name => "lvmsnapshot",
>          parameters => [
> -            "local-lvm:vm-$vmid-disk-0",
> -            "local:$vmid/vm-$vmid-disk-0.raw",
> +            "local-lvm:vol-vm-$vmid-disk-0",
> +            "local:$vmid/vol-vm-$vmid-disk-0.raw",
>              1024 * 10,
>              { snapname => 'foo' },
>          ],
> @@ -459,15 +459,15 @@ my $tests = [
>              "raw",
>              "-O",
>              "raw",
> -            "/dev/pve/snap_vm-$vmid-disk-0_foo",
> -            "/var/lib/vz/images/$vmid/vm-$vmid-disk-0.raw",
> +            "/dev/pve/snap_vol-vm-$vmid-disk-0_foo",
> +            "/var/lib/vz/vms/$vmid/vol-vm-$vmid-disk-0.raw",
>          ],
>      },
>      {
>          name => "qcow2snapshot",
>          parameters => [
> -            "local:$vmid/vm-$vmid-disk-0.qcow2",
> -            "local:$vmid/vm-$vmid-disk-0.raw",
> +            "local:$vmid/vol-vm-$vmid-disk-0.qcow2",
> +            "local:$vmid/vol-vm-$vmid-disk-0.raw",
>              1024 * 10,
>              { snapname => 'snap' },
>          ],
> @@ -482,15 +482,15 @@ my $tests = [
>              "qcow2",
>              "-O",
>              "raw",
> -            "/var/lib/vz/images/$vmid/vm-$vmid-disk-0.qcow2",
> -            "/var/lib/vz/images/$vmid/vm-$vmid-disk-0.raw",
> +            "/var/lib/vz/vms/$vmid/vol-vm-$vmid-disk-0.qcow2",
> +            "/var/lib/vz/vms/$vmid/vol-vm-$vmid-disk-0.raw",
>          ],
>      },
>      {
>          name => "qcow2_external_snapshot",
>          parameters => [
> -            "localsnapext:$vmid/vm-$vmid-disk-0.qcow2",
> -            "local:$vmid/vm-$vmid-disk-0.raw",
> +            "localsnapext:$vmid/vol-vm-$vmid-disk-0.qcow2",
> +            "local:$vmid/vol-vm-$vmid-disk-0.raw",
>              1024 * 10,
>              { snapname => 'foo' },
>          ],
> @@ -503,15 +503,15 @@ my $tests = [
>              "qcow2",
>              "-O",
>              "raw",
> -            "/var/lib/vzsnapext/images/$vmid/snap-foo-vm-$vmid-disk-0.qcow2",
> -            "/var/lib/vz/images/$vmid/vm-$vmid-disk-0.raw",
> +            "/var/lib/vzsnapext/images/$vmid/snap-foo-vol-vm-$vmid-disk-0.qcow2",
> +            "/var/lib/vz/vms/$vmid/vol-vm-$vmid-disk-0.raw",
>          ],
>      },
>      {
>          name => "lvmqcow2_external_snapshot",
>          parameters => [
> -            "lvm-store:vm-$vmid-disk-0.qcow2",
> -            "local:$vmid/vm-$vmid-disk-0.raw",
> +            "lvm-store:vol-vm-$vmid-disk-0.qcow2",
> +            "local:$vmid/vol-vm-$vmid-disk-0.raw",
>              1024 * 10,
>              { snapname => 'foo' },
>          ],
> @@ -524,15 +524,15 @@ my $tests = [
>              "qcow2",
>              "-O",
>              "raw",
> -            "/dev/pve/snap_vm-$vmid-disk-0_foo.qcow2",
> -            "/var/lib/vz/images/$vmid/vm-$vmid-disk-0.raw",
> +            "/dev/pve/snap_vol-vm-$vmid-disk-0_foo.qcow2",
> +            "/var/lib/vz/vms/$vmid/vol-vm-$vmid-disk-0.raw",
>          ],
>      },
>      {
>          name => "qcow2_external_snapshot_target",
>          parameters => [
> -            "local:$vmid/vm-$vmid-disk-0.raw",
> -            "localsnapext:$vmid/vm-$vmid-disk-0.qcow2",
> +            "local:$vmid/vol-vm-$vmid-disk-0.raw",
> +            "localsnapext:$vmid/vol-vm-$vmid-disk-0.qcow2",
>              1024 * 10,
>          ],
>          expected => [
> @@ -543,15 +543,15 @@ my $tests = [
>              "-f",
>              "raw",
>              "--target-image-opts",
> -            "/var/lib/vz/images/$vmid/vm-$vmid-disk-0.raw",
> +            "/var/lib/vz/vms/$vmid/vol-vm-$vmid-disk-0.raw",
>              "driver=qcow2,discard-no-unref=true,file.driver=file,"
> -                . "file.filename=/var/lib/vzsnapext/images/$vmid/vm-$vmid-disk-0.qcow2",
> +                . "file.filename=/var/lib/vzsnapext/vms/$vmid/vol-vm-$vmid-disk-0.qcow2",
>          ],
>      },
>      {
>          name => "lvmqcow2_external_snapshot_target",
>          parameters => [
> -            "local:$vmid/vm-$vmid-disk-0.raw", "lvm-store:vm-$vmid-disk-0.qcow2", 1024 * 10,
> +            "local:$vmid/vol-vm-$vmid-disk-0.raw", "lvm-store:vol-vm-$vmid-disk-0.qcow2", 1024 * 10,
>          ],
>          expected => [
>              "/usr/bin/qemu-img",
> @@ -561,9 +561,9 @@ my $tests = [
>              "-f",
>              "raw",
>              "--target-image-opts",
> -            "/var/lib/vz/images/$vmid/vm-$vmid-disk-0.raw",
> +            "/var/lib/vz/vms/$vmid/vol-vm-$vmid-disk-0.raw",
>              "driver=qcow2,discard-no-unref=true,file.driver=host_device,"
> -                . "file.filename=/dev/pve/vm-$vmid-disk-0.qcow2",
> +                . "file.filename=/dev/pve/vol-vm-$vmid-disk-0.qcow2",
>          ],
>      },
>  ];
> diff --git a/src/test/run_qemu_migrate_tests.pl b/src/test/run_qemu_migrate_tests.pl
> index ed2f38ee..e9de96eb 100755
> --- a/src/test/run_qemu_migrate_tests.pl
> +++ b/src/test/run_qemu_migrate_tests.pl
> @@ -113,7 +113,7 @@ my $vm_configs = {
>      105 => {
>          'bootdisk' => 'scsi0',
>          'cores' => 1,
> -        'ide0' => 'local-zfs:vm-105-disk-1,size=103M',
> +        'ide0' => 'local-zfs:vol-vm-105-disk-1,size=103M',
>          'ide2' => 'none,media=cdrom',
>          'memory' => 512,
>          'name' => 'Copy-of-VM-newapache',
> @@ -122,7 +122,7 @@ my $vm_configs = {
>          'ostype' => 'l26',
>          'parent' => 'ohsnap',
>          'pending' => {},
> -        'scsi0' => 'local-zfs:vm-105-disk-0,size=4G',
> +        'scsi0' => 'local-zfs:vol-vm-105-disk-0,size=4G',
>          'scsihw' => 'virtio-scsi-pci',
>          'smbios1' => 'uuid=1ddfe18b-77e0-47f6-a4bd-f1761bf6d763',
>          'snapshots' => {
> @@ -135,7 +135,7 @@ my $vm_configs = {
>                  'net0' => 'virtio=4A:A3:E4:4C:CF:F0,bridge=vmbr0,firewall=1',
>                  'numa' => 0,
>                  'ostype' => 'l26',
> -                'scsi0' => 'local-zfs:vm-105-disk-0,size=4G',
> +                'scsi0' => 'local-zfs:vol-vm-105-disk-0,size=4G',
>                  'scsihw' => 'virtio-scsi-pci',
>                  'smbios1' => 'uuid=1ddfe18b-77e0-47f6-a4bd-f1761bf6d763',
>                  'snaptime' => 1580976924,
> @@ -151,7 +151,7 @@ my $vm_configs = {
>      111 => {
>          'bootdisk' => 'scsi0',
>          'cores' => 1,
> -        'ide0' => 'local-lvm:vm-111-disk-0,size=4096M',
> +        'ide0' => 'local-lvm:vol-vm-111-disk-0,size=4096M',
>          'ide2' => 'none,media=cdrom',
>          'memory' => 512,
>          'name' => 'pending-test',
> @@ -159,7 +159,7 @@ my $vm_configs = {
>          'numa' => 0,
>          'ostype' => 'l26',
>          'pending' => {
> -            'scsi0' => 'local-zfs:vm-111-disk-0,size=103M',
> +            'scsi0' => 'local-zfs:vol-vm-111-disk-0,size=103M',
>          },
>          'scsihw' => 'virtio-scsi-pci',
>          'snapshots' => {},
> @@ -170,8 +170,8 @@ my $vm_configs = {
>      123 => {
>          'bootdisk' => 'scsi0',
>          'cores' => 1,
> -        'scsi0' => 'zfs-alias-1:vm-123-disk-0,size=4096M',
> -        'scsi1' => 'zfs-alias-2:vm-123-disk-0,size=4096M',
> +        'scsi0' => 'zfs-alias-1:vol-vm-123-disk-0,size=4096M',
> +        'scsi1' => 'zfs-alias-2:vol-vm-123-disk-0,size=4096M',
>          'ide2' => 'none,media=cdrom',
>          'memory' => 512,
>          'name' => 'alias-test',
> @@ -196,8 +196,8 @@ my $vm_configs = {
>          'net0' => 'virtio=52:5D:7E:62:85:97,bridge=vmbr1',
>          'numa' => 1,
>          'ostype' => 'l26',
> -        'scsi0' => 'local-lvm:vm-149-disk-0,format=raw,size=4G',
> -        'scsi1' => 'local-dir:149/vm-149-disk-0.qcow2,format=qcow2,size=1G',
> +        'scsi0' => 'local-lvm:vol-vm-149-disk-0,format=raw,size=4G',
> +        'scsi1' => 'local-dir:149/vol-vm-149-disk-0.qcow2,format=qcow2,size=1G',
>          'scsihw' => 'virtio-scsi-pci',
>          'snapshots' => {},
>          'smbios1' => 'uuid=e980bd43-a405-42e2-b5f4-31efe6517460',
> @@ -209,7 +209,7 @@ my $vm_configs = {
>          'arch' => 'aarch64',
>          'bootdisk' => 'scsi0',
>          'cores' => 1,
> -        'efidisk0' => 'local-lvm:vm-341-disk-0',
> +        'efidisk0' => 'local-lvm:vol-vm-341-disk-0',
>          'ide2' => 'none,media=cdrom',
>          'ipconfig0' => 'ip=103.214.69.10/25,gw=103.214.69.1',
>          'memory' => 4096,
> @@ -217,7 +217,7 @@ my $vm_configs = {
>          'net0' => 'virtio=4E:F1:82:6D:D7:4B,bridge=vmbr0,firewall=1,rate=10',
>          'numa' => 0,
>          'ostype' => 'l26',
> -        'scsi0' => 'rbd-store:vm-341-disk-0,size=1G',
> +        'scsi0' => 'rbd-store:vol-vm-341-disk-0,size=1G',
>          'scsihw' => 'virtio-scsi-pci',
>          'snapshots' => {},
>          'smbios1' => 'uuid=e01e4c73-46f1-47c8-af79-288fdf6b7462',
> @@ -235,7 +235,7 @@ my $vm_configs = {
>          'net0' => 'virtio=4E:F1:82:6D:D7:4B,bridge=vmbr0,firewall=1,rate=10',
>          'numa' => 0,
>          'ostype' => 'l26',
> -        'scsi0' => 'rbd-store:vm-1033-disk-1,size=1G',
> +        'scsi0' => 'rbd-store:vol-vm-1033-disk-1,size=1G',
>          'scsihw' => 'virtio-scsi-pci',
>          'snapshots' => {},
>          'smbios1' => 'uuid=e01e4c73-46f1-47c8-af79-288fdf6b7462',
> @@ -253,7 +253,7 @@ my $vm_configs = {
>          'ostype' => 'l26',
>          'parent' => 'snap1',
>          'pending' => {},
> -        'scsi0' => 'local-dir:4567/vm-4567-disk-0.qcow2,size=4G',
> +        'scsi0' => 'local-dir:4567/vol-vm-4567-disk-0.qcow2,size=4G',
>          'scsihw' => 'virtio-scsi-pci',
>          'smbios1' => 'uuid=2925fdec-a066-4228-b46b-eef8662f5e74',
>          'snapshots' => {
> @@ -268,7 +268,7 @@ my $vm_configs = {
>                  'ostype' => 'l26',
>                  'runningcpu' => 'kvm64,enforce,+kvm_pv_eoi,+kvm_pv_unhalt,+lahf_lm,+sep',
>                  'runningmachine' => 'pc-i440fx-10.0+pve0',
> -                'scsi0' => 'local-dir:4567/vm-4567-disk-0.qcow2,size=4G',
> +                'scsi0' => 'local-dir:4567/vol-vm-4567-disk-0.qcow2,size=4G',
>                  'scsihw' => 'virtio-scsi-pci',
>                  'smbios1' => 'uuid=2925fdec-a066-4228-b46b-eef8662f5e74',
>                  'snaptime' => 1595928799,
> @@ -289,8 +289,8 @@ my $vm_configs = {
>                  'parent' => 'snap1',
>                  'runningcpu' => 'kvm64,enforce,+kvm_pv_eoi,+kvm_pv_unhalt,+lahf_lm,+sep',
>                  'runningmachine' => 'pc-i440fx-10.0+pve0',
> -                'scsi0' => 'local-dir:4567/vm-4567-disk-0.qcow2,size=4G',
> -                'scsi1' => 'local-zfs:vm-4567-disk-0,size=1G',
> +                'scsi0' => 'local-dir:4567/vol-vm-4567-disk-0.qcow2,size=4G',
> +                'scsi1' => 'local-zfs:vol-vm-4567-disk-0,size=1G',
>                  'scsihw' => 'virtio-scsi-pci',
>                  'smbios1' => 'uuid=2925fdec-a066-4228-b46b-eef8662f5e74',
>                  'snaptime' => 1595928871,
> @@ -302,7 +302,7 @@ my $vm_configs = {
>          },
>          'sockets' => 1,
>          'startup' => 'order=2',
> -        'unused0' => 'local-zfs:vm-4567-disk-0',
> +        'unused0' => 'local-zfs:vol-vm-4567-disk-0',
>          'vmgenid' => 'e698e60c-9278-4dd9-941f-416075383f2a',
>      },
>  };
> @@ -316,7 +316,7 @@ my $source_vdisks = {
>              'size' => 1073741824,
>              'used' => 335872,
>              'vmid' => '149',
> -            'volid' => 'local-dir:149/vm-149-disk-0.qcow2',
> +            'volid' => 'local-dir:149/vol-vm-149-disk-0.qcow2',
>          },
>          {
>              'ctime' => 1595928898,
> @@ -325,7 +325,7 @@ my $source_vdisks = {
>              'size' => 4294967296,
>              'used' => 1811664896,
>              'vmid' => '4567',
> -            'volid' => 'local-dir:4567/vm-4567-disk-0.qcow2',
> +            'volid' => 'local-dir:4567/vol-vm-4567-disk-0.qcow2',
>          },
>          {
>              'ctime' => 1595928800,
> @@ -352,21 +352,21 @@ my $source_vdisks = {
>              'format' => 'raw',
>              'size' => 4294967296,
>              'vmid' => '149',
> -            'volid' => 'local-lvm:vm-149-disk-0',
> +            'volid' => 'local-lvm:vol-vm-149-disk-0',
>          },
>          {
>              'ctime' => '1589277334',
>              'format' => 'raw',
>              'size' => 4194304,
>              'vmid' => '341',
> -            'volid' => 'local-lvm:vm-341-disk-0',
> +            'volid' => 'local-lvm:vol-vm-341-disk-0',
>          },
>          {
>              'ctime' => '1589277334',
>              'format' => 'raw',
>              'size' => 4294967296,
>              'vmid' => '111',
> -            'volid' => 'local-lvm:vm-111-disk-0',
> +            'volid' => 'local-lvm:vol-vm-111-disk-0',
>          },
>      ],
>      'local-zfs' => [
> @@ -375,29 +375,29 @@ my $source_vdisks = {
>              'format' => 'raw',
>              'size' => 4294967296,
>              'vmid' => '105',
> -            'volid' => 'local-zfs:vm-105-disk-0',
> +            'volid' => 'local-zfs:vol-vm-105-disk-0',
>          },
>          {
>              'ctime' => '1589277334',
>              'format' => 'raw',
>              'size' => 108003328,
>              'vmid' => '105',
> -            'volid' => 'local-zfs:vm-105-disk-1',
> +            'volid' => 'local-zfs:vol-vm-105-disk-1',
>          },
>          {
>              'ctime' => '1589277334',
>              'format' => 'raw',
>              'size' => 108003328,
>              'vmid' => '111',
> -            'volid' => 'local-zfs:vm-111-disk-0',
> +            'volid' => 'local-zfs:vol-vm-111-disk-0',
>          },
>          {
>              'format' => 'raw',
> -            'name' => 'vm-4567-disk-0',
> +            'name' => 'vol-vm-4567-disk-0',
>              'parent' => undef,
>              'size' => 1073741824,
>              'vmid' => '4567',
> -            'volid' => 'local-zfs:vm-4567-disk-0',
> +            'volid' => 'local-zfs:vol-vm-4567-disk-0',
>          },
>      ],
>      'rbd-store' => [
> @@ -406,7 +406,7 @@ my $source_vdisks = {
>              'format' => 'raw',
>              'size' => 1073741824,
>              'vmid' => '1033',
> -            'volid' => 'rbd-store:vm-1033-disk-1',
> +            'volid' => 'rbd-store:vol-vm-1033-disk-1',
>          },
>          {
>              'ctime' => '1589277334',
> @@ -422,7 +422,7 @@ my $source_vdisks = {
>              'format' => 'raw',
>              'size' => 4294967296,
>              'vmid' => '123',
> -            'volid' => 'zfs-alias-1:vm-123-disk-0',
> +            'volid' => 'zfs-alias-1:vol-vm-123-disk-0',
>          },
>      ],
>      'zfs-alias-2' => [
> @@ -431,7 +431,7 @@ my $source_vdisks = {
>              'format' => 'raw',
>              'size' => 4294967296,
>              'vmid' => '123',
> -            'volid' => 'zfs-alias-2:vm-123-disk-0',
> +            'volid' => 'zfs-alias-2:vol-vm-123-disk-0',
>          },
>      ],
>  };
> @@ -541,12 +541,12 @@ my $tests = [
>          expected => {
>              source_volids => {},
>              target_volids => {
> -                'local-dir:341/vm-341-disk-10.raw' => 1,
> +                'local-dir:341/vol-vm-341-disk-10.raw' => 1,
>              },
>              vm_config => get_patched_config(
>                  341,
>                  {
> -                    efidisk0 => 'local-dir:341/vm-341-disk-10.raw,format=raw,size=128K',
> +                    efidisk0 => 'local-dir:341/vol-vm-341-disk-10.raw,format=raw,size=128K',
>                  },
>              ),
>              vm_status => {
> @@ -572,12 +572,12 @@ my $tests = [
>          expected => {
>              source_volids => {},
>              target_volids => {
> -                'local-lvm:vm-341-disk-10' => 1,
> +                'local-lvm:vol-vm-341-disk-10' => 1,
>              },
>              vm_config => get_patched_config(
>                  341,
>                  {
> -                    efidisk0 => 'local-lvm:vm-341-disk-10,format=raw,size=128K',
> +                    efidisk0 => 'local-lvm:vol-vm-341-disk-10,format=raw,size=128K',
>                  },
>              ),
>              vm_status => {
> @@ -599,15 +599,15 @@ my $tests = [
>              'with-local-disks' => 1,
>          },
>          fail_config => {
> -            vdisk_alloc => 'local-dir:149/vm-149-disk-11.qcow2',
> -            pvesm_free => 'local-lvm:vm-149-disk-10',
> +            vdisk_alloc => 'local-dir:149/vol-vm-149-disk-11.qcow2',
> +            pvesm_free => 'local-lvm:vol-vm-149-disk-10',
>          },
>          expected_calls => {},
>          expect_die => "remote command failed with exit code",
>          expected => {
>              source_volids => local_volids_for_vm(149),
>              target_volids => {
> -                'local-lvm:vm-149-disk-10' => 1,
> +                'local-lvm:vol-vm-149-disk-10' => 1,
>              },
>              vm_config => $vm_configs->{149},
>              vm_status => {
> @@ -629,7 +629,7 @@ my $tests = [
>              'with-local-disks' => 1,
>          },
>          fail_config => {
> -            vdisk_alloc => 'local-lvm:vm-149-disk-10',
> +            vdisk_alloc => 'local-lvm:vol-vm-149-disk-10',
>          },
>          expected_calls => {},
>          expect_die => "remote command failed with exit code",
> @@ -654,13 +654,13 @@ my $tests = [
>              'with-local-disks' => 1,
>          },
>          fail_config => {
> -            'vdisk_free' => 'local-lvm:vm-149-disk-0',
> +            'vdisk_free' => 'local-lvm:vol-vm-149-disk-0',
>          },
>          expected_calls => $default_expected_calls_offline,
> -        expect_die => "vdisk_free 'local-lvm:vm-149-disk-0' error",
> +        expect_die => "vdisk_free 'local-lvm:vol-vm-149-disk-0' error",
>          expected => {
>              source_volids => {
> -                'local-lvm:vm-149-disk-0' => 1,
> +                'local-lvm:vol-vm-149-disk-0' => 1,
>              },
>              target_volids => local_volids_for_vm(149),
>              vm_config => $vm_configs->{149},
> @@ -728,7 +728,7 @@ my $tests = [
>              targetstorage => 'local-dir:other-dir,local-zfs:local-zfs',
>          },
>          storage_migrate_map => {
> -            'local-dir:4567/vm-4567-disk-0.qcow2' => '4567/vm-4567-disk-0.qcow2',
> +            'local-dir:4567/vol-vm-4567-disk-0.qcow2' => '4567/vol-vm-4567-disk-0.qcow2',
>              'local-dir:4567/vm-4567-state-snap1.raw' => '4567/vm-4567-state-snap1.raw',
>              'local-dir:4567/vm-4567-state-snap2.raw' => '4567/vm-4567-state-snap2.raw',
>          },
> @@ -736,23 +736,23 @@ my $tests = [
>          expected => {
>              source_volids => {},
>              target_volids => {
> -                'other-dir:4567/vm-4567-disk-0.qcow2' => 1,
> +                'other-dir:4567/vol-vm-4567-disk-0.qcow2' => 1,
>                  'other-dir:4567/vm-4567-state-snap1.raw' => 1,
>                  'other-dir:4567/vm-4567-state-snap2.raw' => 1,
> -                'local-zfs:vm-4567-disk-0' => 1,
> +                'local-zfs:vol-vm-4567-disk-0' => 1,
>              },
>              vm_config => get_patched_config(
>                  4567,
>                  {
> -                    'scsi0' => 'other-dir:4567/vm-4567-disk-0.qcow2,size=4G',
> +                    'scsi0' => 'other-dir:4567/vol-vm-4567-disk-0.qcow2,size=4G',
>                      snapshots => {
>                          snap1 => {
> -                            'scsi0' => 'other-dir:4567/vm-4567-disk-0.qcow2,size=4G',
> +                            'scsi0' => 'other-dir:4567/vol-vm-4567-disk-0.qcow2,size=4G',
>                              'vmstate' => 'other-dir:4567/vm-4567-state-snap1.raw',
>                          },
>                          snap2 => {
> -                            'scsi0' => 'other-dir:4567/vm-4567-disk-0.qcow2,size=4G',
> -                            'scsi1' => 'local-zfs:vm-4567-disk-0,size=1G',
> +                            'scsi0' => 'other-dir:4567/vol-vm-4567-disk-0.qcow2,size=4G',
> +                            'scsi1' => 'local-zfs:vol-vm-4567-disk-0,size=1G',
>                              'vmstate' => 'other-dir:4567/vm-4567-state-snap2.raw',
>                          },
>                      },
> @@ -821,20 +821,20 @@ my $tests = [
>              scsi1 => undef,
>          },
>          storage_migrate_map => {
> -            'local-dir:149/vm-149-disk-0.qcow2' => 'vm-149-disk-0',
> +            'local-dir:149/vol-vm-149-disk-0.qcow2' => 'vol-vm-149-disk-0',
>          },
>          expected_calls => $default_expected_calls_online,
>          expected => {
>              source_volids => {
> -                'local-dir:149/vm-149-disk-0.qcow2' => 1,
> +                'local-dir:149/vol-vm-149-disk-0.qcow2' => 1,
>              },
>              target_volids => {
> -                'local-zfs:vm-149-disk-10' => 1,
> +                'local-zfs:vol-vm-149-disk-10' => 1,
>              },
>              vm_config => get_patched_config(
>                  149,
>                  {
> -                    scsi0 => 'local-zfs:vm-149-disk-10,format=raw,size=4G',
> +                    scsi0 => 'local-zfs:vol-vm-149-disk-10,format=raw,size=4G',
>                      scsi1 => undef,
>                  },
>              ),
> @@ -860,20 +860,20 @@ my $tests = [
>              scsi1 => undef,
>          },
>          storage_migrate_map => {
> -            'local-dir:149/vm-149-disk-0.qcow2' => '149/vm-149-disk-0.qcow2',
> +            'local-dir:149/vol-vm-149-disk-0.qcow2' => '149/vol-vm-149-disk-0.qcow2',
>          },
>          expected_calls => $default_expected_calls_online,
>          expected => {
>              source_volids => {
> -                'local-dir:149/vm-149-disk-0.qcow2' => 1,
> +                'local-dir:149/vol-vm-149-disk-0.qcow2' => 1,
>              },
>              target_volids => {
> -                'local-lvm:vm-149-disk-10' => 1,
> +                'local-lvm:vol-vm-149-disk-10' => 1,
>              },
>              vm_config => get_patched_config(
>                  149,
>                  {
> -                    scsi0 => 'local-lvm:vm-149-disk-10,format=raw,size=4G',
> +                    scsi0 => 'local-lvm:vol-vm-149-disk-10,format=raw,size=4G',
>                      scsi1 => undef,
>                  },
>              ),
> @@ -899,21 +899,21 @@ my $tests = [
>              targetstorage => 'local-lvm:local-zfs,local-lvm',
>          },
>          storage_migrate_map => {
> -            'local-lvm:vm-149-disk-0' => 'vm-149-disk-0',
> -            'local-dir:149/vm-149-disk-0.qcow2' => 'vm-149-disk-0',
> +            'local-lvm:vol-vm-149-disk-0' => 'vol-vm-149-disk-0',
> +            'local-dir:149/vol-vm-149-disk-0.qcow2' => 'vol-vm-149-disk-0',
>          },
>          expected_calls => $default_expected_calls_offline,
>          expected => {
>              source_volids => {},
>              target_volids => {
> -                'local-zfs:vm-149-disk-0' => 1,
> -                'local-lvm:vm-149-disk-0' => 1,
> +                'local-zfs:vol-vm-149-disk-0' => 1,
> +                'local-lvm:vol-vm-149-disk-0' => 1,
>              },
>              vm_config => get_patched_config(
>                  149,
>                  {
> -                    scsi0 => 'local-zfs:vm-149-disk-0,format=raw,size=4G',
> -                    scsi1 => 'local-lvm:vm-149-disk-0,format=qcow2,size=1G',
> +                    scsi0 => 'local-zfs:vol-vm-149-disk-0,format=raw,size=4G',
> +                    scsi1 => 'local-lvm:vol-vm-149-disk-0,format=qcow2,size=1G',
>                  },
>              ),
>              vm_status => {
> @@ -935,21 +935,21 @@ my $tests = [
>              targetstorage => 'local-dir:local-zfs,local-lvm:local-dir',
>          },
>          storage_migrate_map => {
> -            'local-lvm:vm-149-disk-0' => '149/vm-149-disk-0.raw',
> -            'local-dir:149/vm-149-disk-0.qcow2' => 'vm-149-disk-0',
> +            'local-lvm:vol-vm-149-disk-0' => '149/vol-vm-149-disk-0.raw',
> +            'local-dir:149/vol-vm-149-disk-0.qcow2' => 'vol-vm-149-disk-0',
>          },
>          expected_calls => $default_expected_calls_offline,
>          expected => {
>              source_volids => {},
>              target_volids => {
> -                'local-dir:149/vm-149-disk-0.raw' => 1,
> -                'local-zfs:vm-149-disk-0' => 1,
> +                'local-dir:149/vol-vm-149-disk-0.raw' => 1,
> +                'local-zfs:vol-vm-149-disk-0' => 1,
>              },
>              vm_config => get_patched_config(
>                  149,
>                  {
> -                    scsi0 => 'local-dir:149/vm-149-disk-0.raw,format=raw,size=4G',
> -                    scsi1 => 'local-zfs:vm-149-disk-0,format=qcow2,size=1G',
> +                    scsi0 => 'local-dir:149/vol-vm-149-disk-0.raw,format=raw,size=4G',
> +                    scsi1 => 'local-zfs:vol-vm-149-disk-0,format=qcow2,size=1G',
>                  },
>              ),
>              vm_status => {
> @@ -974,14 +974,14 @@ my $tests = [
>          expected => {
>              source_volids => {},
>              target_volids => {
> -                'local-zfs:vm-149-disk-10' => 1,
> -                'local-lvm:vm-149-disk-11' => 1,
> +                'local-zfs:vol-vm-149-disk-10' => 1,
> +                'local-lvm:vol-vm-149-disk-11' => 1,
>              },
>              vm_config => get_patched_config(
>                  149,
>                  {
> -                    scsi0 => 'local-zfs:vm-149-disk-10,format=raw,size=4G',
> -                    scsi1 => 'local-lvm:vm-149-disk-11,format=raw,size=1G',
> +                    scsi0 => 'local-zfs:vol-vm-149-disk-10,format=raw,size=4G',
> +                    scsi1 => 'local-lvm:vol-vm-149-disk-11,format=raw,size=1G',
>                  },
>              ),
>              vm_status => {
> @@ -1007,14 +1007,14 @@ my $tests = [
>          expected => {
>              source_volids => {},
>              target_volids => {
> -                'local-zfs:vm-149-disk-10' => 1,
> -                'local-dir:149/vm-149-disk-11.qcow2' => 1,
> +                'local-zfs:vol-vm-149-disk-10' => 1,
> +                'local-dir:149/vol-vm-149-disk-11.qcow2' => 1,
>              },
>              vm_config => get_patched_config(
>                  149,
>                  {
> -                    scsi0 => 'local-zfs:vm-149-disk-10,format=raw,size=4G',
> -                    scsi1 => 'local-dir:149/vm-149-disk-11.qcow2,format=qcow2,size=1G',
> +                    scsi0 => 'local-zfs:vol-vm-149-disk-10,format=raw,size=4G',
> +                    scsi1 => 'local-dir:149/vol-vm-149-disk-11.qcow2,format=qcow2,size=1G',
>                  },
>              ),
>              vm_status => {
> @@ -1040,14 +1040,14 @@ my $tests = [
>          expected => {
>              source_volids => {},
>              target_volids => {
> -                'local-zfs:vm-149-disk-10' => 1,
> -                'local-zfs:vm-149-disk-11' => 1,
> +                'local-zfs:vol-vm-149-disk-10' => 1,
> +                'local-zfs:vol-vm-149-disk-11' => 1,
>              },
>              vm_config => get_patched_config(
>                  149,
>                  {
> -                    scsi0 => 'local-zfs:vm-149-disk-10,format=raw,size=4G',
> -                    scsi1 => 'local-zfs:vm-149-disk-11,format=raw,size=1G',
> +                    scsi0 => 'local-zfs:vol-vm-149-disk-10,format=raw,size=4G',
> +                    scsi1 => 'local-zfs:vol-vm-149-disk-11,format=raw,size=1G',
>                  },
>              ),
>              vm_status => {
> @@ -1069,20 +1069,20 @@ my $tests = [
>              'with-local-disks' => 1,
>          },
>          config_patch => {
> -            scsi0 => 'local-lvm:vm-149-disk-0,size=123T',
> +            scsi0 => 'local-lvm:vol-vm-149-disk-0,size=123T',
>          },
>          expected_calls => $default_expected_calls_online,
>          expected => {
>              source_volids => {},
>              target_volids => {
> -                'local-lvm:vm-149-disk-10' => 1,
> -                'local-dir:149/vm-149-disk-11.qcow2' => 1,
> +                'local-lvm:vol-vm-149-disk-10' => 1,
> +                'local-dir:149/vol-vm-149-disk-11.qcow2' => 1,
>              },
>              vm_config => get_patched_config(
>                  149,
>                  {
> -                    scsi0 => 'local-lvm:vm-149-disk-10,format=raw,size=4G',
> -                    scsi1 => 'local-dir:149/vm-149-disk-11.qcow2,format=qcow2,size=1G',
> +                    scsi0 => 'local-lvm:vol-vm-149-disk-10,format=raw,size=4G',
> +                    scsi1 => 'local-dir:149/vol-vm-149-disk-11.qcow2,format=qcow2,size=1G',
>                  },
>              ),
>              vm_status => {
> @@ -1104,20 +1104,20 @@ my $tests = [
>              'with-local-disks' => 1,
>          },
>          config_patch => {
> -            scsi0 => 'local-lvm:vm-149-disk-0',
> +            scsi0 => 'local-lvm:vol-vm-149-disk-0',
>          },
>          expected_calls => $default_expected_calls_online,
>          expected => {
>              source_volids => {},
>              target_volids => {
> -                'local-lvm:vm-149-disk-10' => 1,
> -                'local-dir:149/vm-149-disk-11.qcow2' => 1,
> +                'local-lvm:vol-vm-149-disk-10' => 1,
> +                'local-dir:149/vol-vm-149-disk-11.qcow2' => 1,
>              },
>              vm_config => get_patched_config(
>                  149,
>                  {
> -                    scsi0 => 'local-lvm:vm-149-disk-10,format=raw,size=4G',
> -                    scsi1 => 'local-dir:149/vm-149-disk-11.qcow2,format=qcow2,size=1G',
> +                    scsi0 => 'local-lvm:vol-vm-149-disk-10,format=raw,size=4G',
> +                    scsi1 => 'local-dir:149/vol-vm-149-disk-11.qcow2,format=qcow2,size=1G',
>                  },
>              ),
>              vm_status => {
> @@ -1536,14 +1536,14 @@ my $tests = [
>          expected => {
>              source_volids => {},
>              target_volids => {
> -                'local-lvm:vm-149-disk-10' => 1,
> -                'local-dir:149/vm-149-disk-11.qcow2' => 1,
> +                'local-lvm:vol-vm-149-disk-10' => 1,
> +                'local-dir:149/vol-vm-149-disk-11.qcow2' => 1,
>              },
>              vm_config => get_patched_config(
>                  149,
>                  {
> -                    scsi0 => 'local-lvm:vm-149-disk-10,format=raw,size=4G',
> -                    scsi1 => 'local-dir:149/vm-149-disk-11.qcow2,format=qcow2,size=1G',
> +                    scsi0 => 'local-lvm:vol-vm-149-disk-10,format=raw,size=4G',
> +                    scsi1 => 'local-dir:149/vol-vm-149-disk-11.qcow2,format=qcow2,size=1G',
>                  },
>              ),
>              vm_status => {
> @@ -1593,7 +1593,7 @@ my $tests = [
>          },
>          config_patch => {
>              scsi1 => undef,
> -            unused0 => 'local-dir:149/vm-149-disk-0.qcow2',
> +            unused0 => 'local-dir:149/vol-vm-149-disk-0.qcow2',
>          },
>          expected_calls => {},
>          expect_die => "qemu_drive_mirror_monitor 'cancel' error",
> @@ -1608,7 +1608,7 @@ my $tests = [
>                  149,
>                  {
>                      scsi1 => undef,
> -                    unused0 => 'local-dir:149/vm-149-disk-0.qcow2',
> +                    unused0 => 'local-dir:149/vol-vm-149-disk-0.qcow2',
>                  },
>              ),
>              vm_status => {
> @@ -1648,10 +1648,10 @@ my $tests = [
>              'with-local-disks' => 1,
>          },
>          fail_config => {
> -            'storage_migrate' => 'local-lvm:vm-149-disk-0',
> +            'storage_migrate' => 'local-lvm:vol-vm-149-disk-0',
>          },
>          expected_calls => {},
> -        expect_die => "storage_migrate 'local-lvm:vm-149-disk-0' error",
> +        expect_die => "storage_migrate 'local-lvm:vol-vm-149-disk-0' error",
>          expected => {
>              source_volids => local_volids_for_vm(149),
>              target_volids => {},
> @@ -1677,15 +1677,15 @@ my $tests = [
>          expected => {
>              source_volids => {},
>              target_volids => {
> -                'local-zfs:vm-111-disk-0' => 1,
> -                'local-lvm:vm-111-disk-10' => 1,
> +                'local-zfs:vol-vm-111-disk-0' => 1,
> +                'local-lvm:vol-vm-111-disk-10' => 1,
>              },
>              vm_config => get_patched_config(
>                  111,
>                  {
> -                    ide0 => 'local-lvm:vm-111-disk-10,format=raw,size=4G',
> +                    ide0 => 'local-lvm:vol-vm-111-disk-10,format=raw,size=4G',
>                      pending => {
> -                        scsi0 => 'local-zfs:vm-111-disk-0,size=103M',
> +                        scsi0 => 'local-zfs:vol-vm-111-disk-0,size=103M',
>                      },
>                  },
>              ),
> diff --git a/src/test/test_get_replicatable_volumes.pl b/src/test/test_get_replicatable_volumes.pl
> index 6a3d0338..ab21f29d 100755
> --- a/src/test/test_get_replicatable_volumes.pl
> +++ b/src/test/test_get_replicatable_volumes.pl
> @@ -39,7 +39,7 @@ my $storecfg = {
>  
>  my $vmid = 900;
>  
> -my $rawconf = "scsi0: non-existent-store:vm-103-disk-1,size=8G\n";
> +my $rawconf = "scsi0: non-existent-store:vol-vm-103-disk-1,size=8G\n";
>  my $conf = PVE::QemuServer::parse_vm_config("/qemu-server/$vmid.conf", $rawconf);
>  
>  my $volumes;
> @@ -52,7 +52,7 @@ is($@, "storage 'non-existent-store' does not exist\n", $test_name);
>  
>  $test_name = "test with disk from other VM (not owner)";
>  
> -$rawconf = "scsi0: local:103/vm-103-disk-1.qcow2,size=8G\n";
> +$rawconf = "scsi0: local:103/vol-vm-103-disk-1.qcow2,size=8G\n";
>  $conf = PVE::QemuServer::parse_vm_config("/qemu-server/$vmid.conf", $rawconf);
>  
>  $volumes = PVE::QemuConfig->get_replicatable_volumes($storecfg, $vmid, $conf, 0, 0);
> @@ -60,11 +60,11 @@ is_deeply($volumes, {}, $test_name);
>  
>  $test_name = "test missing replicate feature";
>  
> -$rawconf = "scsi0: local:$vmid/vm-$vmid-disk-1.qcow2,size=8G\n";
> +$rawconf = "scsi0: local:$vmid/vol-vm-$vmid-disk-1.qcow2,size=8G\n";
>  $conf = PVE::QemuServer::parse_vm_config("/qemu-server/$vmid.conf", $rawconf);
>  
>  eval { $volumes = PVE::QemuConfig->get_replicatable_volumes($storecfg, $vmid, $conf, 0, 0); };
> -is($@, "missing replicate feature on volume 'local:900/vm-900-disk-1.qcow2'\n", $test_name);
> +is($@, "missing replicate feature on volume 'local:900/vol-vm-900-disk-1.qcow2'\n", $test_name);
>  
>  $test_name = "test raw path disk with replicate enabled";
>  
> @@ -102,62 +102,62 @@ $test_name = "test hidden volid in snapshot";
>  
>  $rawconf = <<__EOD__;
>  memory: 1024
> -scsi0: local-zfs:vm-$vmid-disk-2,size=8G
> +scsi0: local-zfs:vol-vm-$vmid-disk-2,size=8G
>  [snap1]
>  memory: 512 
> -scsi0: local-zfs:vm-$vmid-disk-1,size=8G    
> +scsi0: local-zfs:vol-vm-$vmid-disk-1,size=8G    
>  __EOD__
>  
>  $conf = PVE::QemuServer::parse_vm_config("/qemu-server/$vmid.conf", $rawconf);
>  $volumes = PVE::QemuConfig->get_replicatable_volumes($storecfg, $vmid, $conf, 0, 0);
>  $expect = {
> -    "local-zfs:vm-$vmid-disk-1" => 1,
> -    "local-zfs:vm-$vmid-disk-2" => 1,
> +    "local-zfs:vol-vm-$vmid-disk-1" => 1,
> +    "local-zfs:vol-vm-$vmid-disk-2" => 1,
>  };
>  is_deeply($volumes, $expect, $test_name);
>  
>  $test_name = "test volid with different replicate setting in snapshot";
>  $rawconf = <<__EOD__;
>  memory: 1024
> -scsi0: local-zfs:vm-$vmid-disk-1,size=8G,replicate=0
> +scsi0: local-zfs:vol-vm-$vmid-disk-1,size=8G,replicate=0
>  [snap1]
>  memory: 512 
> -scsi0: local-zfs:vm-$vmid-disk-1,size=8G
> +scsi0: local-zfs:vol-vm-$vmid-disk-1,size=8G
>  __EOD__
>  
>  $conf = PVE::QemuServer::parse_vm_config("/qemu-server/$vmid.conf", $rawconf);
>  $volumes = PVE::QemuConfig->get_replicatable_volumes($storecfg, $vmid, $conf, 0, 0);
>  $expect = {
> -    "local-zfs:vm-$vmid-disk-1" => 1,
> +    "local-zfs:vol-vm-$vmid-disk-1" => 1,
>  };
>  is_deeply($volumes, $expect, $test_name);
>  
>  $test_name = "test vm with replicatable unused volumes";
>  
>  $rawconf = <<__EOD__;
> -scsi0: local-zfs:vm-$vmid-disk-1,size=8G
> -unused1: local-zfs:vm-$vmid-disk-2
> -unused5: local-zfs:vm-$vmid-disk-3
> +scsi0: local-zfs:vol-vm-$vmid-disk-1,size=8G
> +unused1: local-zfs:vol-vm-$vmid-disk-2
> +unused5: local-zfs:vol-vm-$vmid-disk-3
>  __EOD__
>  
>  $conf = PVE::QemuServer::parse_vm_config("/qemu-server/$vmid.conf", $rawconf);
>  $volumes = PVE::QemuConfig->get_replicatable_volumes($storecfg, $vmid, $conf, 0, 0);
>  $expect = {
> -    "local-zfs:vm-$vmid-disk-1" => 1,
> -    "local-zfs:vm-$vmid-disk-2" => 1,
> -    "local-zfs:vm-$vmid-disk-3" => 1,
> +    "local-zfs:vol-vm-$vmid-disk-1" => 1,
> +    "local-zfs:vol-vm-$vmid-disk-2" => 1,
> +    "local-zfs:vol-vm-$vmid-disk-3" => 1,
>  };
>  is_deeply($volumes, $expect, $test_name);
>  
>  $test_name = "test vm with non-replicatable unused volumes";
>  $rawconf = <<__EOD__;
> -scsi0: local-zfs:vm-$vmid-disk-1,size=8G
> -unused1: local:$vmid/vm-$vmid-disk-2.raw
> +scsi0: local-zfs:vol-vm-$vmid-disk-1,size=8G
> +unused1: local:$vmid/vol-vm-$vmid-disk-2.raw
>  __EOD__
>  
>  $conf = PVE::QemuServer::parse_vm_config("/qemu-server/$vmid.conf", $rawconf);
>  eval { $volumes = PVE::QemuConfig->get_replicatable_volumes($storecfg, $vmid, $conf, 0, 0); };
> -is($@, "missing replicate feature on volume 'local:900/vm-900-disk-2.raw'\n", $test_name);
> +is($@, "missing replicate feature on volume 'local:900/vol-vm-900-disk-2.raw'\n", $test_name);
>  
>  done_testing();
>  exit(0);



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] 74+ messages in thread

* Re: [pve-devel] [PATCH qemu-server 10/10] tests: regenerate cfg2cmd files
  2025-07-29 11:15 ` [pve-devel] [PATCH qemu-server 10/10] tests: regenerate cfg2cmd files Wolfgang Bumiller
@ 2025-07-29 14:19   ` Max R. Carrara
  0 siblings, 0 replies; 74+ messages in thread
From: Max R. Carrara @ 2025-07-29 14:19 UTC (permalink / raw)
  To: Proxmox VE development discussion

On Tue Jul 29, 2025 at 1:15 PM CEST, Wolfgang Bumiller wrote:
> Only node name hashes change at this point.
>
> Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
> ---

FYI, also fails to apply due to lines getting split:

    Applying: tests: regenerate cfg2cmd files
    error: corrupt patch at line 341
    error: could not build fake ancestor

Applies cleanly after manually fixing up the patch.

>  src/test/cfg2cmd/aio.conf.cmd                 | 28 +++++++++----------
>  src/test/cfg2cmd/bootorder-empty.conf.cmd     |  6 ++--
>  src/test/cfg2cmd/bootorder-legacy.conf.cmd    |  6 ++--
>  src/test/cfg2cmd/bootorder.conf.cmd           |  6 ++--
>  src/test/cfg2cmd/efi-raw.conf.cmd             |  2 +-
>  .../cfg2cmd/efi-secboot-and-tpm-q35.conf.cmd  |  2 +-
>  src/test/cfg2cmd/efi-secboot-and-tpm.conf.cmd |  2 +-
>  src/test/cfg2cmd/efidisk-on-rbd.conf.cmd      |  2 +-
>  src/test/cfg2cmd/ide.conf.cmd                 |  2 +-
>  src/test/cfg2cmd/q35-ide.conf.cmd             |  2 +-
>  .../q35-linux-hostpci-mapping.conf.cmd        |  2 +-
>  .../q35-linux-hostpci-multifunction.conf.cmd  |  2 +-
>  ...q35-linux-hostpci-x-pci-overrides.conf.cmd |  2 +-
>  src/test/cfg2cmd/q35-linux-hostpci.conf.cmd   |  2 +-
>  src/test/cfg2cmd/q35-simple.conf.cmd          |  2 +-
>  src/test/cfg2cmd/seabios_serial.conf.cmd      |  2 +-
>  src/test/cfg2cmd/sev-es.conf.cmd              |  2 +-
>  src/test/cfg2cmd/sev-std.conf.cmd             |  2 +-
>  src/test/cfg2cmd/simple-backingchain.conf.cmd |  4 +--
>  src/test/cfg2cmd/simple-btrfs.conf.cmd        |  8 +++---
>  src/test/cfg2cmd/simple-cifs.conf.cmd         |  8 +++---
>  src/test/cfg2cmd/simple-lvm.conf.cmd          |  8 +++---
>  src/test/cfg2cmd/simple-lvmthin.conf.cmd      |  8 +++---
>  src/test/cfg2cmd/simple-rbd.conf.cmd          | 16 +++++------
>  src/test/cfg2cmd/simple-virtio-blk.conf.cmd   |  2 +-
>  .../cfg2cmd/simple-zfs-over-iscsi.conf.cmd    |  8 +++---
>  src/test/cfg2cmd/simple1.conf.cmd             |  2 +-
>  27 files changed, 69 insertions(+), 69 deletions(-)
>
> diff --git a/src/test/cfg2cmd/aio.conf.cmd b/src/test/cfg2cmd/aio.conf.cmd
> index 7544b1db..8bd6ad9e 100644
> --- a/src/test/cfg2cmd/aio.conf.cmd
> +++ b/src/test/cfg2cmd/aio.conf.cmd
> @@ -38,33 +38,33 @@
>    -device 'virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3,free-page-reporting=on' \
>    -iscsi 'initiator-name=iqn.1993-08.org.debian:01:aabbccddeeff' \
>    -device 'lsi,id=scsihw0,bus=pci.0,addr=0x5' \
> -  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"threads","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/var/lib/vz/vms/8006/vol-vm-8006-disk-0.raw","node-name":"e3b2553803d55d43b9986a0aac3e9a7","read-only":false},"node-name":"f3b2553803d55d43b9986a0aac3e9a7","read-only":false},"node-name":"drive-scsi0","read-only":false,"throttle-group":"throttle-drive-scsi0"}' \
> +  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"threads","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/var/lib/vz/vms/8006/vol-vm-8006-disk-0.raw","node-name":"e711a57e7dda882833cb7b277366b29","read-only":false},"node-name":"f711a57e7dda882833cb7b277366b29","read-only":false},"node-name":"drive-scsi0","read-only":false,"throttle-group":"throttle-drive-scsi0"}' \
>    -device 'scsi-hd,bus=scsihw0.0,scsi-id=0,drive=drive-scsi0,id=scsi0,device_id=drive-scsi0,write-cache=on' \
> -  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"native","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/var/lib/vz/vms/8006/vol-vm-8006-disk-1.raw","node-name":"e08707d013893852b3d4d42301a4298","read-only":false},"node-name":"f08707d013893852b3d4d42301a4298","read-only":false},"node-name":"drive-scsi1","read-only":false,"throttle-group":"throttle-drive-scsi1"}' \
> +  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"native","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/var/lib/vz/vms/8006/vol-vm-8006-disk-1.raw","node-name":"e114231d5596d5d7189a4ffe674615b","read-only":false},"node-name":"f114231d5596d5d7189a4ffe674615b","read-only":false},"node-name":"drive-scsi1","read-only":false,"throttle-group":"throttle-drive-scsi1"}' \
>    -device 'scsi-hd,bus=scsihw0.0,scsi-id=1,drive=drive-scsi1,id=scsi1,device_id=drive-scsi1,write-cache=on' \
> -  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/var/lib/vz/vms/8006/vol-vm-8006-disk-2.raw","node-name":"edb0854bba55e8b2544ad937c9f5afc","read-only":false},"node-name":"fdb0854bba55e8b2544ad937c9f5afc","read-only":false},"node-name":"drive-scsi2","read-only":false,"throttle-group":"throttle-drive-scsi2"}' \
> +  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/var/lib/vz/vms/8006/vol-vm-8006-disk-2.raw","node-name":"e468504bb07bf0cbd19ac604cc55d13","read-only":false},"node-name":"f468504bb07bf0cbd19ac604cc55d13","read-only":false},"node-name":"drive-scsi2","read-only":false,"throttle-group":"throttle-drive-scsi2"}' \
>    -device 'scsi-hd,bus=scsihw0.0,scsi-id=2,drive=drive-scsi2,id=scsi2,device_id=drive-scsi2,write-cache=on' \
> -  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/var/lib/vz/vms/8006/vol-vm-8006-disk-3.raw","node-name":"e9c170cb9491763cad3f31718205efc","read-only":false},"node-name":"f9c170cb9491763cad3f31718205efc","read-only":false},"node-name":"drive-scsi3","read-only":false,"throttle-group":"throttle-drive-scsi3"}' \
> +  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/var/lib/vz/vms/8006/vol-vm-8006-disk-3.raw","node-name":"e0c9b44f107b4b27393827f41dbc3a9","read-only":false},"node-name":"f0c9b44f107b4b27393827f41dbc3a9","read-only":false},"node-name":"drive-scsi3","read-only":false,"throttle-group":"throttle-drive-scsi3"}' \
>    -device 'scsi-hd,bus=scsihw0.0,scsi-id=3,drive=drive-scsi3,id=scsi3,device_id=drive-scsi3,write-cache=on' \
> -  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"native","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/mnt/pve/cifs-store/vms/8006/vol-vm-8006-disk-4.raw","node-name":"ea34ecc24c40da0d53420ef344ced37","read-only":false},"node-name":"fa34ecc24c40da0d53420ef344ced37","read-only":false},"node-name":"drive-scsi4","read-only":false,"throttle-group":"throttle-drive-scsi4"}' \
> +  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"native","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/mnt/pve/cifs-store/vms/8006/vol-vm-8006-disk-4.raw","node-name":"e13a2959906e44f7cc40fc3735d972b","read-only":false},"node-name":"f13a2959906e44f7cc40fc3735d972b","read-only":false},"node-name":"drive-scsi4","read-only":false,"throttle-group":"throttle-drive-scsi4"}' \
>    -device 'scsi-hd,bus=scsihw0.0,scsi-id=4,drive=drive-scsi4,id=scsi4,device_id=drive-scsi4,write-cache=on' \
> -  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/mnt/pve/cifs-store/vms/8006/vol-vm-8006-disk-5.raw","node-name":"e39cacf47a4f4877072601505d90949","read-only":false},"node-name":"f39cacf47a4f4877072601505d90949","read-only":false},"node-name":"drive-scsi5","read-only":false,"throttle-group":"throttle-drive-scsi5"}' \
> +  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/mnt/pve/cifs-store/vms/8006/vol-vm-8006-disk-5.raw","node-name":"ed8f89e28d2677f81cbbe826a0fe887","read-only":false},"node-name":"fd8f89e28d2677f81cbbe826a0fe887","read-only":false},"node-name":"drive-scsi5","read-only":false,"throttle-group":"throttle-drive-scsi5"}' \
>    -device 'scsi-hd,bus=scsihw0.0,scsi-id=5,drive=drive-scsi5,id=scsi5,device_id=drive-scsi5,write-cache=on' \
> -  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"host_device","filename":"/dev/rbd-pve/fc4181a6-56eb-4f68-b452-8ba1f381ca2a/cpool/vol-vm-8006-disk-6","node-name":"e7db1ee70981087e4a2861bc7da417b","read-only":false},"node-name":"f7db1ee70981087e4a2861bc7da417b","read-only":false},"node-name":"drive-scsi6","read-only":false,"throttle-group":"throttle-drive-scsi6"}' \
> +  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"host_device","filename":"/dev/rbd-pve/fc4181a6-56eb-4f68-b452-8ba1f381ca2a/cpool/vol-vm-8006-disk-6","node-name":"e6c656aa149ece1c9134f93c28029f8","read-only":false},"node-name":"f6c656aa149ece1c9134f93c28029f8","read-only":false},"node-name":"drive-scsi6","read-only":false,"throttle-group":"throttle-drive-scsi6"}' \
>    -device 'scsi-hd,bus=scsihw0.0,scsi-id=6,drive=drive-scsi6,id=scsi6,device_id=drive-scsi6,write-cache=on' \
>    -device 'lsi,id=scsihw1,bus=pci.0,addr=0x6' \
> -  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"host_device","filename":"/dev/rbd-pve/fc4181a6-56eb-4f68-b452-8ba1f381ca2a/cpool/vol-vm-8006-disk-7","node-name":"e2d2deac808301140a96c862fe3ea85","read-only":false},"node-name":"f2d2deac808301140a96c862fe3ea85","read-only":false},"node-name":"drive-scsi7","read-only":false,"throttle-group":"throttle-drive-scsi7"}' \
> +  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"host_device","filename":"/dev/rbd-pve/fc4181a6-56eb-4f68-b452-8ba1f381ca2a/cpool/vol-vm-8006-disk-7","node-name":"e11b544de4ab077359ec27407bda460","read-only":false},"node-name":"f11b544de4ab077359ec27407bda460","read-only":false},"node-name":"drive-scsi7","read-only":false,"throttle-group":"throttle-drive-scsi7"}' \
>    -device 'scsi-hd,bus=scsihw1.0,scsi-id=0,drive=drive-scsi7,id=scsi7,device_id=drive-scsi7,write-cache=on' \
> -  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"threads","cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"host_device","filename":"/dev/rbd-pve/fc4181a6-56eb-4f68-b452-8ba1f381ca2a/cpool/vol-vm-8006-disk-8","node-name":"e9796b73db57b8943746ede7d0d3060","read-only":false},"node-name":"f9796b73db57b8943746ede7d0d3060","read-only":false},"node-name":"drive-scsi8","read-only":false,"throttle-group":"throttle-drive-scsi8"}' \
> +  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"threads","cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"host_device","filename":"/dev/rbd-pve/fc4181a6-56eb-4f68-b452-8ba1f381ca2a/cpool/vol-vm-8006-disk-8","node-name":"ef89b3e6959257ddd5c47b9dac24153","read-only":false},"node-name":"ff89b3e6959257ddd5c47b9dac24153","read-only":false},"node-name":"drive-scsi8","read-only":false,"throttle-group":"throttle-drive-scsi8"}' \
>    -device 'scsi-hd,bus=scsihw1.0,scsi-id=1,drive=drive-scsi8,id=scsi8,device_id=drive-scsi8,write-cache=on' \
> -  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"io_uring","cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"host_device","filename":"/dev/rbd-pve/fc4181a6-56eb-4f68-b452-8ba1f381ca2a/cpool/vol-vm-8006-disk-9","node-name":"efa538892acc012edbdc5810035bf7d","read-only":false},"node-name":"ffa538892acc012edbdc5810035bf7d","read-only":false},"node-name":"drive-scsi9","read-only":false,"throttle-group":"throttle-drive-scsi9"}' \
> +  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"io_uring","cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"host_device","filename":"/dev/rbd-pve/fc4181a6-56eb-4f68-b452-8ba1f381ca2a/cpool/vol-vm-8006-disk-9","node-name":"e241ab50dd58ea2ce3d3fd8e390a4fa","read-only":false},"node-name":"f241ab50dd58ea2ce3d3fd8e390a4fa","read-only":false},"node-name":"drive-scsi9","read-only":false,"throttle-group":"throttle-drive-scsi9"}' \
>    -device 'scsi-hd,bus=scsihw1.0,scsi-id=2,drive=drive-scsi9,id=scsi9,device_id=drive-scsi9,write-cache=on' \
> -  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"auth-client-required":["none"],"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"rbd","image":"vol-vm-8006-disk-8","node-name":"e6f4cbffa741d16bba69304eb2800ef","pool":"cpool","read-only":false,"server":[{"host":"127.0.0.42","port":"3300"},{"host":"127.0.0.21","port":"3300"},{"host":"::1","port":"3300"}]},"node-name":"f6f4cbffa741d16bba69304eb2800ef","read-only":false},"node-name":"drive-scsi10","read-only":false,"throttle-group":"throttle-drive-scsi10"}' \
> +  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"auth-client-required":["none"],"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"rbd","image":"vol-vm-8006-disk-8","node-name":"e62776a0c25540d3f44a288ef286873","pool":"cpool","read-only":false,"server":[{"host":"127.0.0.42","port":"3300"},{"host":"127.0.0.21","port":"3300"},{"host":"::1","port":"3300"}]},"node-name":"f62776a0c25540d3f44a288ef286873","read-only":false},"node-name":"drive-scsi10","read-only":false,"throttle-group":"throttle-drive-scsi10"}' \
>    -device 'scsi-hd,bus=scsihw1.0,scsi-id=3,drive=drive-scsi10,id=scsi10,device_id=drive-scsi10,write-cache=on' \
> -  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"auth-client-required":["none"],"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"rbd","image":"vol-vm-8006-disk-8","node-name":"e42375c54de70f5f4be966d98c90255","pool":"cpool","read-only":false,"server":[{"host":"127.0.0.42","port":"3300"},{"host":"127.0.0.21","port":"3300"},{"host":"::1","port":"3300"}]},"node-name":"f42375c54de70f5f4be966d98c90255","read-only":false},"node-name":"drive-scsi11","read-only":false,"throttle-group":"throttle-drive-scsi11"}' \
> +  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"auth-client-required":["none"],"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"rbd","image":"vol-vm-8006-disk-8","node-name":"e37ebe8380dcfd9549eb68ff01456fb","pool":"cpool","read-only":false,"server":[{"host":"127.0.0.42","port":"3300"},{"host":"127.0.0.21","port":"3300"},{"host":"::1","port":"3300"}]},"node-name":"f37ebe8380dcfd9549eb68ff01456fb","read-only":false},"node-name":"drive-scsi11","read-only":false,"throttle-group":"throttle-drive-scsi11"}' \
>    -device 'scsi-hd,bus=scsihw1.0,scsi-id=4,drive=drive-scsi11,id=scsi11,device_id=drive-scsi11,write-cache=on' \
> -  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"native","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"host_device","filename":"/dev/veegee/vol-vm-8006-disk-9","node-name":"ed7b2c9e0133619fcf6cb8ce5903502","read-only":false},"node-name":"fd7b2c9e0133619fcf6cb8ce5903502","read-only":false},"node-name":"drive-scsi12","read-only":false,"throttle-group":"throttle-drive-scsi12"}' \
> +  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"native","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"host_device","filename":"/dev/veegee/vol-vm-8006-disk-9","node-name":"ef3da0a5b87f2c34dbadab0725aa614","read-only":false},"node-name":"ff3da0a5b87f2c34dbadab0725aa614","read-only":false},"node-name":"drive-scsi12","read-only":false,"throttle-group":"throttle-drive-scsi12"}' \
>    -device 'scsi-hd,bus=scsihw1.0,scsi-id=5,drive=drive-scsi12,id=scsi12,device_id=drive-scsi12,write-cache=on' \
> -  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"host_device","filename":"/dev/veegee/vol-vm-8006-disk-9","node-name":"ed85420a880203ca1401d00a8edf132","read-only":false},"node-name":"fd85420a880203ca1401d00a8edf132","read-only":false},"node-name":"drive-scsi13","read-only":false,"throttle-group":"throttle-drive-scsi13"}' \
> +  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"host_device","filename":"/dev/veegee/vol-vm-8006-disk-9","node-name":"effe00e4d505fd544b233454bae4f6a","read-only":false},"node-name":"fffe00e4d505fd544b233454bae4f6a","read-only":false},"node-name":"drive-scsi13","read-only":false,"throttle-group":"throttle-drive-scsi13"}' \
>    -device 'scsi-hd,bus=scsihw1.0,scsi-id=6,drive=drive-scsi13,id=scsi13,device_id=drive-scsi13,write-cache=on' \
>    -machine 'type=pc+pve0'
> diff --git a/src/test/cfg2cmd/bootorder-empty.conf.cmd b/src/test/cfg2cmd/bootorder-empty.conf.cmd
> index b53e303b..5b0933ad 100644
> --- a/src/test/cfg2cmd/bootorder-empty.conf.cmd
> +++ b/src/test/cfg2cmd/bootorder-empty.conf.cmd
> @@ -32,11 +32,11 @@
>    -iscsi 'initiator-name=iqn.1993-08.org.debian:01:aabbccddeeff' \
>    -device 'ide-cd,bus=ide.1,unit=0,id=ide2' \
>    -device 'lsi,id=scsihw0,bus=pci.0,addr=0x5' \
> -  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/var/lib/vz/vms/8006/vol-vm-8006-disk-0.qcow2","node-name":"e6bf62e20f6c14a2c19bd6f1f5ac36c","read-only":false},"node-name":"f6bf62e20f6c14a2c19bd6f1f5ac36c","read-only":false},"node-name":"drive-scsi4","read-only":false,"throttle-group":"throttle-drive-scsi4"}' \
> +  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/var/lib/vz/vms/8006/vol-vm-8006-disk-0.qcow2","node-name":"e7c30de04435d4f4b502bf93100701c","read-only":false},"node-name":"f7c30de04435d4f4b502bf93100701c","read-only":false},"node-name":"drive-scsi4","read-only":false,"throttle-group":"throttle-drive-scsi4"}' \
>    -device 'scsi-hd,bus=scsihw0.0,scsi-id=4,drive=drive-scsi4,id=scsi4,device_id=drive-scsi4,write-cache=on' \
> -  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/var/lib/vz/vms/8006/vol-vm-8006-disk-0.qcow2","node-name":"edd19f6c1b3a6d5a6248c3376a91a16","read-only":false},"node-name":"fdd19f6c1b3a6d5a6248c3376a91a16","read-only":false},"node-name":"drive-virtio0","read-only":false,"throttle-group":"throttle-drive-virtio0"}' \
> +  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/var/lib/vz/vms/8006/vol-vm-8006-disk-0.qcow2","node-name":"ee6988c85939a5b45caf39810880e8d","read-only":false},"node-name":"fe6988c85939a5b45caf39810880e8d","read-only":false},"node-name":"drive-virtio0","read-only":false,"throttle-group":"throttle-drive-virtio0"}' \
>    -device 'virtio-blk-pci,drive=drive-virtio0,id=virtio0,bus=pci.0,addr=0xa,iothread=iothread-virtio0,write-cache=on' \
> -  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/var/lib/vz/vms/8006/vol-vm-8006-disk-0.qcow2","node-name":"eeb683fb9c516c1a8707c917f0d7a38","read-only":false},"node-name":"feb683fb9c516c1a8707c917f0d7a38","read-only":false},"node-name":"drive-virtio1","read-only":false,"throttle-group":"throttle-drive-virtio1"}' \
> +  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/var/lib/vz/vms/8006/vol-vm-8006-disk-0.qcow2","node-name":"e8c62d4877fe0fe771c65f9b77d3af7","read-only":false},"node-name":"f8c62d4877fe0fe771c65f9b77d3af7","read-only":false},"node-name":"drive-virtio1","read-only":false,"throttle-group":"throttle-drive-virtio1"}' \
>    -device 'virtio-blk-pci,drive=drive-virtio1,id=virtio1,bus=pci.0,addr=0xb,iothread=iothread-virtio1,write-cache=on' \
>    -netdev 'type=tap,id=net0,ifname=tap8006i0,script=/usr/libexec/qemu-server/pve-bridge,downscript=/usr/libexec/qemu-server/pve-bridgedown,vhost=on' \
>    -device 'virtio-net-pci,mac=A2:C0:43:77:08:A0,netdev=net0,bus=pci.0,addr=0x12,id=net0,rx_queue_size=1024,tx_queue_size=256' \
> diff --git a/src/test/cfg2cmd/bootorder-legacy.conf.cmd b/src/test/cfg2cmd/bootorder-legacy.conf.cmd
> index 85b2ec50..e45d0c35 100644
> --- a/src/test/cfg2cmd/bootorder-legacy.conf.cmd
> +++ b/src/test/cfg2cmd/bootorder-legacy.conf.cmd
> @@ -32,11 +32,11 @@
>    -iscsi 'initiator-name=iqn.1993-08.org.debian:01:aabbccddeeff' \
>    -device 'ide-cd,bus=ide.1,unit=0,id=ide2,bootindex=200' \
>    -device 'lsi,id=scsihw0,bus=pci.0,addr=0x5' \
> -  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/var/lib/vz/vms/8006/vol-vm-8006-disk-0.qcow2","node-name":"e6bf62e20f6c14a2c19bd6f1f5ac36c","read-only":false},"node-name":"f6bf62e20f6c14a2c19bd6f1f5ac36c","read-only":false},"node-name":"drive-scsi4","read-only":false,"throttle-group":"throttle-drive-scsi4"}' \
> +  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/var/lib/vz/vms/8006/vol-vm-8006-disk-0.qcow2","node-name":"e7c30de04435d4f4b502bf93100701c","read-only":false},"node-name":"f7c30de04435d4f4b502bf93100701c","read-only":false},"node-name":"drive-scsi4","read-only":false,"throttle-group":"throttle-drive-scsi4"}' \
>    -device 'scsi-hd,bus=scsihw0.0,scsi-id=4,drive=drive-scsi4,id=scsi4,device_id=drive-scsi4,write-cache=on' \
> -  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/var/lib/vz/vms/8006/vol-vm-8006-disk-0.qcow2","node-name":"edd19f6c1b3a6d5a6248c3376a91a16","read-only":false},"node-name":"fdd19f6c1b3a6d5a6248c3376a91a16","read-only":false},"node-name":"drive-virtio0","read-only":false,"throttle-group":"throttle-drive-virtio0"}' \
> +  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/var/lib/vz/vms/8006/vol-vm-8006-disk-0.qcow2","node-name":"ee6988c85939a5b45caf39810880e8d","read-only":false},"node-name":"fe6988c85939a5b45caf39810880e8d","read-only":false},"node-name":"drive-virtio0","read-only":false,"throttle-group":"throttle-drive-virtio0"}' \
>    -device 'virtio-blk-pci,drive=drive-virtio0,id=virtio0,bus=pci.0,addr=0xa,iothread=iothread-virtio0,write-cache=on' \
> -  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/var/lib/vz/vms/8006/vol-vm-8006-disk-0.qcow2","node-name":"eeb683fb9c516c1a8707c917f0d7a38","read-only":false},"node-name":"feb683fb9c516c1a8707c917f0d7a38","read-only":false},"node-name":"drive-virtio1","read-only":false,"throttle-group":"throttle-drive-virtio1"}' \
> +  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/var/lib/vz/vms/8006/vol-vm-8006-disk-0.qcow2","node-name":"e8c62d4877fe0fe771c65f9b77d3af7","read-only":false},"node-name":"f8c62d4877fe0fe771c65f9b77d3af7","read-only":false},"node-name":"drive-virtio1","read-only":false,"throttle-group":"throttle-drive-virtio1"}' \
>    -device 'virtio-blk-pci,drive=drive-virtio1,id=virtio1,bus=pci.0,addr=0xb,iothread=iothread-virtio1,bootindex=302,write-cache=on' \
>    -netdev 'type=tap,id=net0,ifname=tap8006i0,script=/usr/libexec/qemu-server/pve-bridge,downscript=/usr/libexec/qemu-server/pve-bridgedown,vhost=on' \
>    -device 'virtio-net-pci,mac=A2:C0:43:77:08:A0,netdev=net0,bus=pci.0,addr=0x12,id=net0,rx_queue_size=1024,tx_queue_size=256,bootindex=100' \
> diff --git a/src/test/cfg2cmd/bootorder.conf.cmd b/src/test/cfg2cmd/bootorder.conf.cmd
> index 78e6c51b..3411bc22 100644
> --- a/src/test/cfg2cmd/bootorder.conf.cmd
> +++ b/src/test/cfg2cmd/bootorder.conf.cmd
> @@ -32,11 +32,11 @@
>    -iscsi 'initiator-name=iqn.1993-08.org.debian:01:aabbccddeeff' \
>    -device 'ide-cd,bus=ide.1,unit=0,id=ide2,bootindex=103' \
>    -device 'lsi,id=scsihw0,bus=pci.0,addr=0x5' \
> -  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/var/lib/vz/vms/8006/vol-vm-8006-disk-0.qcow2","node-name":"e6bf62e20f6c14a2c19bd6f1f5ac36c","read-only":false},"node-name":"f6bf62e20f6c14a2c19bd6f1f5ac36c","read-only":false},"node-name":"drive-scsi4","read-only":false,"throttle-group":"throttle-drive-scsi4"}' \
> +  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/var/lib/vz/vms/8006/vol-vm-8006-disk-0.qcow2","node-name":"e7c30de04435d4f4b502bf93100701c","read-only":false},"node-name":"f7c30de04435d4f4b502bf93100701c","read-only":false},"node-name":"drive-scsi4","read-only":false,"throttle-group":"throttle-drive-scsi4"}' \
>    -device 'scsi-hd,bus=scsihw0.0,scsi-id=4,drive=drive-scsi4,id=scsi4,device_id=drive-scsi4,bootindex=102,write-cache=on' \
> -  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/var/lib/vz/vms/8006/vol-vm-8006-disk-0.qcow2","node-name":"edd19f6c1b3a6d5a6248c3376a91a16","read-only":false},"node-name":"fdd19f6c1b3a6d5a6248c3376a91a16","read-only":false},"node-name":"drive-virtio0","read-only":false,"throttle-group":"throttle-drive-virtio0"}' \
> +  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/var/lib/vz/vms/8006/vol-vm-8006-disk-0.qcow2","node-name":"ee6988c85939a5b45caf39810880e8d","read-only":false},"node-name":"fe6988c85939a5b45caf39810880e8d","read-only":false},"node-name":"drive-virtio0","read-only":false,"throttle-group":"throttle-drive-virtio0"}' \
>    -device 'virtio-blk-pci,drive=drive-virtio0,id=virtio0,bus=pci.0,addr=0xa,iothread=iothread-virtio0,write-cache=on' \
> -  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/var/lib/vz/vms/8006/vol-vm-8006-disk-0.qcow2","node-name":"eeb683fb9c516c1a8707c917f0d7a38","read-only":false},"node-name":"feb683fb9c516c1a8707c917f0d7a38","read-only":false},"node-name":"drive-virtio1","read-only":false,"throttle-group":"throttle-drive-virtio1"}' \
> +  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/var/lib/vz/vms/8006/vol-vm-8006-disk-0.qcow2","node-name":"e8c62d4877fe0fe771c65f9b77d3af7","read-only":false},"node-name":"f8c62d4877fe0fe771c65f9b77d3af7","read-only":false},"node-name":"drive-virtio1","read-only":false,"throttle-group":"throttle-drive-virtio1"}' \
>    -device 'virtio-blk-pci,drive=drive-virtio1,id=virtio1,bus=pci.0,addr=0xb,iothread=iothread-virtio1,bootindex=100,write-cache=on' \
>    -netdev 'type=tap,id=net0,ifname=tap8006i0,script=/usr/libexec/qemu-server/pve-bridge,downscript=/usr/libexec/qemu-server/pve-bridgedown,vhost=on' \
>    -device 'virtio-net-pci,mac=A2:C0:43:77:08:A0,netdev=net0,bus=pci.0,addr=0x12,id=net0,rx_queue_size=1024,tx_queue_size=256,bootindex=101' \
> diff --git a/src/test/cfg2cmd/efi-raw.conf.cmd b/src/test/cfg2cmd/efi-raw.conf.cmd
> index 74841d17..2380d1ce 100644
> --- a/src/test/cfg2cmd/efi-raw.conf.cmd
> +++ b/src/test/cfg2cmd/efi-raw.conf.cmd
> @@ -11,7 +11,7 @@
>    -smbios 'type=1,uuid=7b10d7af-b932-4c66-b2c3-3996152ec465' \
>    -object '{"id":"throttle-drive-efidisk0","limits":{},"qom-type":"throttle-group"}' \
>    -blockdev '{"driver":"raw","file":{"driver":"file","filename":"/usr/share/pve-edk2-firmware//OVMF_CODE.fd"},"node-name":"pflash0","read-only":true}' \
> -  -blockdev '{"detect-zeroes":"on","discard":"ignore","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"raw","file":{"aio":"io_uring","cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"file","filename":"/var/lib/vz/vms/100/vol-vm-100-disk-0.raw","node-name":"e1175f2a490414e7c53337589fde17a","read-only":false},"node-name":"f1175f2a490414e7c53337589fde17a","read-only":false,"size":131072},"node-name":"drive-efidisk0","read-only":false,"throttle-group":"throttle-drive-efidisk0"}' \
> +  -blockdev '{"detect-zeroes":"on","discard":"ignore","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"raw","file":{"aio":"io_uring","cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"file","filename":"/var/lib/vz/vms/100/vol-vm-100-disk-0.raw","node-name":"e4a0922848e962048ec73b544fbbe4f","read-only":false},"node-name":"f4a0922848e962048ec73b544fbbe4f","read-only":false,"size":131072},"node-name":"drive-efidisk0","read-only":false,"throttle-group":"throttle-drive-efidisk0"}' \
>    -smp '1,sockets=1,cores=1,maxcpus=1' \
>    -nodefaults \
>    -boot 'menu=on,strict=on,reboot-timeout=1000,splash=/usr/share/qemu-server/bootsplash.jpg' \
> diff --git a/src/test/cfg2cmd/efi-secboot-and-tpm-q35.conf.cmd b/src/test/cfg2cmd/efi-secboot-and-tpm-q35.conf.cmd
> index 905fd1b6..e36a207f 100644
> --- a/src/test/cfg2cmd/efi-secboot-and-tpm-q35.conf.cmd
> +++ b/src/test/cfg2cmd/efi-secboot-and-tpm-q35.conf.cmd
> @@ -11,7 +11,7 @@
>    -smbios 'type=1,uuid=7b10d7af-b932-4c66-b2c3-3996152ec465' \
>    -object '{"id":"throttle-drive-efidisk0","limits":{},"qom-type":"throttle-group"}' \
>    -blockdev '{"driver":"raw","file":{"driver":"file","filename":"/usr/share/pve-edk2-firmware//OVMF_CODE_4M.secboot.fd"},"node-name":"pflash0","read-only":true}' \
> -  -blockdev '{"detect-zeroes":"on","discard":"ignore","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"raw","file":{"aio":"io_uring","cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"file","filename":"/var/lib/vz/vms/100/vol-vm-100-disk-0.raw","node-name":"e1175f2a490414e7c53337589fde17a","read-only":false},"node-name":"f1175f2a490414e7c53337589fde17a","read-only":false,"size":540672},"node-name":"drive-efidisk0","read-only":false,"throttle-group":"throttle-drive-efidisk0"}' \
> +  -blockdev '{"detect-zeroes":"on","discard":"ignore","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"raw","file":{"aio":"io_uring","cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"file","filename":"/var/lib/vz/vms/100/vol-vm-100-disk-0.raw","node-name":"e4a0922848e962048ec73b544fbbe4f","read-only":false},"node-name":"f4a0922848e962048ec73b544fbbe4f","read-only":false,"size":540672},"node-name":"drive-efidisk0","read-only":false,"throttle-group":"throttle-drive-efidisk0"}' \
>    -smp '1,sockets=1,cores=1,maxcpus=1' \
>    -nodefaults \
>    -boot 'menu=on,strict=on,reboot-timeout=1000,splash=/usr/share/qemu-server/bootsplash.jpg' \
> diff --git a/src/test/cfg2cmd/efi-secboot-and-tpm.conf.cmd b/src/test/cfg2cmd/efi-secboot-and-tpm.conf.cmd
> index 96d9c285..296f1c0f 100644
> --- a/src/test/cfg2cmd/efi-secboot-and-tpm.conf.cmd
> +++ b/src/test/cfg2cmd/efi-secboot-and-tpm.conf.cmd
> @@ -11,7 +11,7 @@
>    -smbios 'type=1,uuid=7b10d7af-b932-4c66-b2c3-3996152ec465' \
>    -object '{"id":"throttle-drive-efidisk0","limits":{},"qom-type":"throttle-group"}' \
>    -blockdev '{"driver":"raw","file":{"driver":"file","filename":"/usr/share/pve-edk2-firmware//OVMF_CODE_4M.fd"},"node-name":"pflash0","read-only":true}' \
> -  -blockdev '{"detect-zeroes":"on","discard":"ignore","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"raw","file":{"aio":"io_uring","cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"file","filename":"/var/lib/vz/vms/100/vol-vm-100-disk-0.raw","node-name":"e1175f2a490414e7c53337589fde17a","read-only":false},"node-name":"f1175f2a490414e7c53337589fde17a","read-only":false,"size":540672},"node-name":"drive-efidisk0","read-only":false,"throttle-group":"throttle-drive-efidisk0"}' \
> +  -blockdev '{"detect-zeroes":"on","discard":"ignore","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"raw","file":{"aio":"io_uring","cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"file","filename":"/var/lib/vz/vms/100/vol-vm-100-disk-0.raw","node-name":"e4a0922848e962048ec73b544fbbe4f","read-only":false},"node-name":"f4a0922848e962048ec73b544fbbe4f","read-only":false,"size":540672},"node-name":"drive-efidisk0","read-only":false,"throttle-group":"throttle-drive-efidisk0"}' \
>    -smp '1,sockets=1,cores=1,maxcpus=1' \
>    -nodefaults \
>    -boot 'menu=on,strict=on,reboot-timeout=1000,splash=/usr/share/qemu-server/bootsplash.jpg' \
> diff --git a/src/test/cfg2cmd/efidisk-on-rbd.conf.cmd b/src/test/cfg2cmd/efidisk-on-rbd.conf.cmd
> index dcab512c..3b8a2aa1 100644
> --- a/src/test/cfg2cmd/efidisk-on-rbd.conf.cmd
> +++ b/src/test/cfg2cmd/efidisk-on-rbd.conf.cmd
> @@ -11,7 +11,7 @@
>    -smbios 'type=1,uuid=3dd750ce-d910-44d0-9493-525c0be4e688' \
>    -object '{"id":"throttle-drive-efidisk0","limits":{},"qom-type":"throttle-group"}' \
>    -blockdev '{"driver":"raw","file":{"driver":"file","filename":"/usr/share/pve-edk2-firmware//OVMF_CODE.fd"},"node-name":"pflash0","read-only":true}' \
> -  -blockdev '{"detect-zeroes":"on","discard":"ignore","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"raw","file":{"auth-client-required":["none"],"cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"rbd","image":"vol-vm-100-disk-1","node-name":"eeb8f022b5551ad1d795611f112c767","pool":"cpool","read-only":false,"server":[{"host":"127.0.0.42","port":"3300"},{"host":"127.0.0.21","port":"3300"},{"host":"::1","port":"3300"}]},"node-name":"feb8f022b5551ad1d795611f112c767","read-only":false,"size":131072},"node-name":"drive-efidisk0","read-only":false,"throttle-group":"throttle-drive-efidisk0"}' \
> +  -blockdev '{"detect-zeroes":"on","discard":"ignore","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"raw","file":{"auth-client-required":["none"],"cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"rbd","image":"vol-vm-100-disk-1","node-name":"e7a7c30106b1db777b990dc81efeebf","pool":"cpool","read-only":false,"server":[{"host":"127.0.0.42","port":"3300"},{"host":"127.0.0.21","port":"3300"},{"host":"::1","port":"3300"}]},"node-name":"f7a7c30106b1db777b990dc81efeebf","read-only":false,"size":131072},"node-name":"drive-efidisk0","read-only":false,"throttle-group":"throttle-drive-efidisk0"}' \
>    -smp '1,sockets=1,cores=1,maxcpus=1' \
>    -nodefaults \
>    -boot 'menu=on,strict=on,reboot-timeout=1000,splash=/usr/share/qemu-server/bootsplash.jpg' \
> diff --git a/src/test/cfg2cmd/ide.conf.cmd b/src/test/cfg2cmd/ide.conf.cmd
> index 73dfdfab..2a1f0904 100644
> --- a/src/test/cfg2cmd/ide.conf.cmd
> +++ b/src/test/cfg2cmd/ide.conf.cmd
> @@ -39,7 +39,7 @@
>    -blockdev '{"driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"driver":"raw","file":{"aio":"threads","cache":{"direct":false,"no-flush":false},"driver":"file","filename":"/mnt/pve/cifs-store/template/iso/three.iso","node-name":"e35557bae4bcbf9edc9f7ff7f132f30","read-only":true},"node-name":"f35557bae4bcbf9edc9f7ff7f132f30","read-only":true},"node-name":"drive-ide3","read-only":true,"throttle-group":"throttle-drive-ide3"}' \
>    -device 'ide-cd,bus=ide.1,unit=1,drive=drive-ide3,id=ide3,bootindex=203' \
>    -device 'virtio-scsi-pci,id=scsihw0,bus=pci.0,addr=0x5' \
> -  -blockdev '{"detect-zeroes":"on","discard":"ignore","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"file","filename":"/var/lib/vz/vms/100/vol-vm-100-disk-2.qcow2","node-name":"ec11e0572184321efc5835152b95d5d","read-only":false},"node-name":"fc11e0572184321efc5835152b95d5d","read-only":false},"node-name":"drive-scsi0","read-only":false,"throttle-group":"throttle-drive-scsi0"}' \
> +  -blockdev '{"detect-zeroes":"on","discard":"ignore","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"file","filename":"/var/lib/vz/vms/100/vol-vm-100-disk-2.qcow2","node-name":"ef0b7212c0efeee3f63fe3322c0c230","read-only":false},"node-name":"ff0b7212c0efeee3f63fe3322c0c230","read-only":false},"node-name":"drive-scsi0","read-only":false,"throttle-group":"throttle-drive-scsi0"}' \
>    -device 'scsi-hd,bus=scsihw0.0,channel=0,scsi-id=0,lun=0,drive=drive-scsi0,id=scsi0,device_id=drive-scsi0,bootindex=100,write-cache=on' \
>    -netdev 'type=tap,id=net0,ifname=tap8006i0,script=/usr/libexec/qemu-server/pve-bridge,downscript=/usr/libexec/qemu-server/pve-bridgedown,vhost=on' \
>    -device 'virtio-net-pci,mac=2E:01:68:F9:9C:87,netdev=net0,bus=pci.0,addr=0x12,id=net0,rx_queue_size=1024,tx_queue_size=256,bootindex=300' \
> diff --git a/src/test/cfg2cmd/q35-ide.conf.cmd b/src/test/cfg2cmd/q35-ide.conf.cmd
> index 0a5ffd0e..06c92b0d 100644
> --- a/src/test/cfg2cmd/q35-ide.conf.cmd
> +++ b/src/test/cfg2cmd/q35-ide.conf.cmd
> @@ -38,7 +38,7 @@
>    -blockdev '{"driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"driver":"raw","file":{"aio":"threads","cache":{"direct":false,"no-flush":false},"driver":"file","filename":"/mnt/pve/cifs-store/template/iso/three.iso","node-name":"e35557bae4bcbf9edc9f7ff7f132f30","read-only":true},"node-name":"f35557bae4bcbf9edc9f7ff7f132f30","read-only":true},"node-name":"drive-ide3","read-only":true,"throttle-group":"throttle-drive-ide3"}' \
>    -device 'ide-cd,bus=ide.3,unit=0,drive=drive-ide3,id=ide3,bootindex=203' \
>    -device 'virtio-scsi-pci,id=scsihw0,bus=pci.0,addr=0x5' \
> -  -blockdev '{"detect-zeroes":"on","discard":"ignore","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"file","filename":"/var/lib/vz/vms/100/vol-vm-100-disk-2.qcow2","node-name":"ec11e0572184321efc5835152b95d5d","read-only":false},"node-name":"fc11e0572184321efc5835152b95d5d","read-only":false},"node-name":"drive-scsi0","read-only":false,"throttle-group":"throttle-drive-scsi0"}' \
> +  -blockdev '{"detect-zeroes":"on","discard":"ignore","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"file","filename":"/var/lib/vz/vms/100/vol-vm-100-disk-2.qcow2","node-name":"ef0b7212c0efeee3f63fe3322c0c230","read-only":false},"node-name":"ff0b7212c0efeee3f63fe3322c0c230","read-only":false},"node-name":"drive-scsi0","read-only":false,"throttle-group":"throttle-drive-scsi0"}' \
>    -device 'scsi-hd,bus=scsihw0.0,channel=0,scsi-id=0,lun=0,drive=drive-scsi0,id=scsi0,device_id=drive-scsi0,bootindex=100,write-cache=on' \
>    -netdev 'type=tap,id=net0,ifname=tap8006i0,script=/usr/libexec/qemu-server/pve-bridge,downscript=/usr/libexec/qemu-server/pve-bridgedown,vhost=on' \
>    -device 'virtio-net-pci,mac=2E:01:68:F9:9C:87,netdev=net0,bus=pci.0,addr=0x12,id=net0,rx_queue_size=1024,tx_queue_size=256,bootindex=300' \
> diff --git a/src/test/cfg2cmd/q35-linux-hostpci-mapping.conf.cmd b/src/test/cfg2cmd/q35-linux-hostpci-mapping.conf.cmd
> index 2c3e4539..de29d8ba 100644
> --- a/src/test/cfg2cmd/q35-linux-hostpci-mapping.conf.cmd
> +++ b/src/test/cfg2cmd/q35-linux-hostpci-mapping.conf.cmd
> @@ -11,7 +11,7 @@
>    -smbios 'type=1,uuid=3dd750ce-d910-44d0-9493-525c0be4e687' \
>    -object '{"id":"throttle-drive-efidisk0","limits":{},"qom-type":"throttle-group"}' \
>    -blockdev '{"driver":"raw","file":{"driver":"file","filename":"/usr/share/pve-edk2-firmware//OVMF_CODE.fd"},"node-name":"pflash0","read-only":true}' \
> -  -blockdev '{"detect-zeroes":"on","discard":"ignore","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"file","filename":"/var/lib/vz/vms/100/vol-vm-100-disk-1.qcow2","node-name":"e70e3017c5a79fdee5a04aa92ac1e9c","read-only":false},"node-name":"f70e3017c5a79fdee5a04aa92ac1e9c","read-only":false},"node-name":"drive-efidisk0","read-only":false,"throttle-group":"throttle-drive-efidisk0"}' \
> +  -blockdev '{"detect-zeroes":"on","discard":"ignore","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"file","filename":"/var/lib/vz/vms/100/vol-vm-100-disk-1.qcow2","node-name":"ea87ff7a6d7e671ef7c41cd459cbf7a","read-only":false},"node-name":"fa87ff7a6d7e671ef7c41cd459cbf7a","read-only":false},"node-name":"drive-efidisk0","read-only":false,"throttle-group":"throttle-drive-efidisk0"}' \
>    -global 'ICH9-LPC.acpi-pci-hotplug-with-bridge-support=off' \
>    -smp '2,sockets=2,cores=1,maxcpus=2' \
>    -nodefaults \
> diff --git a/src/test/cfg2cmd/q35-linux-hostpci-multifunction.conf.cmd b/src/test/cfg2cmd/q35-linux-hostpci-multifunction.conf.cmd
> index 219af1c4..7922102b 100644
> --- a/src/test/cfg2cmd/q35-linux-hostpci-multifunction.conf.cmd
> +++ b/src/test/cfg2cmd/q35-linux-hostpci-multifunction.conf.cmd
> @@ -11,7 +11,7 @@
>    -smbios 'type=1,uuid=3dd750ce-d910-44d0-9493-525c0be4e687' \
>    -object '{"id":"throttle-drive-efidisk0","limits":{},"qom-type":"throttle-group"}' \
>    -blockdev '{"driver":"raw","file":{"driver":"file","filename":"/usr/share/pve-edk2-firmware//OVMF_CODE.fd"},"node-name":"pflash0","read-only":true}' \
> -  -blockdev '{"detect-zeroes":"on","discard":"ignore","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"file","filename":"/var/lib/vz/vms/100/vol-vm-100-disk-1.qcow2","node-name":"e70e3017c5a79fdee5a04aa92ac1e9c","read-only":false},"node-name":"f70e3017c5a79fdee5a04aa92ac1e9c","read-only":false},"node-name":"drive-efidisk0","read-only":false,"throttle-group":"throttle-drive-efidisk0"}' \
> +  -blockdev '{"detect-zeroes":"on","discard":"ignore","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"file","filename":"/var/lib/vz/vms/100/vol-vm-100-disk-1.qcow2","node-name":"ea87ff7a6d7e671ef7c41cd459cbf7a","read-only":false},"node-name":"fa87ff7a6d7e671ef7c41cd459cbf7a","read-only":false},"node-name":"drive-efidisk0","read-only":false,"throttle-group":"throttle-drive-efidisk0"}' \
>    -global 'ICH9-LPC.acpi-pci-hotplug-with-bridge-support=off' \
>    -smp '2,sockets=2,cores=1,maxcpus=2' \
>    -nodefaults \
> diff --git a/src/test/cfg2cmd/q35-linux-hostpci-x-pci-overrides.conf.cmd b/src/test/cfg2cmd/q35-linux-hostpci-x-pci-overrides.conf.cmd
> index bfdba6d2..fe432369 100644
> --- a/src/test/cfg2cmd/q35-linux-hostpci-x-pci-overrides.conf.cmd
> +++ b/src/test/cfg2cmd/q35-linux-hostpci-x-pci-overrides.conf.cmd
> @@ -11,7 +11,7 @@
>    -smbios 'type=1,uuid=3dd750ce-d910-44d0-9493-525c0be4e687' \
>    -object '{"id":"throttle-drive-efidisk0","limits":{},"qom-type":"throttle-group"}' \
>    -blockdev '{"driver":"raw","file":{"driver":"file","filename":"/usr/share/pve-edk2-firmware//OVMF_CODE.fd"},"node-name":"pflash0","read-only":true}' \
> -  -blockdev '{"detect-zeroes":"on","discard":"ignore","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"file","filename":"/var/lib/vz/vms/100/vol-vm-100-disk-1.qcow2","node-name":"e70e3017c5a79fdee5a04aa92ac1e9c","read-only":false},"node-name":"f70e3017c5a79fdee5a04aa92ac1e9c","read-only":false},"node-name":"drive-efidisk0","read-only":false,"throttle-group":"throttle-drive-efidisk0"}' \
> +  -blockdev '{"detect-zeroes":"on","discard":"ignore","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"file","filename":"/var/lib/vz/vms/100/vol-vm-100-disk-1.qcow2","node-name":"ea87ff7a6d7e671ef7c41cd459cbf7a","read-only":false},"node-name":"fa87ff7a6d7e671ef7c41cd459cbf7a","read-only":false},"node-name":"drive-efidisk0","read-only":false,"throttle-group":"throttle-drive-efidisk0"}' \
>    -global 'ICH9-LPC.acpi-pci-hotplug-with-bridge-support=off' \
>    -smp '2,sockets=2,cores=1,maxcpus=2' \
>    -nodefaults \
> diff --git a/src/test/cfg2cmd/q35-linux-hostpci.conf.cmd b/src/test/cfg2cmd/q35-linux-hostpci.conf.cmd
> index b6edad85..dfe30075 100644
> --- a/src/test/cfg2cmd/q35-linux-hostpci.conf.cmd
> +++ b/src/test/cfg2cmd/q35-linux-hostpci.conf.cmd
> @@ -11,7 +11,7 @@
>    -smbios 'type=1,uuid=3dd750ce-d910-44d0-9493-525c0be4e687' \
>    -object '{"id":"throttle-drive-efidisk0","limits":{},"qom-type":"throttle-group"}' \
>    -blockdev '{"driver":"raw","file":{"driver":"file","filename":"/usr/share/pve-edk2-firmware//OVMF_CODE.fd"},"node-name":"pflash0","read-only":true}' \
> -  -blockdev '{"detect-zeroes":"on","discard":"ignore","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"file","filename":"/var/lib/vz/vms/100/vol-vm-100-disk-1.qcow2","node-name":"e70e3017c5a79fdee5a04aa92ac1e9c","read-only":false},"node-name":"f70e3017c5a79fdee5a04aa92ac1e9c","read-only":false},"node-name":"drive-efidisk0","read-only":false,"throttle-group":"throttle-drive-efidisk0"}' \
> +  -blockdev '{"detect-zeroes":"on","discard":"ignore","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"file","filename":"/var/lib/vz/vms/100/vol-vm-100-disk-1.qcow2","node-name":"ea87ff7a6d7e671ef7c41cd459cbf7a","read-only":false},"node-name":"fa87ff7a6d7e671ef7c41cd459cbf7a","read-only":false},"node-name":"drive-efidisk0","read-only":false,"throttle-group":"throttle-drive-efidisk0"}' \
>    -global 'ICH9-LPC.acpi-pci-hotplug-with-bridge-support=off' \
>    -smp '2,sockets=2,cores=1,maxcpus=2' \
>    -nodefaults \
> diff --git a/src/test/cfg2cmd/q35-simple.conf.cmd b/src/test/cfg2cmd/q35-simple.conf.cmd
> index deed9c2d..20690d1b 100644
> --- a/src/test/cfg2cmd/q35-simple.conf.cmd
> +++ b/src/test/cfg2cmd/q35-simple.conf.cmd
> @@ -11,7 +11,7 @@
>    -smbios 'type=1,uuid=3dd750ce-d910-44d0-9493-525c0be4e687' \
>    -object '{"id":"throttle-drive-efidisk0","limits":{},"qom-type":"throttle-group"}' \
>    -blockdev '{"driver":"raw","file":{"driver":"file","filename":"/usr/share/pve-edk2-firmware//OVMF_CODE.fd"},"node-name":"pflash0","read-only":true}' \
> -  -blockdev '{"detect-zeroes":"on","discard":"ignore","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"file","filename":"/var/lib/vz/vms/100/vol-vm-100-disk-1.qcow2","node-name":"e70e3017c5a79fdee5a04aa92ac1e9c","read-only":false},"node-name":"f70e3017c5a79fdee5a04aa92ac1e9c","read-only":false},"node-name":"drive-efidisk0","read-only":false,"throttle-group":"throttle-drive-efidisk0"}' \
> +  -blockdev '{"detect-zeroes":"on","discard":"ignore","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"file","filename":"/var/lib/vz/vms/100/vol-vm-100-disk-1.qcow2","node-name":"ea87ff7a6d7e671ef7c41cd459cbf7a","read-only":false},"node-name":"fa87ff7a6d7e671ef7c41cd459cbf7a","read-only":false},"node-name":"drive-efidisk0","read-only":false,"throttle-group":"throttle-drive-efidisk0"}' \
>    -global 'ICH9-LPC.acpi-pci-hotplug-with-bridge-support=off' \
>    -smp '2,sockets=1,cores=2,maxcpus=2' \
>    -nodefaults \
> diff --git a/src/test/cfg2cmd/seabios_serial.conf.cmd b/src/test/cfg2cmd/seabios_serial.conf.cmd
> index b401d58b..ae49aca4 100644
> --- a/src/test/cfg2cmd/seabios_serial.conf.cmd
> +++ b/src/test/cfg2cmd/seabios_serial.conf.cmd
> @@ -28,7 +28,7 @@
>    -iscsi 'initiator-name=iqn.1993-08.org.debian:01:aabbccddeeff' \
>    -device 'ide-cd,bus=ide.1,unit=0,id=ide2,bootindex=200' \
>    -device 'virtio-scsi-pci,id=scsihw0,bus=pci.0,addr=0x5' \
> -  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/var/lib/vz/vms/8006/vol-vm-8006-disk-0.qcow2","node-name":"ecd04be4259153b8293415fefa2a84c","read-only":false},"node-name":"fcd04be4259153b8293415fefa2a84c","read-only":false},"node-name":"drive-scsi0","read-only":false,"throttle-group":"throttle-drive-scsi0"}' \
> +  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/var/lib/vz/vms/8006/vol-vm-8006-disk-0.qcow2","node-name":"ed3a7e1debf641484f3aa78b2657af1","read-only":false},"node-name":"fd3a7e1debf641484f3aa78b2657af1","read-only":false},"node-name":"drive-scsi0","read-only":false,"throttle-group":"throttle-drive-scsi0"}' \
>    -device 'scsi-hd,bus=scsihw0.0,channel=0,scsi-id=0,lun=0,drive=drive-scsi0,id=scsi0,device_id=drive-scsi0,bootindex=100,write-cache=on' \
>    -netdev 'type=tap,id=net0,ifname=tap8006i0,script=/usr/libexec/qemu-server/pve-bridge,downscript=/usr/libexec/qemu-server/pve-bridgedown,vhost=on' \
>    -device 'virtio-net-pci,mac=A2:C0:43:77:08:A0,netdev=net0,bus=pci.0,addr=0x12,id=net0,rx_queue_size=1024,tx_queue_size=256,bootindex=300' \
> diff --git a/src/test/cfg2cmd/sev-es.conf.cmd b/src/test/cfg2cmd/sev-es.conf.cmd
> index d8b9394e..68000a3f 100644
> --- a/src/test/cfg2cmd/sev-es.conf.cmd
> +++ b/src/test/cfg2cmd/sev-es.conf.cmd
> @@ -11,7 +11,7 @@
>    -smbios 'type=1,uuid=7b10d7af-b932-4c66-b2c3-3996152ec465' \
>    -object '{"id":"throttle-drive-efidisk0","limits":{},"qom-type":"throttle-group"}' \
>    -blockdev '{"driver":"raw","file":{"driver":"file","filename":"/usr/share/pve-edk2-firmware//OVMF_CVM_CODE_4M.fd"},"node-name":"pflash0","read-only":true}' \
> -  -blockdev '{"detect-zeroes":"on","discard":"ignore","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"raw","file":{"aio":"io_uring","cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"file","filename":"/var/lib/vz/vms/100/vol-vm-100-disk-0.raw","node-name":"e1175f2a490414e7c53337589fde17a","read-only":false},"node-name":"f1175f2a490414e7c53337589fde17a","read-only":false,"size":540672},"node-name":"drive-efidisk0","read-only":false,"throttle-group":"throttle-drive-efidisk0"}' \
> +  -blockdev '{"detect-zeroes":"on","discard":"ignore","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"raw","file":{"aio":"io_uring","cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"file","filename":"/var/lib/vz/vms/100/vol-vm-100-disk-0.raw","node-name":"e4a0922848e962048ec73b544fbbe4f","read-only":false},"node-name":"f4a0922848e962048ec73b544fbbe4f","read-only":false,"size":540672},"node-name":"drive-efidisk0","read-only":false,"throttle-group":"throttle-drive-efidisk0"}' \
>    -smp '1,sockets=1,cores=1,maxcpus=1' \
>    -nodefaults \
>    -boot 'menu=on,strict=on,reboot-timeout=1000,splash=/usr/share/qemu-server/bootsplash.jpg' \
> diff --git a/src/test/cfg2cmd/sev-std.conf.cmd b/src/test/cfg2cmd/sev-std.conf.cmd
> index 177edae4..06ec97c0 100644
> --- a/src/test/cfg2cmd/sev-std.conf.cmd
> +++ b/src/test/cfg2cmd/sev-std.conf.cmd
> @@ -11,7 +11,7 @@
>    -smbios 'type=1,uuid=7b10d7af-b932-4c66-b2c3-3996152ec465' \
>    -object '{"id":"throttle-drive-efidisk0","limits":{},"qom-type":"throttle-group"}' \
>    -blockdev '{"driver":"raw","file":{"driver":"file","filename":"/usr/share/pve-edk2-firmware//OVMF_CVM_CODE_4M.fd"},"node-name":"pflash0","read-only":true}' \
> -  -blockdev '{"detect-zeroes":"on","discard":"ignore","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"raw","file":{"aio":"io_uring","cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"file","filename":"/var/lib/vz/vms/100/vol-vm-100-disk-0.raw","node-name":"e1175f2a490414e7c53337589fde17a","read-only":false},"node-name":"f1175f2a490414e7c53337589fde17a","read-only":false,"size":540672},"node-name":"drive-efidisk0","read-only":false,"throttle-group":"throttle-drive-efidisk0"}' \
> +  -blockdev '{"detect-zeroes":"on","discard":"ignore","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"raw","file":{"aio":"io_uring","cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"file","filename":"/var/lib/vz/vms/100/vol-vm-100-disk-0.raw","node-name":"e4a0922848e962048ec73b544fbbe4f","read-only":false},"node-name":"f4a0922848e962048ec73b544fbbe4f","read-only":false,"size":540672},"node-name":"drive-efidisk0","read-only":false,"throttle-group":"throttle-drive-efidisk0"}' \
>    -smp '1,sockets=1,cores=1,maxcpus=1' \
>    -nodefaults \
>    -boot 'menu=on,strict=on,reboot-timeout=1000,splash=/usr/share/qemu-server/bootsplash.jpg' \
> diff --git a/src/test/cfg2cmd/simple-backingchain.conf.cmd b/src/test/cfg2cmd/simple-backingchain.conf.cmd
> index 8ae2ca7a..ee705671 100644
> --- a/src/test/cfg2cmd/simple-backingchain.conf.cmd
> +++ b/src/test/cfg2cmd/simple-backingchain.conf.cmd
> @@ -26,8 +26,8 @@
>    -device 'virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3,free-page-reporting=on' \
>    -iscsi 'initiator-name=iqn.1993-08.org.debian:01:aabbccddeeff' \
>    -device 'lsi,id=scsihw0,bus=pci.0,addr=0x5' \
> -  -blockdev '{"detect-zeroes":"on","discard":"ignore","driver":"throttle","file":{"backing":{"backing":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"on","discard":"ignore","discard-no-unref":true,"driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"file","filename":"/var/lib/vzsnapext/images/8006/snap1-vol-vm-8006-disk-0.qcow2","node-name":"ea91a385a49a008a4735c0aec5c6749","read-only":false},"node-name":"fa91a385a49a008a4735c0aec5c6749","read-only":false},"cache":{"direct":true,"no-flush":false},"detect-zeroes":"on","discard":"ignore","discard-no-unref":true,"driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"file","filename":"/var/lib/vzsnapext/images/8006/snap2-vol-vm-8006-disk-0.qcow2","node-name":"ec0289317073959d450248d8cd7a480","read-only":false},"node-name":"fc0289317073959d450248d8cd7a480","read-only":
 fa
>  lse},"cache":{"direct":true,"no-flush":false},"detect-zeroes":"on","discard":"ignore","discard-no-unref":true,"driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"file","filename":"/var/lib/vzsnapext/vms/8006/vol-vm-8006-disk-0.qcow2","node-name":"e74f4959037afb46eddc7313c43dfdd","read-only":false},"node-name":"f74f4959037afb46eddc7313c43dfdd","read-only":false},"node-name":"drive-scsi0","read-only":false,"throttle-group":"throttle-drive-scsi0"}' \
> +  -blockdev '{"detect-zeroes":"on","discard":"ignore","driver":"throttle","file":{"backing":{"backing":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"on","discard":"ignore","discard-no-unref":true,"driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"file","filename":"/var/lib/vzsnapext/images/8006/snap1-vol-vm-8006-disk-0.qcow2","node-name":"ef5d7b9eae1d75adb56dcb60e1fdd03","read-only":false},"node-name":"ff5d7b9eae1d75adb56dcb60e1fdd03","read-only":false},"cache":{"direct":true,"no-flush":false},"detect-zeroes":"on","discard":"ignore","discard-no-unref":true,"driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"file","filename":"/var/lib/vzsnapext/images/8006/snap2-vol-vm-8006-disk-0.qcow2","node-name":"eba2bfa1a974d80a6d523e635c69040","read-only":false},"node-name":"fba2bfa1a974d80a6d523e635c69040","read-only":
 fa
>  lse},"cache":{"direct":true,"no-flush":false},"detect-zeroes":"on","discard":"ignore","discard-no-unref":true,"driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"file","filename":"/var/lib/vzsnapext/vms/8006/vol-vm-8006-disk-0.qcow2","node-name":"e5730fb46280035bfff1edc687c77df","read-only":false},"node-name":"f5730fb46280035bfff1edc687c77df","read-only":false},"node-name":"drive-scsi0","read-only":false,"throttle-group":"throttle-drive-scsi0"}' \
>    -device 'scsi-hd,bus=scsihw0.0,scsi-id=0,drive=drive-scsi0,id=scsi0,device_id=drive-scsi0,write-cache=on' \
> -  -blockdev '{"detect-zeroes":"on","discard":"ignore","driver":"throttle","file":{"backing":{"backing":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"qcow2","file":{"aio":"native","cache":{"direct":true,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"host_device","filename":"/dev/veegee/snap1-vol-vm-8006-disk-0.qcow2","node-name":"e25f58d3e6e11f2065ad41253988915","read-only":false},"node-name":"f25f58d3e6e11f2065ad41253988915","read-only":false},"cache":{"direct":true,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"qcow2","file":{"aio":"native","cache":{"direct":true,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"host_device","filename":"/dev/veegee/snap2-vol-vm-8006-disk-0.qcow2","node-name":"e9415bb5e484c1e25d25063b01686fe","read-only":false},"node-name":"f9415bb5e484c1e25d25063b01686fe","read-only":false},"cache":{"direct":true,"no-flush":false},"detect-zeroes":"on","discar
 d"
>  :"ignore","driver":"qcow2","file":{"aio":"native","cache":{"direct":true,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"host_device","filename":"/dev/veegee/vol-vm-8006-disk-0.qcow2","node-name":"e87358a470ca311f94d5cc61d1eb428","read-only":false},"node-name":"f87358a470ca311f94d5cc61d1eb428","read-only":false},"node-name":"drive-scsi1","read-only":false,"throttle-group":"throttle-drive-scsi1"}' \
> +  -blockdev '{"detect-zeroes":"on","discard":"ignore","driver":"throttle","file":{"backing":{"backing":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"qcow2","file":{"aio":"native","cache":{"direct":true,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"host_device","filename":"/dev/veegee/snap1-vol-vm-8006-disk-0.qcow2","node-name":"eaefc0da22b04b563abff988620896a","read-only":false},"node-name":"faefc0da22b04b563abff988620896a","read-only":false},"cache":{"direct":true,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"qcow2","file":{"aio":"native","cache":{"direct":true,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"host_device","filename":"/dev/veegee/snap2-vol-vm-8006-disk-0.qcow2","node-name":"e6c940d62d4176f395a90ab9a8d7c8b","read-only":false},"node-name":"f6c940d62d4176f395a90ab9a8d7c8b","read-only":false},"cache":{"direct":true,"no-flush":false},"detect-zeroes":"on","discar
 d"
>  :"ignore","driver":"qcow2","file":{"aio":"native","cache":{"direct":true,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"host_device","filename":"/dev/veegee/vol-vm-8006-disk-0.qcow2","node-name":"ebc18802d03c478647b8f0f02ab6531","read-only":false},"node-name":"fbc18802d03c478647b8f0f02ab6531","read-only":false},"node-name":"drive-scsi1","read-only":false,"throttle-group":"throttle-drive-scsi1"}' \
>    -device 'scsi-hd,bus=scsihw0.0,scsi-id=1,drive=drive-scsi1,id=scsi1,device_id=drive-scsi1,write-cache=on' \
>    -machine 'type=pc+pve0'
> diff --git a/src/test/cfg2cmd/simple-btrfs.conf.cmd b/src/test/cfg2cmd/simple-btrfs.conf.cmd
> index 12ddeead..d9af7997 100644
> --- a/src/test/cfg2cmd/simple-btrfs.conf.cmd
> +++ b/src/test/cfg2cmd/simple-btrfs.conf.cmd
> @@ -31,13 +31,13 @@
>    -iscsi 'initiator-name=iqn.1993-08.org.debian:01:aabbccddeeff' \
>    -device 'ide-cd,bus=ide.1,unit=0,id=ide2,bootindex=200' \
>    -device 'virtio-scsi-pci,id=scsihw0,bus=pci.0,addr=0x5' \
> -  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"io_uring","cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/butter/bread/vms/8006/vol-vm-8006-disk-0/disk.raw","node-name":"e99aff0ff797aa030a22e9f580076dd","read-only":false},"node-name":"f99aff0ff797aa030a22e9f580076dd","read-only":false},"node-name":"drive-scsi0","read-only":false,"throttle-group":"throttle-drive-scsi0"}' \
> +  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"io_uring","cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/butter/bread/vms/8006/vol-vm-8006-disk-0/disk.raw","node-name":"e0239e32a6bc9e59ed24fd6b0454b45","read-only":false},"node-name":"f0239e32a6bc9e59ed24fd6b0454b45","read-only":false},"node-name":"drive-scsi0","read-only":false,"throttle-group":"throttle-drive-scsi0"}' \
>    -device 'scsi-hd,bus=scsihw0.0,channel=0,scsi-id=0,lun=0,drive=drive-scsi0,id=scsi0,device_id=drive-scsi0,bootindex=100,write-cache=on' \
> -  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"io_uring","cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/butter/bread/vms/8006/vol-vm-8006-disk-0/disk.raw","node-name":"e7b2fd2a8c5dbfc550d9781e5df8841","read-only":false},"node-name":"f7b2fd2a8c5dbfc550d9781e5df8841","read-only":false},"node-name":"drive-scsi1","read-only":false,"throttle-group":"throttle-drive-scsi1"}' \
> +  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"io_uring","cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/butter/bread/vms/8006/vol-vm-8006-disk-0/disk.raw","node-name":"e0cb0b8632271512e5c7d94bb914ba9","read-only":false},"node-name":"f0cb0b8632271512e5c7d94bb914ba9","read-only":false},"node-name":"drive-scsi1","read-only":false,"throttle-group":"throttle-drive-scsi1"}' \
>    -device 'scsi-hd,bus=scsihw0.0,channel=0,scsi-id=0,lun=1,drive=drive-scsi1,id=scsi1,device_id=drive-scsi1,write-cache=on' \
> -  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"io_uring","cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/butter/bread/vms/8006/vol-vm-8006-disk-0/disk.raw","node-name":"ed78b07bb04c2cbd8aedc648e885569","read-only":false},"node-name":"fd78b07bb04c2cbd8aedc648e885569","read-only":false},"node-name":"drive-scsi2","read-only":false,"throttle-group":"throttle-drive-scsi2"}' \
> +  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"io_uring","cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/butter/bread/vms/8006/vol-vm-8006-disk-0/disk.raw","node-name":"eaee3317bd37f841a34c0bfe79621f1","read-only":false},"node-name":"faee3317bd37f841a34c0bfe79621f1","read-only":false},"node-name":"drive-scsi2","read-only":false,"throttle-group":"throttle-drive-scsi2"}' \
>    -device 'scsi-hd,bus=scsihw0.0,channel=0,scsi-id=0,lun=2,drive=drive-scsi2,id=scsi2,device_id=drive-scsi2,write-cache=off' \
> -  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/butter/bread/vms/8006/vol-vm-8006-disk-0/disk.raw","node-name":"e7487c01d831e2b51a5446980170ec9","read-only":false},"node-name":"f7487c01d831e2b51a5446980170ec9","read-only":false},"node-name":"drive-scsi3","read-only":false,"throttle-group":"throttle-drive-scsi3"}' \
> +  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/butter/bread/vms/8006/vol-vm-8006-disk-0/disk.raw","node-name":"e155197021a082240ff5de14d4c2c9a","read-only":false},"node-name":"f155197021a082240ff5de14d4c2c9a","read-only":false},"node-name":"drive-scsi3","read-only":false,"throttle-group":"throttle-drive-scsi3"}' \
>    -device 'scsi-hd,bus=scsihw0.0,channel=0,scsi-id=0,lun=3,drive=drive-scsi3,id=scsi3,device_id=drive-scsi3,write-cache=off' \
>    -netdev 'type=tap,id=net0,ifname=tap8006i0,script=/usr/libexec/qemu-server/pve-bridge,downscript=/usr/libexec/qemu-server/pve-bridgedown,vhost=on' \
>    -device 'virtio-net-pci,mac=A2:C0:43:77:08:A0,netdev=net0,bus=pci.0,addr=0x12,id=net0,rx_queue_size=1024,tx_queue_size=256,bootindex=300' \
> diff --git a/src/test/cfg2cmd/simple-cifs.conf.cmd b/src/test/cfg2cmd/simple-cifs.conf.cmd
> index a3b75065..2c21fdc7 100644
> --- a/src/test/cfg2cmd/simple-cifs.conf.cmd
> +++ b/src/test/cfg2cmd/simple-cifs.conf.cmd
> @@ -29,12 +29,12 @@
>    -iscsi 'initiator-name=iqn.1993-08.org.debian:01:aabbccddeeff' \
>    -device 'ide-cd,bus=ide.1,unit=0,id=ide2,bootindex=200' \
>    -device 'virtio-scsi-pci,id=scsihw0,bus=pci.0,addr=0x5' \
> -  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"native","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/mnt/pve/cifs-store/vms/8006/vol-vm-8006-disk-0.raw","node-name":"e2b3b8f2d6a23adc1aa3ecd195dbaf5","read-only":false},"node-name":"f2b3b8f2d6a23adc1aa3ecd195dbaf5","read-only":false},"node-name":"drive-scsi0","read-only":false,"throttle-group":"throttle-drive-scsi0"}' \
> +  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"native","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/mnt/pve/cifs-store/vms/8006/vol-vm-8006-disk-0.raw","node-name":"e8ea238e81499b0dd18f0e777f3921e","read-only":false},"node-name":"f8ea238e81499b0dd18f0e777f3921e","read-only":false},"node-name":"drive-scsi0","read-only":false,"throttle-group":"throttle-drive-scsi0"}' \
>    -device 'scsi-hd,bus=scsihw0.0,channel=0,scsi-id=0,lun=0,drive=drive-scsi0,id=scsi0,device_id=drive-scsi0,write-cache=on' \
> -  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"threads","cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/mnt/pve/cifs-store/vms/8006/vol-vm-8006-disk-0.raw","node-name":"ee4d9a961200a669c1a8182632aba3e","read-only":false},"node-name":"fe4d9a961200a669c1a8182632aba3e","read-only":false},"node-name":"drive-scsi1","read-only":false,"throttle-group":"throttle-drive-scsi1"}' \
> +  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"threads","cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/mnt/pve/cifs-store/vms/8006/vol-vm-8006-disk-0.raw","node-name":"ed5563ee262694e92d52e6db4151209","read-only":false},"node-name":"fd5563ee262694e92d52e6db4151209","read-only":false},"node-name":"drive-scsi1","read-only":false,"throttle-group":"throttle-drive-scsi1"}' \
>    -device 'scsi-hd,bus=scsihw0.0,channel=0,scsi-id=0,lun=1,drive=drive-scsi1,id=scsi1,device_id=drive-scsi1,write-cache=on' \
> -  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"threads","cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/mnt/pve/cifs-store/vms/8006/vol-vm-8006-disk-0.raw","node-name":"e6a3bf7eee1e2636cbe31f62b537b6c","read-only":false},"node-name":"f6a3bf7eee1e2636cbe31f62b537b6c","read-only":false},"node-name":"drive-scsi2","read-only":false,"throttle-group":"throttle-drive-scsi2"}' \
> +  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"threads","cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/mnt/pve/cifs-store/vms/8006/vol-vm-8006-disk-0.raw","node-name":"eee958fd64d8acc43d6ce2ee1b93987","read-only":false},"node-name":"fee958fd64d8acc43d6ce2ee1b93987","read-only":false},"node-name":"drive-scsi2","read-only":false,"throttle-group":"throttle-drive-scsi2"}' \
>    -device 'scsi-hd,bus=scsihw0.0,channel=0,scsi-id=0,lun=2,drive=drive-scsi2,id=scsi2,device_id=drive-scsi2,write-cache=off' \
> -  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"native","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/mnt/pve/cifs-store/vms/8006/vol-vm-8006-disk-0.raw","node-name":"e7042ee58e764b1296ad54014cb9a03","read-only":false},"node-name":"f7042ee58e764b1296ad54014cb9a03","read-only":false},"node-name":"drive-scsi3","read-only":false,"throttle-group":"throttle-drive-scsi3"}' \
> +  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"native","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/mnt/pve/cifs-store/vms/8006/vol-vm-8006-disk-0.raw","node-name":"ed770db6a0b0fb912808ab1de78c58d","read-only":false},"node-name":"fd770db6a0b0fb912808ab1de78c58d","read-only":false},"node-name":"drive-scsi3","read-only":false,"throttle-group":"throttle-drive-scsi3"}' \
>    -device 'scsi-hd,bus=scsihw0.0,channel=0,scsi-id=0,lun=3,drive=drive-scsi3,id=scsi3,device_id=drive-scsi3,write-cache=off' \
>    -machine 'type=pc+pve0'
> diff --git a/src/test/cfg2cmd/simple-lvm.conf.cmd b/src/test/cfg2cmd/simple-lvm.conf.cmd
> index 0ab09c87..0d38738a 100644
> --- a/src/test/cfg2cmd/simple-lvm.conf.cmd
> +++ b/src/test/cfg2cmd/simple-lvm.conf.cmd
> @@ -28,12 +28,12 @@
>    -device 'virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3,free-page-reporting=on' \
>    -iscsi 'initiator-name=iqn.1993-08.org.debian:01:aabbccddeeff' \
>    -device 'virtio-scsi-pci,id=scsihw0,bus=pci.0,addr=0x5' \
> -  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"native","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"host_device","filename":"/dev/veegee/vol-vm-8006-disk-0","node-name":"e0378a375d635b0f473569544c7c207","read-only":false},"node-name":"f0378a375d635b0f473569544c7c207","read-only":false},"node-name":"drive-scsi0","read-only":false,"throttle-group":"throttle-drive-scsi0"}' \
> +  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"native","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"host_device","filename":"/dev/veegee/vol-vm-8006-disk-0","node-name":"ea2788c1d4a95b47a772c061c8c40fa","read-only":false},"node-name":"fa2788c1d4a95b47a772c061c8c40fa","read-only":false},"node-name":"drive-scsi0","read-only":false,"throttle-group":"throttle-drive-scsi0"}' \
>    -device 'scsi-hd,bus=scsihw0.0,channel=0,scsi-id=0,lun=0,drive=drive-scsi0,id=scsi0,device_id=drive-scsi0,bootindex=100,write-cache=on' \
> -  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"threads","cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"host_device","filename":"/dev/veegee/vol-vm-8006-disk-0","node-name":"e2fbae024c8a771f708f4a5391211b0","read-only":false},"node-name":"f2fbae024c8a771f708f4a5391211b0","read-only":false},"node-name":"drive-scsi1","read-only":false,"throttle-group":"throttle-drive-scsi1"}' \
> +  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"threads","cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"host_device","filename":"/dev/veegee/vol-vm-8006-disk-0","node-name":"ee1d7a20f694b544e5c06a4d2826d07","read-only":false},"node-name":"fe1d7a20f694b544e5c06a4d2826d07","read-only":false},"node-name":"drive-scsi1","read-only":false,"throttle-group":"throttle-drive-scsi1"}' \
>    -device 'scsi-hd,bus=scsihw0.0,channel=0,scsi-id=0,lun=1,drive=drive-scsi1,id=scsi1,device_id=drive-scsi1,write-cache=on' \
> -  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"threads","cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"host_device","filename":"/dev/veegee/vol-vm-8006-disk-0","node-name":"e4328c26b141e3efe1564cb60bf1155","read-only":false},"node-name":"f4328c26b141e3efe1564cb60bf1155","read-only":false},"node-name":"drive-scsi2","read-only":false,"throttle-group":"throttle-drive-scsi2"}' \
> +  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"threads","cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"host_device","filename":"/dev/veegee/vol-vm-8006-disk-0","node-name":"e00b120cbcd9ff17322890eebbd9218","read-only":false},"node-name":"f00b120cbcd9ff17322890eebbd9218","read-only":false},"node-name":"drive-scsi2","read-only":false,"throttle-group":"throttle-drive-scsi2"}' \
>    -device 'scsi-hd,bus=scsihw0.0,channel=0,scsi-id=0,lun=2,drive=drive-scsi2,id=scsi2,device_id=drive-scsi2,write-cache=off' \
> -  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"native","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"host_device","filename":"/dev/veegee/vol-vm-8006-disk-0","node-name":"e68e10f8128f05fe5f7e85cc1f9922b","read-only":false},"node-name":"f68e10f8128f05fe5f7e85cc1f9922b","read-only":false},"node-name":"drive-scsi3","read-only":false,"throttle-group":"throttle-drive-scsi3"}' \
> +  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"native","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"host_device","filename":"/dev/veegee/vol-vm-8006-disk-0","node-name":"e0dfc626540419d40b3cc4f89ad4cde","read-only":false},"node-name":"f0dfc626540419d40b3cc4f89ad4cde","read-only":false},"node-name":"drive-scsi3","read-only":false,"throttle-group":"throttle-drive-scsi3"}' \
>    -device 'scsi-hd,bus=scsihw0.0,channel=0,scsi-id=0,lun=3,drive=drive-scsi3,id=scsi3,device_id=drive-scsi3,write-cache=off' \
>    -machine 'type=pc+pve0'
> diff --git a/src/test/cfg2cmd/simple-lvmthin.conf.cmd b/src/test/cfg2cmd/simple-lvmthin.conf.cmd
> index c4dc173d..a7cf1c13 100644
> --- a/src/test/cfg2cmd/simple-lvmthin.conf.cmd
> +++ b/src/test/cfg2cmd/simple-lvmthin.conf.cmd
> @@ -28,12 +28,12 @@
>    -device 'virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3,free-page-reporting=on' \
>    -iscsi 'initiator-name=iqn.1993-08.org.debian:01:aabbccddeeff' \
>    -device 'virtio-scsi-pci,id=scsihw0,bus=pci.0,addr=0x5' \
> -  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"host_device","filename":"/dev/pve/vol-vm-8006-disk-0","node-name":"e6d87b01b7bb888b8426534a542ff1c","read-only":false},"node-name":"f6d87b01b7bb888b8426534a542ff1c","read-only":false},"node-name":"drive-scsi0","read-only":false,"throttle-group":"throttle-drive-scsi0"}' \
> +  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"host_device","filename":"/dev/pve/vol-vm-8006-disk-0","node-name":"e72966e642e5281429a4e4c1d265263","read-only":false},"node-name":"f72966e642e5281429a4e4c1d265263","read-only":false},"node-name":"drive-scsi0","read-only":false,"throttle-group":"throttle-drive-scsi0"}' \
>    -device 'scsi-hd,bus=scsihw0.0,channel=0,scsi-id=0,lun=0,drive=drive-scsi0,id=scsi0,device_id=drive-scsi0,bootindex=100,write-cache=on' \
> -  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"io_uring","cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"host_device","filename":"/dev/pve/vol-vm-8006-disk-0","node-name":"e96d9ece81aa4271aa2d8485184f66b","read-only":false},"node-name":"f96d9ece81aa4271aa2d8485184f66b","read-only":false},"node-name":"drive-scsi1","read-only":false,"throttle-group":"throttle-drive-scsi1"}' \
> +  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"io_uring","cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"host_device","filename":"/dev/pve/vol-vm-8006-disk-0","node-name":"e5354d4dc5e32f04e48f99a6b4a0762","read-only":false},"node-name":"f5354d4dc5e32f04e48f99a6b4a0762","read-only":false},"node-name":"drive-scsi1","read-only":false,"throttle-group":"throttle-drive-scsi1"}' \
>    -device 'scsi-hd,bus=scsihw0.0,channel=0,scsi-id=0,lun=1,drive=drive-scsi1,id=scsi1,device_id=drive-scsi1,write-cache=on' \
> -  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"io_uring","cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"host_device","filename":"/dev/pve/vol-vm-8006-disk-0","node-name":"e0b89788ef97beda10a850ab45897d9","read-only":false},"node-name":"f0b89788ef97beda10a850ab45897d9","read-only":false},"node-name":"drive-scsi2","read-only":false,"throttle-group":"throttle-drive-scsi2"}' \
> +  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"io_uring","cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"host_device","filename":"/dev/pve/vol-vm-8006-disk-0","node-name":"e35f8ce63c4e72d4a368aefe52297c8","read-only":false},"node-name":"f35f8ce63c4e72d4a368aefe52297c8","read-only":false},"node-name":"drive-scsi2","read-only":false,"throttle-group":"throttle-drive-scsi2"}' \
>    -device 'scsi-hd,bus=scsihw0.0,channel=0,scsi-id=0,lun=2,drive=drive-scsi2,id=scsi2,device_id=drive-scsi2,write-cache=off' \
> -  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"host_device","filename":"/dev/pve/vol-vm-8006-disk-0","node-name":"ea7b6871af66ca3e13e95bd74570aa2","read-only":false},"node-name":"fa7b6871af66ca3e13e95bd74570aa2","read-only":false},"node-name":"drive-scsi3","read-only":false,"throttle-group":"throttle-drive-scsi3"}' \
> +  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"host_device","filename":"/dev/pve/vol-vm-8006-disk-0","node-name":"eb54faa199461f707458c4b22f7502f","read-only":false},"node-name":"fb54faa199461f707458c4b22f7502f","read-only":false},"node-name":"drive-scsi3","read-only":false,"throttle-group":"throttle-drive-scsi3"}' \
>    -device 'scsi-hd,bus=scsihw0.0,channel=0,scsi-id=0,lun=3,drive=drive-scsi3,id=scsi3,device_id=drive-scsi3,write-cache=off' \
>    -machine 'type=pc+pve0'
> diff --git a/src/test/cfg2cmd/simple-rbd.conf.cmd b/src/test/cfg2cmd/simple-rbd.conf.cmd
> index 2bcb9287..b4d12b34 100644
> --- a/src/test/cfg2cmd/simple-rbd.conf.cmd
> +++ b/src/test/cfg2cmd/simple-rbd.conf.cmd
> @@ -35,21 +35,21 @@
>    -iscsi 'initiator-name=iqn.1993-08.org.debian:01:aabbccddeeff' \
>    -device 'ide-cd,bus=ide.1,unit=0,id=ide2,bootindex=200' \
>    -device 'virtio-scsi-pci,id=scsihw0,bus=pci.0,addr=0x5' \
> -  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"auth-client-required":["none"],"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"rbd","image":"vol-vm-8006-disk-0","node-name":"e8e1af6f55c6a2466f178045aa79710","pool":"cpool","read-only":false,"server":[{"host":"127.0.0.42","port":"3300"},{"host":"127.0.0.21","port":"3300"},{"host":"::1","port":"3300"}]},"node-name":"f8e1af6f55c6a2466f178045aa79710","read-only":false},"node-name":"drive-scsi0","read-only":false,"throttle-group":"throttle-drive-scsi0"}' \
> +  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"auth-client-required":["none"],"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"rbd","image":"vol-vm-8006-disk-0","node-name":"ed3642e965bec041bb629397dc544f1","pool":"cpool","read-only":false,"server":[{"host":"127.0.0.42","port":"3300"},{"host":"127.0.0.21","port":"3300"},{"host":"::1","port":"3300"}]},"node-name":"fd3642e965bec041bb629397dc544f1","read-only":false},"node-name":"drive-scsi0","read-only":false,"throttle-group":"throttle-drive-scsi0"}' \
>    -device 'scsi-hd,bus=scsihw0.0,channel=0,scsi-id=0,lun=0,drive=drive-scsi0,id=scsi0,device_id=drive-scsi0,bootindex=100,write-cache=on' \
> -  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"auth-client-required":["none"],"cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"rbd","image":"vol-vm-8006-disk-0","node-name":"e3990bba2ed1f48c5bb23e9f37b4cec","pool":"cpool","read-only":false,"server":[{"host":"127.0.0.42","port":"3300"},{"host":"127.0.0.21","port":"3300"},{"host":"::1","port":"3300"}]},"node-name":"f3990bba2ed1f48c5bb23e9f37b4cec","read-only":false},"node-name":"drive-scsi1","read-only":false,"throttle-group":"throttle-drive-scsi1"}' \
> +  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"auth-client-required":["none"],"cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"rbd","image":"vol-vm-8006-disk-0","node-name":"e713219342b3e0061adc07ab00b3b9e","pool":"cpool","read-only":false,"server":[{"host":"127.0.0.42","port":"3300"},{"host":"127.0.0.21","port":"3300"},{"host":"::1","port":"3300"}]},"node-name":"f713219342b3e0061adc07ab00b3b9e","read-only":false},"node-name":"drive-scsi1","read-only":false,"throttle-group":"throttle-drive-scsi1"}' \
>    -device 'scsi-hd,bus=scsihw0.0,channel=0,scsi-id=0,lun=1,drive=drive-scsi1,id=scsi1,device_id=drive-scsi1,write-cache=on' \
> -  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"auth-client-required":["none"],"cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"rbd","image":"vol-vm-8006-disk-0","node-name":"e3beccc2a8f2eacb8b5df8055a7d093","pool":"cpool","read-only":false,"server":[{"host":"127.0.0.42","port":"3300"},{"host":"127.0.0.21","port":"3300"},{"host":"::1","port":"3300"}]},"node-name":"f3beccc2a8f2eacb8b5df8055a7d093","read-only":false},"node-name":"drive-scsi2","read-only":false,"throttle-group":"throttle-drive-scsi2"}' \
> +  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"auth-client-required":["none"],"cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"rbd","image":"vol-vm-8006-disk-0","node-name":"e5c0bd70b70fed198ec24ad4cabf055","pool":"cpool","read-only":false,"server":[{"host":"127.0.0.42","port":"3300"},{"host":"127.0.0.21","port":"3300"},{"host":"::1","port":"3300"}]},"node-name":"f5c0bd70b70fed198ec24ad4cabf055","read-only":false},"node-name":"drive-scsi2","read-only":false,"throttle-group":"throttle-drive-scsi2"}' \
>    -device 'scsi-hd,bus=scsihw0.0,channel=0,scsi-id=0,lun=2,drive=drive-scsi2,id=scsi2,device_id=drive-scsi2,write-cache=off' \
> -  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"auth-client-required":["none"],"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"rbd","image":"vol-vm-8006-disk-0","node-name":"eef923d5dfcee93fbc712b03f9f21af","pool":"cpool","read-only":false,"server":[{"host":"127.0.0.42","port":"3300"},{"host":"127.0.0.21","port":"3300"},{"host":"::1","port":"3300"}]},"node-name":"fef923d5dfcee93fbc712b03f9f21af","read-only":false},"node-name":"drive-scsi3","read-only":false,"throttle-group":"throttle-drive-scsi3"}' \
> +  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"auth-client-required":["none"],"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"rbd","image":"vol-vm-8006-disk-0","node-name":"e570729e8cc07c9b174dc825f6640a9","pool":"cpool","read-only":false,"server":[{"host":"127.0.0.42","port":"3300"},{"host":"127.0.0.21","port":"3300"},{"host":"::1","port":"3300"}]},"node-name":"f570729e8cc07c9b174dc825f6640a9","read-only":false},"node-name":"drive-scsi3","read-only":false,"throttle-group":"throttle-drive-scsi3"}' \
>    -device 'scsi-hd,bus=scsihw0.0,channel=0,scsi-id=0,lun=3,drive=drive-scsi3,id=scsi3,device_id=drive-scsi3,write-cache=off' \
> -  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"host_device","filename":"/dev/rbd-pve/fc4181a6-56eb-4f68-b452-8ba1f381ca2a/cpool/vol-vm-8006-disk-0","node-name":"eb2c7a292f03b9f6d015cf83ae79730","read-only":false},"node-name":"fb2c7a292f03b9f6d015cf83ae79730","read-only":false},"node-name":"drive-scsi4","read-only":false,"throttle-group":"throttle-drive-scsi4"}' \
> +  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"host_device","filename":"/dev/rbd-pve/fc4181a6-56eb-4f68-b452-8ba1f381ca2a/cpool/vol-vm-8006-disk-0","node-name":"e8562e5bc39a73ea44b67b78236252c","read-only":false},"node-name":"f8562e5bc39a73ea44b67b78236252c","read-only":false},"node-name":"drive-scsi4","read-only":false,"throttle-group":"throttle-drive-scsi4"}' \
>    -device 'scsi-hd,bus=scsihw0.0,channel=0,scsi-id=0,lun=4,drive=drive-scsi4,id=scsi4,device_id=drive-scsi4,write-cache=on' \
> -  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"threads","cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"host_device","filename":"/dev/rbd-pve/fc4181a6-56eb-4f68-b452-8ba1f381ca2a/cpool/vol-vm-8006-disk-0","node-name":"e5258ec75558b1f102af1e20e677fd0","read-only":false},"node-name":"f5258ec75558b1f102af1e20e677fd0","read-only":false},"node-name":"drive-scsi5","read-only":false,"throttle-group":"throttle-drive-scsi5"}' \
> +  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"threads","cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"host_device","filename":"/dev/rbd-pve/fc4181a6-56eb-4f68-b452-8ba1f381ca2a/cpool/vol-vm-8006-disk-0","node-name":"ec5063ff68953608838c864898e4e4c","read-only":false},"node-name":"fc5063ff68953608838c864898e4e4c","read-only":false},"node-name":"drive-scsi5","read-only":false,"throttle-group":"throttle-drive-scsi5"}' \
>    -device 'scsi-hd,bus=scsihw0.0,channel=0,scsi-id=0,lun=5,drive=drive-scsi5,id=scsi5,device_id=drive-scsi5,write-cache=on' \
> -  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"threads","cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"host_device","filename":"/dev/rbd-pve/fc4181a6-56eb-4f68-b452-8ba1f381ca2a/cpool/vol-vm-8006-disk-0","node-name":"edb33cdcea8ec3e2225509c4945227e","read-only":false},"node-name":"fdb33cdcea8ec3e2225509c4945227e","read-only":false},"node-name":"drive-scsi6","read-only":false,"throttle-group":"throttle-drive-scsi6"}' \
> +  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"threads","cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"host_device","filename":"/dev/rbd-pve/fc4181a6-56eb-4f68-b452-8ba1f381ca2a/cpool/vol-vm-8006-disk-0","node-name":"e6d1f6305834049bc1a1798ea3a0876","read-only":false},"node-name":"f6d1f6305834049bc1a1798ea3a0876","read-only":false},"node-name":"drive-scsi6","read-only":false,"throttle-group":"throttle-drive-scsi6"}' \
>    -device 'scsi-hd,bus=scsihw0.0,channel=0,scsi-id=0,lun=6,drive=drive-scsi6,id=scsi6,device_id=drive-scsi6,write-cache=off' \
> -  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"host_device","filename":"/dev/rbd-pve/fc4181a6-56eb-4f68-b452-8ba1f381ca2a/cpool/vol-vm-8006-disk-0","node-name":"eb0b017124a47505c97a5da052e0141","read-only":false},"node-name":"fb0b017124a47505c97a5da052e0141","read-only":false},"node-name":"drive-scsi7","read-only":false,"throttle-group":"throttle-drive-scsi7"}' \
> +  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"host_device","filename":"/dev/rbd-pve/fc4181a6-56eb-4f68-b452-8ba1f381ca2a/cpool/vol-vm-8006-disk-0","node-name":"e04c00f1eee69b1e3f4dae76ee71dc1","read-only":false},"node-name":"f04c00f1eee69b1e3f4dae76ee71dc1","read-only":false},"node-name":"drive-scsi7","read-only":false,"throttle-group":"throttle-drive-scsi7"}' \
>    -device 'scsi-hd,bus=scsihw0.0,channel=0,scsi-id=0,lun=7,drive=drive-scsi7,id=scsi7,device_id=drive-scsi7,write-cache=off' \
>    -netdev 'type=tap,id=net0,ifname=tap8006i0,script=/usr/libexec/qemu-server/pve-bridge,downscript=/usr/libexec/qemu-server/pve-bridgedown,vhost=on' \
>    -device 'virtio-net-pci,mac=A2:C0:43:77:08:A0,netdev=net0,bus=pci.0,addr=0x12,id=net0,rx_queue_size=1024,tx_queue_size=256,bootindex=300' \
> diff --git a/src/test/cfg2cmd/simple-virtio-blk.conf.cmd b/src/test/cfg2cmd/simple-virtio-blk.conf.cmd
> index 6eae2c1b..62f37801 100644
> --- a/src/test/cfg2cmd/simple-virtio-blk.conf.cmd
> +++ b/src/test/cfg2cmd/simple-virtio-blk.conf.cmd
> @@ -28,7 +28,7 @@
>    -device 'virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3,free-page-reporting=on' \
>    -iscsi 'initiator-name=iqn.1993-08.org.debian:01:aabbccddeeff' \
>    -device 'ide-cd,bus=ide.1,unit=0,id=ide2,bootindex=200' \
> -  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/var/lib/vz/vms/8006/vol-vm-8006-disk-0.qcow2","node-name":"edd19f6c1b3a6d5a6248c3376a91a16","read-only":false},"node-name":"fdd19f6c1b3a6d5a6248c3376a91a16","read-only":false},"node-name":"drive-virtio0","read-only":false,"throttle-group":"throttle-drive-virtio0"}' \
> +  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/var/lib/vz/vms/8006/vol-vm-8006-disk-0.qcow2","node-name":"ee6988c85939a5b45caf39810880e8d","read-only":false},"node-name":"fe6988c85939a5b45caf39810880e8d","read-only":false},"node-name":"drive-virtio0","read-only":false,"throttle-group":"throttle-drive-virtio0"}' \
>    -device 'virtio-blk-pci,drive=drive-virtio0,id=virtio0,bus=pci.0,addr=0xa,iothread=iothread-virtio0,bootindex=100,write-cache=on' \
>    -netdev 'type=tap,id=net0,ifname=tap8006i0,script=/usr/libexec/qemu-server/pve-bridge,downscript=/usr/libexec/qemu-server/pve-bridgedown,vhost=on' \
>    -device 'virtio-net-pci,mac=A2:C0:43:77:08:A0,netdev=net0,bus=pci.0,addr=0x12,id=net0,rx_queue_size=1024,tx_queue_size=256,bootindex=300' \
> diff --git a/src/test/cfg2cmd/simple-zfs-over-iscsi.conf.cmd b/src/test/cfg2cmd/simple-zfs-over-iscsi.conf.cmd
> index 4fa6a5a9..6f6b4bd3 100644
> --- a/src/test/cfg2cmd/simple-zfs-over-iscsi.conf.cmd
> +++ b/src/test/cfg2cmd/simple-zfs-over-iscsi.conf.cmd
> @@ -31,13 +31,13 @@
>    -iscsi 'initiator-name=iqn.1993-08.org.debian:01:aabbccddeeff' \
>    -device 'ide-cd,bus=ide.1,unit=0,id=ide2,bootindex=200' \
>    -device 'virtio-scsi-pci,id=scsihw0,bus=pci.0,addr=0x5' \
> -  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"iscsi","lun":0,"node-name":"e7106ac43d4f125a1911487dd9e3e42","portal":"127.0.0.1","read-only":false,"target":"iqn.2019-10.org.test:foobar","transport":"tcp"},"node-name":"f7106ac43d4f125a1911487dd9e3e42","read-only":false},"node-name":"drive-scsi0","read-only":false,"throttle-group":"throttle-drive-scsi0"}' \
> +  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"iscsi","lun":0,"node-name":"e2a251fa583452d3d74690197487c92","portal":"127.0.0.1","read-only":false,"target":"iqn.2019-10.org.test:foobar","transport":"tcp"},"node-name":"f2a251fa583452d3d74690197487c92","read-only":false},"node-name":"drive-scsi0","read-only":false,"throttle-group":"throttle-drive-scsi0"}' \
>    -device 'scsi-hd,bus=scsihw0.0,channel=0,scsi-id=0,lun=0,drive=drive-scsi0,id=scsi0,device_id=drive-scsi0,bootindex=100,write-cache=on' \
> -  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"iscsi","lun":0,"node-name":"efdb73e0d0acc5a60e3ff438cb20113","portal":"127.0.0.1","read-only":false,"target":"iqn.2019-10.org.test:foobar","transport":"tcp"},"node-name":"ffdb73e0d0acc5a60e3ff438cb20113","read-only":false},"node-name":"drive-scsi1","read-only":false,"throttle-group":"throttle-drive-scsi1"}' \
> +  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"iscsi","lun":0,"node-name":"e11b9f185d5cc1a4ff6b6f17e70db53","portal":"127.0.0.1","read-only":false,"target":"iqn.2019-10.org.test:foobar","transport":"tcp"},"node-name":"f11b9f185d5cc1a4ff6b6f17e70db53","read-only":false},"node-name":"drive-scsi1","read-only":false,"throttle-group":"throttle-drive-scsi1"}' \
>    -device 'scsi-hd,bus=scsihw0.0,channel=0,scsi-id=0,lun=1,drive=drive-scsi1,id=scsi1,device_id=drive-scsi1,write-cache=on' \
> -  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"iscsi","lun":0,"node-name":"eab527a81b458aa9603dca5e2505f6e","portal":"127.0.0.1","read-only":false,"target":"iqn.2019-10.org.test:foobar","transport":"tcp"},"node-name":"fab527a81b458aa9603dca5e2505f6e","read-only":false},"node-name":"drive-scsi2","read-only":false,"throttle-group":"throttle-drive-scsi2"}' \
> +  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"iscsi","lun":0,"node-name":"e89631b9d318c36c543e6369996cac6","portal":"127.0.0.1","read-only":false,"target":"iqn.2019-10.org.test:foobar","transport":"tcp"},"node-name":"f89631b9d318c36c543e6369996cac6","read-only":false},"node-name":"drive-scsi2","read-only":false,"throttle-group":"throttle-drive-scsi2"}' \
>    -device 'scsi-hd,bus=scsihw0.0,channel=0,scsi-id=0,lun=2,drive=drive-scsi2,id=scsi2,device_id=drive-scsi2,write-cache=off' \
> -  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"iscsi","lun":0,"node-name":"e915a332310039f7a3feed6901eb5da","portal":"127.0.0.1","read-only":false,"target":"iqn.2019-10.org.test:foobar","transport":"tcp"},"node-name":"f915a332310039f7a3feed6901eb5da","read-only":false},"node-name":"drive-scsi3","read-only":false,"throttle-group":"throttle-drive-scsi3"}' \
> +  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"raw","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"iscsi","lun":0,"node-name":"e5aada8a1e0226a55200927381977c2","portal":"127.0.0.1","read-only":false,"target":"iqn.2019-10.org.test:foobar","transport":"tcp"},"node-name":"f5aada8a1e0226a55200927381977c2","read-only":false},"node-name":"drive-scsi3","read-only":false,"throttle-group":"throttle-drive-scsi3"}' \
>    -device 'scsi-hd,bus=scsihw0.0,channel=0,scsi-id=0,lun=3,drive=drive-scsi3,id=scsi3,device_id=drive-scsi3,write-cache=off' \
>    -netdev 'type=tap,id=net0,ifname=tap8006i0,script=/usr/libexec/qemu-server/pve-bridge,downscript=/usr/libexec/qemu-server/pve-bridgedown,vhost=on' \
>    -device 'virtio-net-pci,mac=A2:C0:43:77:08:A0,netdev=net0,bus=pci.0,addr=0x12,id=net0,rx_queue_size=1024,tx_queue_size=256,bootindex=300' \
> diff --git a/src/test/cfg2cmd/simple1.conf.cmd b/src/test/cfg2cmd/simple1.conf.cmd
> index c17d3262..de8e61a7 100644
> --- a/src/test/cfg2cmd/simple1.conf.cmd
> +++ b/src/test/cfg2cmd/simple1.conf.cmd
> @@ -28,7 +28,7 @@
>    -iscsi 'initiator-name=iqn.1993-08.org.debian:01:aabbccddeeff' \
>    -device 'ide-cd,bus=ide.1,unit=0,id=ide2,bootindex=200' \
>    -device 'virtio-scsi-pci,id=scsihw0,bus=pci.0,addr=0x5' \
> -  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/var/lib/vz/vms/8006/vol-vm-8006-disk-0.qcow2","node-name":"ecd04be4259153b8293415fefa2a84c","read-only":false},"node-name":"fcd04be4259153b8293415fefa2a84c","read-only":false},"node-name":"drive-scsi0","read-only":false,"throttle-group":"throttle-drive-scsi0"}' \
> +  -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/var/lib/vz/vms/8006/vol-vm-8006-disk-0.qcow2","node-name":"ed3a7e1debf641484f3aa78b2657af1","read-only":false},"node-name":"fd3a7e1debf641484f3aa78b2657af1","read-only":false},"node-name":"drive-scsi0","read-only":false,"throttle-group":"throttle-drive-scsi0"}' \
>    -device 'scsi-hd,bus=scsihw0.0,channel=0,scsi-id=0,lun=0,drive=drive-scsi0,id=scsi0,device_id=drive-scsi0,bootindex=100,write-cache=on' \
>    -netdev 'type=tap,id=net0,ifname=tap8006i0,script=/usr/libexec/qemu-server/pve-bridge,downscript=/usr/libexec/qemu-server/pve-bridgedown,vhost=on' \
>    -device 'virtio-net-pci,mac=A2:C0:43:77:08:A0,netdev=net0,bus=pci.0,addr=0x12,id=net0,rx_queue_size=1024,tx_queue_size=256,bootindex=300' \



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] 74+ messages in thread

* Re: [pve-devel] [PATCH storage 06/26] common: use v5.36
  2025-07-29 13:59   ` Fiona Ebner
@ 2025-07-29 14:42     ` Thomas Lamprecht
  0 siblings, 0 replies; 74+ messages in thread
From: Thomas Lamprecht @ 2025-07-29 14:42 UTC (permalink / raw)
  To: Proxmox VE development discussion, Fiona Ebner, Wolfgang Bumiller

Am 29.07.25 um 15:59 schrieb Fiona Ebner:
>> diff --git a/src/PVE/Storage/Common.pm b/src/PVE/Storage/Common.pm
>> index 746a262..222dc76 100644
>> --- a/src/PVE/Storage/Common.pm
>> +++ b/src/PVE/Storage/Common.pm
>> @@ -1,7 +1,6 @@
>>  package PVE::Storage::Common;
>>  
>> -use strict;
>> -use warnings;
>> +use v5.36;
>>  
>>  use PVE::JSONSchema;
>>  use PVE::Syscall;
> Do you need a specific feature from v5.36? Would be great to have some
> context. And should we go for v5.40, since that's what we have in
> Trixie? Or are there any reservations about specific language changes?
> 

Yes, this should have been stated in the commit message, but effectively:
5.36 allows us to use signatures (and makes enabling warnings/strict obsolete,
so one line less in total) while ensuring we can backport anything to
PVE 8 without having to adapt patches, as it cannot use v5.40.

That's a big reason behind the best practice of only raising lower limits
as high as really necessary for something to be usable.

Having real signatures available, inclusive support for default values,
is definitively worth it, and as PVE 7 is EOL since over a year we can
rather safely use v5.36.


_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] 74+ messages in thread

* [pve-devel] partially-applied: [RFC storage 00/26+10+3] unify vtype and content-type and
  2025-07-29 11:15 [pve-devel] [RFC storage 00/26+10+3] unify vtype and content-type and Wolfgang Bumiller
                   ` (38 preceding siblings ...)
  2025-07-29 11:15 ` [pve-devel] [PATCH qemu-server 10/10] tests: regenerate cfg2cmd files Wolfgang Bumiller
@ 2025-07-29 15:34 ` Fiona Ebner
  39 siblings, 0 replies; 74+ messages in thread
From: Fiona Ebner @ 2025-07-29 15:34 UTC (permalink / raw)
  To: Proxmox VE development discussion, Wolfgang Bumiller

Thanks! Applied the following patches to start out, ordering 05/26 first
with a slight fix-up to avoid breaking tests:

[pve-devel] [PATCH storage 01/26] btrfs: remove unnecessary mkpath call
[pve-devel] [PATCH storage 02/26] parse_volname: remove openvz 'rootdir'
case
[pve-devel] [PATCH storage 03/26] drop rootdir case in path_to_volume_id
[pve-devel] [PATCH storage 04/26] escape dirs in path_to_volume_id regexes
[pve-devel] [PATCH storage 05/26] tests: drop rootdir/ tests
[pve-devel] [PATCH storage 06/26] common: use v5.36


_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] 74+ messages in thread

* Re: [pve-devel] [PATCH storage 25/26] update tests
  2025-07-29 11:15 ` [pve-devel] [PATCH storage 25/26] update tests Wolfgang Bumiller
@ 2025-07-29 16:33   ` Max R. Carrara
  0 siblings, 0 replies; 74+ messages in thread
From: Max R. Carrara @ 2025-07-29 16:33 UTC (permalink / raw)
  To: Proxmox VE development discussion

On Tue Jul 29, 2025 at 1:15 PM CEST, Wolfgang Bumiller wrote:
> Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
> ---

There are a couple tests for LVM and ZFS that seem to fail; relevant
logs are below.

I've also added some comments inline further below where possible.

==========

./run_test_zfspoolplugin.pl
  pool: test-pool
 state: ONLINE
status: Some supported and requested features are not enabled on the pool.
        The pool can still be used, but some features are unavailable.
action: Enable all features using 'zpool upgrade'. Once this is done,
        the pool may no longer be accessible by software that does not support
        the features. See zpool-features(7) for details.
config:

        NAME                                      STATE     READ WRITE CKSUM
        test-pool                                 ONLINE       0     0     0
          mirror-0                                ONLINE       0     0     0
            scsi-0QEMU_QEMU_HARDDISK_drive-scsi1  ONLINE       0     0     0
            scsi-0QEMU_QEMU_HARDDISK_drive-scsi2  ONLINE       0     0     0

errors: No known data errors
Start tests for ZFSPoolPlugin

run test1 "volume_size_info"

run test2 "volume_resize"

run test3 "volume_has_feature"

run test4 "volume_snapshot"

run test5 "volume_snapshot_delete"
######Ignore Output if no Test5 g: is included######
cannot destroy 'regressiontest/base-100-disk-1@__base__': snapshot has dependent clones
use '-R' to destroy the following datasets:
######End Ignore#######

run test6 "volume_rollback_is_possible"

run test7 "volume_rollback"

run test8 "parse_volname"
Test8 a: parsing wrong at ./run_test_zfspoolplugin.pl line 1044.
Test8 b: parsing wrong at ./run_test_zfspoolplugin.pl line 1067.
Test8 c: parsing wrong at ./run_test_zfspoolplugin.pl line 1089.
Test8 d: parsing wrong at ./run_test_zfspoolplugin.pl line 1111.
Test8 e: parsing wrong at ./run_test_zfspoolplugin.pl line 1133.
Test8 f: parsing wrong at ./run_test_zfspoolplugin.pl line 1155.

run test9 "parse_volume_id"

run test10 "volume_is_base"
Use of uninitialized value in numeric eq (==) at ./run_test_zfspoolplugin.pl line 863.
Argument "base" isn't numeric in numeric eq (==) at ./run_test_zfspoolplugin.pl line 875.
Test10 b: is base at ./run_test_zfspoolplugin.pl line 877.
Use of uninitialized value in numeric eq (==) at ./run_test_zfspoolplugin.pl line 887.
Use of uninitialized value in numeric eq (==) at ./run_test_zfspoolplugin.pl line 899.
Argument "basevol" isn't numeric in numeric eq (==) at ./run_test_zfspoolplugin.pl line 911.
Test10 e: is base at ./run_test_zfspoolplugin.pl line 913.
Use of uninitialized value in numeric eq (==) at ./run_test_zfspoolplugin.pl line 923.

run test11 "volume_is_base"
Test11 b at ./run_test_zfspoolplugin.pl line 795.
cannot open 'regressiontest/vm-110-disk-0': dataset does not exist
Test11 b: command 'zfs list -H -o volsize regressiontest/vm-110-disk-0' failed: exit code 1
Test11 e at ./run_test_zfspoolplugin.pl line 831.
cannot open 'regressiontest/subvol-210-disk-0': dataset does not exist
Test11 e: command 'zfs list -H -o refquota regressiontest/subvol-210-disk-0' failed: exit code 1

run test12 "vdisk_create_base"

run test13 "vdisk_alloc"
Test13 a: vdisk_alloc without vtype not allowed anymore
Test13 b: volname:zfstank99:vol-vm-112-disk-0 don't match
Test13 c: vdisk_alloc without vtype not allowed anymore
Test13 d: volname:zfstank99:subvol-ct-113-disk-0  don't match

run test14 "vdisk_free"

run test15 "template_list and vdisk_list"
Test 15 d failed
Test 15 g failed
Test 15 h failed
Test 15 i failed

run test16 "activate_storage"

run test17 "deactivate_storage"

run test18 "scan_zfs"

run test19 "path"
Test 19 a: owner is not correct: expected 'images'  get 'vm-vol' at ./run_test_zfspoolplugin.pl line 77.
Test 19 b: owner is not correct: expected 'images'  get 'vm-vol' at ./run_test_zfspoolplugin.pl line 107.
Test 19 c: owner is not correct: expected 'images'  get 'vm-vol' at ./run_test_zfspoolplugin.pl line 137.
Test 19 d: owner is not correct: expected 'images'  get 'ct-vol' at ./run_test_zfspoolplugin.pl line 167.
Test 19 e: owner is not correct: expected 'images'  get 'ct-vol' at ./run_test_zfspoolplugin.pl line 197.
Test 19 f: owner is not correct: expected 'images'  get 'ct-vol' at ./run_test_zfspoolplugin.pl line 227.
Stop tests for ZFSPoolPlugin
26 tests failed
Time: 14s

==========

./run_test_lvmplugin.pl
Start tests for LVMPlugin
8000+0 records in
8000+0 records out
8388608000 bytes (8.4 GB, 7.8 GiB) copied, 4.04047 s, 2.1 GB/s
  Physical volume "/dev/loop1" successfully created.
  Volume group "regressiontest" successfully created
  Logical volume "vm-102-disk-1" created.

run test1 "volume_size_info"
  Logical volume "vm-102-disk-1" successfully removed.
  Volume group "regressiontest" successfully removed
  Volume group "regressiontest" successfully created
  Logical volume "vm-102-disk-1" created.

run test2 "volume_resize"
  Size of logical volume regressiontest/vm-102-disk-1 changed from 1.00 GiB (256 extents) to 2.00 GiB (512 extents).
  Logical volume regressiontest/vm-102-disk-1 successfully resized.
  Logical volume "vm-102-disk-1" successfully removed.
  Volume group "regressiontest" successfully removed
  Volume group "regressiontest" successfully created
  Logical volume "vm-102-disk-1" created.

run test3 "volume_has_feature"
  Logical volume "vm-102-disk-1" successfully removed.
  Volume group "regressiontest" successfully removed
  Volume group "regressiontest" successfully created
  Logical volume "vm-102-disk-1" created.

run test4 "volume_rollback_is_possible"
  Logical volume "vm-102-disk-1" successfully removed.
  Volume group "regressiontest" successfully removed
  Volume group "regressiontest" successfully created
  Logical volume "vm-102-disk-1" created.

run test5 "parse_volname"
  Logical volume "vm-102-disk-1" successfully removed.
  Volume group "regressiontest" successfully removed
  Volume group "regressiontest" successfully created
  Logical volume "vm-102-disk-1" created.

run test6 "parse_volume_id"
  Logical volume "vm-102-disk-1" successfully removed.
  Volume group "regressiontest" successfully removed
  Volume group "regressiontest" successfully created
  Logical volume "vm-102-disk-1" created.

run test7 "vdisk_alloc"
Test7 a: vdisk_alloc without vtype not allowed anymore
  Logical volume "vol-vm-112-disk-0" created.
Test7 b: volname:lvmregression:vol-vm-112-disk-0 don't match
  Logical volume "vm-102-disk-1" successfully removed.
  Logical volume "vol-vm-112-disk-0" successfully removed.
  Volume group "regressiontest" successfully removed
  Volume group "regressiontest" successfully created
  Logical volume "vm-102-disk-1" created.

run test8 "vdisk_free"
  Logical volume "vm-102-disk-1" successfully removed.
  Volume group "regressiontest" successfully removed
  Volume group "regressiontest" successfully created
  Logical volume "vm-102-disk-1" created.

run test15 "template_list and vdisk_list"
  Logical volume "vm-102-disk-1" successfully removed.
  Volume group "regressiontest" successfully removed
  Volume group "regressiontest" successfully created
  Logical volume "vm-102-disk-1" created.

run test10 "activate_storage"
  Logical volume "vm-102-disk-1" successfully removed.
  Volume group "regressiontest" successfully removed
  Volume group "regressiontest" successfully created
  Logical volume "vm-102-disk-1" created.

run test11 "deactivate_storage"
  0 logical volume(s) in volume group "regressiontest" now active
  Logical volume "vm-102-disk-1" successfully removed.
  Volume group "regressiontest" successfully removed
  Volume group "regressiontest" successfully created
  Logical volume "vm-102-disk-1" created.

run test12 "path"
  Logical volume "vm-102-disk-1" successfully removed.
  Volume group "regressiontest" successfully removed
  Labels on physical volume "/dev/loop1" successfully wiped.
Stop tests for LVMPlugin
2 tests failed
Time: 11s

==========

>  src/test/list_volumes_test.pm      | 73 ++++++++++++++++++++----------
>  src/test/parse_volname_test.pm     | 34 ++++++++++++--
>  src/test/path_to_volume_id_test.pm | 27 +++++++----
>  src/test/run_test_lvmplugin.pl     | 11 +++--
>  src/test/run_test_zfspoolplugin.pl | 45 ++++++++++--------
>  5 files changed, 129 insertions(+), 61 deletions(-)
>
> diff --git a/src/test/list_volumes_test.pm b/src/test/list_volumes_test.pm
> index e528fc3..fcc7beb 100644
> --- a/src/test/list_volumes_test.pm
> +++ b/src/test/list_volumes_test.pm
> @@ -71,6 +71,8 @@ my $scfg = {
>          'rootdir' => 1,
>          'vztmpl' => 1,
>          'images' => 1,
> +        'vm-vol' => 1,
> +        'ct-vol' => 1,
>          'snippets' => 1,
>          'backup' => 1,
>      },
> @@ -87,9 +89,9 @@ my @tests = (
>          description => 'VMID: 16110, VM, qcow2, backup, snippets',
>          vmid => '16110',
>          files => [
> -            "$storage_dir/images/16110/vm-16110-disk-0.qcow2",
> -            "$storage_dir/images/16110/vm-16110-disk-1.raw",
> -            "$storage_dir/images/16110/vm-16110-disk-2.vmdk",
> +            "$storage_dir/vms/16110/vol-vm-16110-disk-0.qcow2",
> +            "$storage_dir/vms/16110/vol-vm-16110-disk-1.raw",
> +            "$storage_dir/vms/16110/vol-vm-16110-disk-2.vmdk",
>              "$storage_dir/dump/vzdump-qemu-16110-2020_03_30-21_11_40.vma.gz",
>              "$storage_dir/dump/vzdump-qemu-16110-2020_03_30-21_12_45.vma.lzo",
>              "$storage_dir/dump/vzdump-qemu-16110-2020_03_30-21_13_55.vma",
> @@ -99,34 +101,37 @@ my @tests = (
>          ],
>          expected => [
>              {
> -                'content' => 'images',
> +                'content' => 'vm-vol',
> +                'vtype' => 'vm-vol',
>                  'ctime' => DEFAULT_CTIME,
>                  'format' => 'qcow2',
>                  'parent' => undef,
>                  'size' => DEFAULT_SIZE,
>                  'used' => DEFAULT_USED,
>                  'vmid' => '16110',
> -                'volid' => 'local:16110/vm-16110-disk-0.qcow2',
> +                'volid' => 'local:16110/vol-vm-16110-disk-0.qcow2',
>              },
>              {
> -                'content' => 'images',
> +                'content' => 'vm-vol',
> +                'vtype' => 'vm-vol',
>                  'ctime' => DEFAULT_CTIME,
>                  'format' => 'raw',
>                  'parent' => undef,
>                  'size' => DEFAULT_SIZE,
>                  'used' => DEFAULT_USED,
>                  'vmid' => '16110',
> -                'volid' => 'local:16110/vm-16110-disk-1.raw',
> +                'volid' => 'local:16110/vol-vm-16110-disk-1.raw',
>              },
>              {
> -                'content' => 'images',
> +                'content' => 'vm-vol',
> +                'vtype' => 'vm-vol',
>                  'ctime' => DEFAULT_CTIME,
>                  'format' => 'vmdk',
>                  'parent' => undef,
>                  'size' => DEFAULT_SIZE,
>                  'used' => DEFAULT_USED,
>                  'vmid' => '16110',
> -                'volid' => 'local:16110/vm-16110-disk-2.vmdk',
> +                'volid' => 'local:16110/vol-vm-16110-disk-2.vmdk',
>              },
>              {
>                  'content' => 'backup',
> @@ -184,7 +189,8 @@ my @tests = (
>          description => 'VMID: 16112, lxc, raw, backup',
>          vmid => '16112',
>          files => [
> -            "$storage_dir/images/16112/vm-16112-disk-0.raw",
> +            "$storage_dir/cts/16112/vol-ct-16112-disk-0.raw",
> +            "$storage_dir/images/16112/vm-16112-disk-1.raw",
>              "$storage_dir/dump/vzdump-lxc-16112-2020_03_30-21_39_30.tar.lzo",
>              "$storage_dir/dump/vzdump-lxc-16112-2020_03_30-21_49_30.tar.gz",
>              "$storage_dir/dump/vzdump-lxc-16112-2020_03_30-21_49_30.tar.zst",
> @@ -192,6 +198,17 @@ my @tests = (
>              "$storage_dir/dump/vzdump-openvz-16112-2020_03_30-21_39_30.tar.bz2",
>          ],
>          expected => [
> +            {
> +                'content' => 'ct-vol',
> +                'vtype' => 'ct-vol',
> +                'ctime' => DEFAULT_CTIME,
> +                'format' => 'raw',
> +                'parent' => undef,
> +                'size' => DEFAULT_SIZE,
> +                'used' => DEFAULT_USED,
> +                'vmid' => '16112',
> +                'volid' => 'local:16112/vol-ct-16112-disk-0.raw',
> +            },
>              {
>                  'content' => 'rootdir',
>                  'ctime' => DEFAULT_CTIME,
> @@ -200,7 +217,7 @@ my @tests = (
>                  'size' => DEFAULT_SIZE,
>                  'used' => DEFAULT_USED,
>                  'vmid' => '16112',
> -                'volid' => 'local:16112/vm-16112-disk-0.raw',
> +                'volid' => 'local:16112/vm-16112-disk-1.raw',
>              },
>              {
>                  'content' => 'backup',
> @@ -254,7 +271,7 @@ my @tests = (
>          vmid => '16114',
>          files => [
>              "$storage_dir/images/16114/vm-16114-disk-0.qcow2",
> -            "$storage_dir/images/16114/vm-16114-disk-1.qcow2",
> +            "$storage_dir/vms/16114/vol-vm-16114-disk-1.qcow2",
>          ],
>          parent => [
>              "../9004/base-9004-disk-0.qcow2", "../9004/base-9004-disk-1.qcow2",
> @@ -271,14 +288,15 @@ my @tests = (
>                  'volid' => 'local:9004/base-9004-disk-0.qcow2/16114/vm-16114-disk-0.qcow2',
>              },
>              {
> -                'content' => 'images',
> +                'content' => 'vm-vol',
> +                'vtype' => 'vm-vol',
>                  'ctime' => DEFAULT_CTIME,
>                  'format' => 'qcow2',
>                  'parent' => '../9004/base-9004-disk-1.qcow2',
>                  'size' => DEFAULT_SIZE,
>                  'used' => DEFAULT_USED,
>                  'vmid' => '16114',
> -                'volid' => 'local:9004/base-9004-disk-1.qcow2/16114/vm-16114-disk-1.qcow2',
> +                'volid' => 'local:9004/base-9004-disk-1.qcow2/16114/vol-vm-16114-disk-1.qcow2',
>              },
>          ],
>      },
> @@ -287,7 +305,7 @@ my @tests = (
>          vmid => '9004',
>          files => [
>              "$storage_dir/images/9004/base-9004-disk-0.qcow2",
> -            "$storage_dir/images/9004/base-9004-disk-1.qcow2",
> +            "$storage_dir/vms/9004/base-vol-vm-9004-disk-1.qcow2",
>          ],
>          expected => [
>              {
> @@ -301,14 +319,15 @@ my @tests = (
>                  'volid' => 'local:9004/base-9004-disk-0.qcow2',
>              },
>              {
> -                'content' => 'images',
> +                'content' => 'vm-vol',
> +                'vtype' => 'vm-vol',
>                  'ctime' => DEFAULT_CTIME,
>                  'format' => 'qcow2',
>                  'parent' => undef,
>                  'size' => DEFAULT_SIZE,
>                  'used' => DEFAULT_USED,
>                  'vmid' => '9004',
> -                'volid' => 'local:9004/base-9004-disk-1.qcow2',
> +                'volid' => 'local:9004/base-vol-vm-9004-disk-1.qcow2',
>              },
>          ],
>      },
> @@ -428,21 +447,22 @@ my @tests = (
>          #"$storage_dir/images/ssss/base-4321-disk-0.qcow2/1234/vm-1234-disk-0.qcow2",
>          vmid => undef,
>          files => [
> -            "$storage_dir/images/1234/vm-1234-disk-0.qcow2",
> +            "$storage_dir/vms/1234/vol-vm-1234-disk-0.qcow2",
>          ],
>          parent => [
> -            "../ssss/base-4321-disk-0.qcow2",
> +            "../ssss/base-vol-vm-4321-disk-0.qcow2",
>          ],
>          expected => [
>              {
> -                'content' => 'images',
> +                'content' => 'vm-vol',
> +                'vtype' => 'vm-vol',
>                  'ctime' => DEFAULT_CTIME,
>                  'format' => 'qcow2',
> -                'parent' => '../ssss/base-4321-disk-0.qcow2',
> +                'parent' => '../ssss/base-vol-vm-4321-disk-0.qcow2',
>                  'size' => DEFAULT_SIZE,
>                  'used' => DEFAULT_USED,
>                  'vmid' => '1234',
> -                'volid' => 'local:1234/vm-1234-disk-0.qcow2',
> +                'volid' => 'local:1234/vol-vm-1234-disk-0.qcow2',
>              },
>          ],
>      },
> @@ -521,7 +541,7 @@ plan tests => $plan + 1;
>  
>  {
>      my $sid = 'local';
> -    my $types = ['rootdir', 'images', 'vztmpl', 'iso', 'backup', 'snippets'];
> +    my $types = ['images', 'rootdir', 'vm-vol', 'ct-vol', 'vztmpl', 'iso', 'backup', 'snippets'];
>      my @suffixes = ('qcow2', 'raw', 'vmdk', 'vhdx');
>  
>      # run through test cases
> @@ -555,6 +575,13 @@ plan tests => $plan + 1;
>          eval { $got = PVE::Storage::Plugin->list_volumes($sid, $scfg, $vmid, $types) };
>          $got = $@ if $@;
>  
> +        sub sort_by_volid {
> +            my ($data) = @_;
> +            return [sort { $a->{volid} cmp $b->{volid} } @$data];
> +        }
> +
> +        $got = sort_by_volid($got) if ref($got) && ref($got) eq 'ARRAY';
> +        $expected = sort_by_volid($expected);
>          is_deeply($got, $expected, $description) || diag(explain($got));
>  
>          # clean up after each test case, otherwise
> diff --git a/src/test/parse_volname_test.pm b/src/test/parse_volname_test.pm
> index 0d077a9..297e280 100644
> --- a/src/test/parse_volname_test.pm
> +++ b/src/test/parse_volname_test.pm
> @@ -20,6 +20,19 @@ my $tests = [
>      #
>      {
>          description => 'VM disk image, linked, qcow2, vm- as base-',
> +        volname => "$vmid/vol-vm-$vmid-disk-0.qcow2/$vmid/vol-vm-$vmid-disk-0.qcow2",
> +        expected => [
> +            'vm-vol',
> +            "vol-vm-$vmid-disk-0.qcow2",
> +            "$vmid",
> +            "vol-vm-$vmid-disk-0.qcow2",
> +            "$vmid",
> +            !!0,
> +            'qcow2',
> +        ],
> +    },
> +    {
> +        description => 'VM disk image, legacy, linked, qcow2, vm- as base-',
>          volname => "$vmid/vm-$vmid-disk-0.qcow2/$vmid/vm-$vmid-disk-0.qcow2",
>          expected => [
>              'images',
> @@ -27,11 +40,21 @@ my $tests = [
>              "$vmid",
>              "vm-$vmid-disk-0.qcow2",
>              "$vmid",
> -            undef,
> +            !!0,
>              'qcow2',
>          ],
>      },
>      #
> +    # Container volumes
> +    #
> +    {
> +        description => 'CT rootdir image',
> +        volname => "$vmid/vol-ct-$vmid-disk-0.raw",
> +        expected => [
> +            'ct-vol', "vol-ct-$vmid-disk-0.raw", "$vmid", undef, undef, !!0, 'raw',
> +        ],
> +    },
> +    #
>      # iso
>      #
>      {
> @@ -94,7 +117,7 @@ my $tests = [
>          description => 'Container rootdir, subvol',
>          volname => "$vmid/subvol-$vmid-disk-0.subvol",
>          expected =>
> -            ['images', "subvol-$vmid-disk-0.subvol", "$vmid", undef, undef, undef, 'subvol'],
> +            ['images', "subvol-$vmid-disk-0.subvol", "$vmid", undef, undef, !!0, 'subvol'],
>      },
>      {
>          description => 'Backup archive, no virtualization type',
> @@ -209,7 +232,7 @@ foreach my $s (@$disk_suffix) {
>              description => "VM disk image, $s",
>              volname => "$vmid/vm-$vmid-disk-1.$s",
>              expected => [
> -                'images', "vm-$vmid-disk-1.$s", "$vmid", undef, undef, undef, "$s",
> +                'images', "vm-$vmid-disk-1.$s", "$vmid", undef, undef, !!0, "$s",
>              ],
>          },
>          {
> @@ -221,7 +244,7 @@ foreach my $s (@$disk_suffix) {
>                  "$vmid",
>                  "base-$vmid-disk-0.$s",
>                  "$vmid",
> -                undef,
> +                !!0,
>                  "$s",
>              ],
>          },
> @@ -229,7 +252,7 @@ foreach my $s (@$disk_suffix) {
>              description => "VM disk image, base, $s",
>              volname => "$vmid/base-$vmid-disk-0.$s",
>              expected => [
> -                'images', "base-$vmid-disk-0.$s", "$vmid", undef, undef, 'base-', "$s",
> +                'images', "base-$vmid-disk-0.$s", "$vmid", undef, undef, !!1, "$s",
>              ],
>          },
>      );
> @@ -295,6 +318,7 @@ plan tests => scalar @$tests + 1;
>  
>  my $seen_vtype;
>  my $vtype_subdirs = { map { $_ => 1 } keys %{ PVE::Storage::Plugin::get_vtype_subdirs() } };
> +delete $vtype_subdirs->{rootdir}; # this one cannot be observed, it maps to the 'ct-vol' type.
>  
>  foreach my $t (@$tests) {
>      my $description = $t->{description};
> diff --git a/src/test/path_to_volume_id_test.pm b/src/test/path_to_volume_id_test.pm
> index ab7e276..bb2d47f 100644
> --- a/src/test/path_to_volume_id_test.pm
> +++ b/src/test/path_to_volume_id_test.pm
> @@ -25,8 +25,9 @@ my $scfg = {
>              'maxfiles' => 0,
>              'content' => {
>                  'snippets' => 1,
> -                'rootdir' => 1,
>                  'images' => 1,
> +                'vm-vol' => 1,
> +                'ct-vol' => 1,
>                  'iso' => 1,
>                  'backup' => 1,
>                  'vztmpl' => 1,
> @@ -44,24 +45,31 @@ my $scfg = {
>  # expected    => the result that path_to_volume_id should return
>  my @tests = (
>      {
> -        description => 'Image, qcow2',
> +        description => 'Image, qcow2, legacy naming',
>          volname => "$storage_dir/images/16110/vm-16110-disk-0.qcow2",
>          expected => [
>              'images', 'local:16110/vm-16110-disk-0.qcow2',
>          ],
>      },
> +    {
> +        description => 'Image, qcow2',
> +        volname => "$storage_dir/vms/16110/vol-vm-16110-disk-0.qcow2",
> +        expected => [
> +            'vm-vol', 'local:16110/vol-vm-16110-disk-0.qcow2',
> +        ],
> +    },
>      {
>          description => 'Image, raw',
> -        volname => "$storage_dir/images/16112/vm-16112-disk-0.raw",
> +        volname => "$storage_dir/vms/16112/vol-vm-16112-disk-0.raw",
>          expected => [
> -            'images', 'local:16112/vm-16112-disk-0.raw',
> +            'vm-vol', 'local:16112/vol-vm-16112-disk-0.raw',
>          ],
>      },
>      {
>          description => 'Image template, qcow2',
> -        volname => "$storage_dir/images/9004/base-9004-disk-0.qcow2",
> +        volname => "$storage_dir/vms/9004/base-vol-vm-9004-disk-0.qcow2",
>          expected => [
> -            'images', 'local:9004/base-9004-disk-0.qcow2',
> +            'vm-vol', 'local:9004/base-vol-vm-9004-disk-0.qcow2',
>          ],
>      },
>  
> @@ -141,14 +149,14 @@ my @tests = (
>          description => 'Rootdir, folder subvol, legacy naming',
>          volname => "$storage_dir/images/1234/subvol-1234-disk-0.subvol/", # fileparse needs / at the end
>          expected => [
> -            'ct-vol', 'local:1234/subvol-1234-disk-0.subvol',
> +            'images', 'local:1234/subvol-1234-disk-0.subvol',
>          ],
>      },
>      {
>          description => 'Rootdir, folder subvol',
> -        volname => "$storage_dir/images/1234/subvol-1234-disk-0.subvol/", # fileparse needs / at the end
> +        volname => "$storage_dir/cts/1234/vol-ct-1234-disk-0.subvol/", # fileparse needs / at the end
>          expected => [
> -            'images', 'local:1234/subvol-1234-disk-0.subvol',
> +            'ct-vol', 'local:1234/vol-ct-1234-disk-0.subvol',
>          ],
>      },
>      {
> @@ -239,6 +247,7 @@ plan tests => scalar @tests + 1;
>  
>  my $seen_vtype;
>  my $vtype_subdirs = { map { $_ => 1 } keys %{ PVE::Storage::Plugin::get_vtype_subdirs() } };
> +delete $vtype_subdirs->{rootdir}; # this one cannot be observed, it maps to the 'ct-vol' type.
>  
>  foreach my $tt (@tests) {
>      my $file = $tt->{volname};
> diff --git a/src/test/run_test_lvmplugin.pl b/src/test/run_test_lvmplugin.pl
> index e87a3de..92e8d6e 100755
> --- a/src/test/run_test_lvmplugin.pl
> +++ b/src/test/run_test_lvmplugin.pl
> @@ -159,7 +159,7 @@ my $test7 = sub {
>  
>      eval {
>          my $tmp_volid =
> -            PVE::Storage::vdisk_alloc($cfg, $storagename, "112", "raw", undef, 1024 * 1024);
> +            PVE::Storage::vdisk_alloc($cfg, $storagename, "112", "raw", undef, 1024 * 1024, undef);

^ Assuming that this should be "images" instead of undef above, since
vdisk_alloc now throws when undef is passed.

Should probably also add a test that expects `vdisk_alloc()` to throw
when undef is passed.

>  
>          if ($tmp_volid ne "$storagename:vm-112-disk-0") {
>              die "volname:$tmp_volid don't match\n";
> @@ -186,15 +186,16 @@ my $test7 = sub {
>      }
>  
>      eval {
> -        my $tmp_volid =
> -            PVE::Storage::vdisk_alloc($cfg, $storagename, "112", "raw", undef, 2048 * 1024);
> +        my $tmp_volid = PVE::Storage::vdisk_alloc(
> +            $cfg, $storagename, "112", "raw", undef, 2048 * 1024, 'vm-vol',
> +        );
>  
> -        if ($tmp_volid ne "$storagename:vm-112-disk-1") {
> +        if ($tmp_volid ne "$storagename:vol-vm-112-disk-1") {
>              die "volname:$tmp_volid don't match\n";
>          }

^ This here also trips up; see the following output:

run test7 "vdisk_alloc"
  Logical volume "vm-112-disk-0" created.
  Logical volume "vol-vm-112-disk-2" created.
Test7 b: volname:lvmregression:vol-vm-112-disk-2 don't match
  Logical volume "vm-102-disk-1" successfully removed.
  Logical volume "vm-112-disk-0" successfully removed.
  Logical volume "vol-vm-112-disk-2" successfully removed.
  Volume group "regressiontest" successfully removed

Haven't fully investigated yet, but at a quick glance this seems
related to the changes to `my $get_vm_disk_number = sub { ... }`
and `get_next_vm_diskname()` done in patch 17.

>          eval {
>              run_command(
> -                "lvs --noheadings -o lv_size $vgname/vm-112-disk-1",
> +                "lvs --noheadings -o lv_size $vgname/vol-vm-112-disk-1",
>                  outfunc => sub {
>                      my $tmp = shift;
>                      if ($tmp !~ m/2\.00g/) {
> diff --git a/src/test/run_test_zfspoolplugin.pl b/src/test/run_test_zfspoolplugin.pl
> index 9bd70a8..99ab6e2 100755
> --- a/src/test/run_test_zfspoolplugin.pl
> +++ b/src/test/run_test_zfspoolplugin.pl
> @@ -580,7 +580,7 @@ my $test13 = sub {
>  
>      eval {
>          my $tmp_volid =
> -            PVE::Storage::vdisk_alloc($cfg, $storagename, "112", "raw", undef, 1024 * 1024);
> +            PVE::Storage::vdisk_alloc($cfg, $storagename, "112", "raw", undef, 1024 * 1024, undef);

^ Trips up; assuming this also takes "images" instead of undef due to
the changes made to `vdisk_alloc()`.

>  
>          if ($tmp_volid ne "$storagename:vm-112-disk-0") {
>              die "volname:$tmp_volid don't match\n";
> @@ -607,18 +607,19 @@ my $test13 = sub {
>      }
>  
>      eval {
> -        my $tmp_volid =
> -            PVE::Storage::vdisk_alloc($cfg, $storagename, "112", "raw", undef, 2048 * 1024);
> +        my $tmp_volid = PVE::Storage::vdisk_alloc(
> +            $cfg, $storagename, "112", "raw", undef, 2048 * 1024, 'vm-vol',
> +        );
>  
> -        if ($tmp_volid ne "$storagename:vm-112-disk-1") {
> +        if ($tmp_volid ne "$storagename:vol-vm-112-disk-1") {
>              die "volname:$tmp_volid don't match\n";

^ Also trips up; probably due to the changes related to disk-number
fetching as mentioned above.

>          }
>          eval {
>              run_command(
> -                "zfs get -H volsize $zpath\/vm-112-disk-1",
> +                "zfs get -H volsize $zpath\/vol-vm-112-disk-1",
>                  outfunc => sub {
>                      my $tmp = shift;
> -                    if ($tmp !~ m/^$zpath\/vm-112-disk-1.*volsize.*2G.*$/) {
> +                    if ($tmp !~ m/^$zpath\/vol-vm-112-disk-1.*volsize.*2G.*$/) {
>                          die "size don't match\n";
>                      }
>                  },
> @@ -635,8 +636,9 @@ my $test13 = sub {
>      }
>  
>      eval {
> -        my $tmp_volid =
> -            PVE::Storage::vdisk_alloc($cfg, $storagename, "113", "subvol", undef, 1024 * 1024);
> +        my $tmp_volid = PVE::Storage::vdisk_alloc(
> +            $cfg, $storagename, "113", "subvol", undef, 1024 * 1024, undef,
> +        );

^ Trips up as well; see above.

>  
>          if ($tmp_volid ne "$storagename:subvol-113-disk-0") {
>              die "volname:$tmp_volid  don't match\n";
> @@ -663,18 +665,19 @@ my $test13 = sub {
>      }
>  
>      eval {
> -        my $tmp_volid =
> -            PVE::Storage::vdisk_alloc($cfg, $storagename, "113", "subvol", undef, 2048 * 1024);
> +        my $tmp_volid = PVE::Storage::vdisk_alloc(
> +            $cfg, $storagename, "113", "subvol", undef, 2048 * 1024, 'ct-vol',
> +        );
>  
> -        if ($tmp_volid ne "$storagename:subvol-113-disk-1") {
> +        if ($tmp_volid ne "$storagename:subvol-ct-113-disk-1") {
>              die "volname:$tmp_volid  don't match\n";

^ Trips up as well; see above.

>          }
>          eval {
>              run_command(
> -                "zfs get -H refquota $zpath\/subvol-113-disk-1",
> +                "zfs get -H refquota $zpath\/subvol-ct-113-disk-1",
>                  outfunc => sub {
>                      my $tmp = shift;
> -                    if ($tmp !~ m/^$zpath\/subvol-113-disk-1.*refquota.*G.*$/) {
> +                    if ($tmp !~ m/^$zpath\/subvol-ct-113-disk-1.*refquota.*G.*$/) {
>                          die "size don't match\n";
>                      }
>                  },
> @@ -778,7 +781,7 @@ my $test11 = sub {

^ Bunch of things for this test fail; at a quick glance this also seems
related to the changes to `my $get_vm_disk_number = sub { ... }`
and `get_next_vm_diskname()` done in patch 17.

>  
>      print "\nrun test11 \"volume_is_base\"\n";
>  
> -    eval { PVE::Storage::vdisk_clone($cfg, "$storagename:$vmdisk", 110); };
> +    eval { PVE::Storage::vdisk_clone($cfg, "$storagename:$vmdisk", 110, undef, undef); };
>      if (!$@) {
>          $count++;
>          warn "Test11 a: clone_image only works on base images";
> @@ -786,7 +789,7 @@ my $test11 = sub {
>  
>      eval {
>          if ("$storagename:$vmbase\/vm-110-disk-0" ne
> -            PVE::Storage::vdisk_clone($cfg, "$storagename:$vmbase", 110, '__base__')
> +            PVE::Storage::vdisk_clone($cfg, "$storagename:$vmbase", 110, '__base__', undef)
>          ) {
>              $count++;
>              warn "Test11 b";
> @@ -806,13 +809,15 @@ my $test11 = sub {
>          warn "Test11 b: $@";
>      }
>  
> -    eval { PVE::Storage::vdisk_clone($cfg, "$storagename:$vmbase\/$vmlinked", 111); };
> +    eval {
> +        PVE::Storage::vdisk_clone($cfg, "$storagename:$vmbase\/$vmlinked", 111, undef, undef);
> +    };
>      if (!$@) {
>          $count++;
>          warn "Test11 c: clone_image only works on base images";
>      }
>  
> -    eval { PVE::Storage::vdisk_clone($cfg, "$storagename:$ctdisk", 110); };
> +    eval { PVE::Storage::vdisk_clone($cfg, "$storagename:$ctdisk", 110, undef, undef); };
>      if (!$@) {
>          $count++;
>          warn "Test11 d: clone_image only works on base images";
> @@ -820,7 +825,7 @@ my $test11 = sub {
>  
>      eval {
>          if ("$storagename:$ctbase\/subvol-210-disk-0" ne
> -            PVE::Storage::vdisk_clone($cfg, "$storagename:$ctbase", 210, '__base__')
> +            PVE::Storage::vdisk_clone($cfg, "$storagename:$ctbase", 210, '__base__', undef)
>          ) {
>              $count++;
>              warn "Test11 e";
> @@ -840,7 +845,9 @@ my $test11 = sub {
>          warn "Test11 e: $@";
>      }
>  
> -    eval { PVE::Storage::vdisk_clone($cfg, "$storagename:$ctbase\/$ctlinked", 211); };
> +    eval {
> +        PVE::Storage::vdisk_clone($cfg, "$storagename:$ctbase\/$ctlinked", 211, undef, undef);
> +    };
>      if (!$@) {
>          $count++;
>          warn "Test11 f: clone_image only works on base images";



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] 74+ messages in thread

* Re: [pve-devel] [PATCH storage 16/26] common: add volume_type_from_name convenience helper
  2025-07-29 11:15 ` [pve-devel] [PATCH storage 16/26] common: add volume_type_from_name convenience helper Wolfgang Bumiller
@ 2025-07-30  8:36   ` Fabian Grünbichler
  2025-07-30  9:09     ` Wolfgang Bumiller
  0 siblings, 1 reply; 74+ messages in thread
From: Fabian Grünbichler @ 2025-07-30  8:36 UTC (permalink / raw)
  To: Proxmox VE development discussion

On July 29, 2025 1:15 pm, Wolfgang Bumiller wrote:
> For plugins which follow our new naming scheme.
> 
> Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
> ---
>  src/PVE/Storage/Common.pm | 29 +++++++++++++++++++++++++++++
>  1 file changed, 29 insertions(+)
> 
> diff --git a/src/PVE/Storage/Common.pm b/src/PVE/Storage/Common.pm
> index 7086e1c..813fba6 100644
> --- a/src/PVE/Storage/Common.pm
> +++ b/src/PVE/Storage/Common.pm
> @@ -313,6 +313,35 @@ sub should_list_images : prototype($$) ($expected_content_type, $volume_type) {
>      return $expected_content_type eq $volume_type;
>  }
>  
> +=head3 volume_type_from_name
> +
> +    volume_type_from_name($name)
> +
> +This is available for storages which follow our most common naming scheme relating to volume types:
> +A "vol-vm-" prefix for the C<vm-vol> vtype, and a "vol-ct-" prefix for the C<ct-vol> vtype.
> +
> +This function allows (and ignores) an optional "base-" prefix, such that
> +"base-vol-ct-100-disk-0.raw" would return C<ct-vol>.
> +
> +In any other case it returns C<images>.
> +
> +=cut
> +
> +sub volume_type_from_name : prototype($) {
> +    my ($name) = @_;
> +
> +    if ($name =~ /^(?:base-)?(?:(?:sub)?vol-(vm|ct))-/) {
> +        return "$1-vol";
> +    }
> +
> +    # Note: Despite the legacy `subvol-*` and `basevol-*` dirs always being containers, giving
> +    # them the vtype `ct-vol` would break `path_to_volume_id` which would expect their volids to
> +    # be in the `cts/` subdir instead of in `images/`...
> +    # return 'ct-vol' if $name =~ /^(?:subvol|basevol)-/;
> +
> +    return 'images';
> +}

ZFSPoolPlugin has it's own variant of this, and this one here seems
unused?

> +
>  =head3 is_volume_type
>  
>      is_volume_type($vtype)
> -- 
> 2.47.2
> 
> 
> 
> _______________________________________________
> pve-devel mailing list
> pve-devel@lists.proxmox.com
> https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
> 
> 
> 


_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] 74+ messages in thread

* Re: [pve-devel] [PATCH storage 14/26] plugins: update image/volume listing to support new types
  2025-07-29 11:15 ` [pve-devel] [PATCH storage 14/26] plugins: update image/volume listing to support new types Wolfgang Bumiller
@ 2025-07-30  8:36   ` Fabian Grünbichler
  0 siblings, 0 replies; 74+ messages in thread
From: Fabian Grünbichler @ 2025-07-30  8:36 UTC (permalink / raw)
  To: Proxmox VE development discussion

On July 29, 2025 1:15 pm, Wolfgang Bumiller wrote:
> Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
> ---
>  src/PVE/Storage/Common.pm            | 31 ++++++++++++++++++++++++++
>  src/PVE/Storage/ISCSIDirectPlugin.pm |  5 ++++-
>  src/PVE/Storage/ISCSIPlugin.pm       |  7 ++++--
>  src/PVE/Storage/LVMPlugin.pm         | 28 +++++++++++++----------
>  src/PVE/Storage/LvmThinPlugin.pm     | 33 ++++++++++++++++++----------
>  src/PVE/Storage/PBSPlugin.pm         |  2 +-
>  src/PVE/Storage/RBDPlugin.pm         |  9 ++++++--
>  src/PVE/Storage/ZFSPoolPlugin.pm     | 16 +++++++++++++-
>  8 files changed, 102 insertions(+), 29 deletions(-)
> 
> diff --git a/src/PVE/Storage/Common.pm b/src/PVE/Storage/Common.pm
> index b2ebd50..bab1260 100644
> --- a/src/PVE/Storage/Common.pm
> +++ b/src/PVE/Storage/Common.pm
> @@ -282,4 +282,35 @@ sub qemu_img_resize {
>      run_command($cmd, timeout => $timeout);
>  }
>  
> +=head3 should_list_images($expected_content_type, $volume_type)
> +
> +Returns whether a volume of type C<$volume_type> should be listed in C<list_images> if the expected
> +content type is C<$expcted_content_type>.
> +
> +This effectively checks if C<$expected_content_type> is a "supertype" of C<$volume_type>.
> +
> +=cut
> +
> +sub should_list_images : prototype($$) ($expected_content_type, $volume_type) {
> +    # If we have no expected type, everything should be listed.
> +    return 1 if !defined($expected_content_type);
> +
> +    if (!$volume_type) {
> +        # For 'images' and 'rootdir', an unknown volume type should also be listed.
> +        return 1
> +            if $expected_content_type eq 'images' || $expected_content_type eq 'rootdir';
> +        # Otherwise unknown volume types are unexpected.
> +        return 0;
> +    }
> +
> +    # Images should also include vm-vol.
> +    return 1 if $expected_content_type eq 'images' && $volume_type eq 'vm-vol';
> +
> +    # Rootdir should also include ct-vol.
> +    return 1 if $expected_content_type eq 'rootdir' && $volume_type eq 'ct-vol';

could we drop this if we made pve-container and qemu-server list twice,
once with the legacy and once with the new type? AFAICT the only user of
this is `PVE::Storage::vdisk_list` and list_volumes?

it seems like a potential footgun to have the legacy types refer to just
the legacy types sometimes, but both legacy and new types in other
places..

> +
> +    # Otherwise they must be equal.
> +    return $expected_content_type eq $volume_type;
> +}
> +
>  1;
> diff --git a/src/PVE/Storage/ISCSIDirectPlugin.pm b/src/PVE/Storage/ISCSIDirectPlugin.pm
> index f5b466e..98a3391 100644
> --- a/src/PVE/Storage/ISCSIDirectPlugin.pm
> +++ b/src/PVE/Storage/ISCSIDirectPlugin.pm
> @@ -152,10 +152,12 @@ sub free_image {
>  }
>  
>  sub list_images {
> -    my ($class, $storeid, $scfg, $vmid, $vollist, $cache) = @_;
> +    my ($class, $storeid, $scfg, $vmid, $vollist, $cache, $content_type) = @_;
>  
>      my $res = [];
>  
> +    return $res if $content_type && $content_type ne 'images' && $content_type ne 'vm-vol';
> +
>      # we have no owner for iscsi devices
>  
>      my $dat = iscsi_ls($scfg);
> @@ -172,6 +174,7 @@ sub list_images {
>  
>          my $info = $dat->{$volname};
>          $info->{volid} = $volid;
> +        $info->{vtype} = 'vm-vol';
>  
>          push @$res, $info;
>      }
> diff --git a/src/PVE/Storage/ISCSIPlugin.pm b/src/PVE/Storage/ISCSIPlugin.pm
> index 4875a1f..77a9173 100644
> --- a/src/PVE/Storage/ISCSIPlugin.pm
> +++ b/src/PVE/Storage/ISCSIPlugin.pm
> @@ -421,17 +421,19 @@ sub list_volumes {
>      my $res = $class->list_images($storeid, $scfg, $vmid);
>  
>      for my $item (@$res) {
> -        $item->{content} = 'images'; # we only have images
> +        $item->{content} = 'vm-vol'; # we only have VM images
>      }
>  
>      return $res;
>  }
>  
>  sub list_images {
> -    my ($class, $storeid, $scfg, $vmid, $vollist, $cache) = @_;
> +    my ($class, $storeid, $scfg, $vmid, $vollist, $cache, $content_type) = @_;
>  
>      my $res = [];
>  
> +    return $res if $content_type && $content_type ne 'images' && $content_type ne 'vm-vol';
> +
>      $cache->{iscsi_devices} = iscsi_device_list() if !$cache->{iscsi_devices};
>  
>      # we have no owner for iscsi devices
> @@ -454,6 +456,7 @@ sub list_images {
>  
>              my $info = $dat->{$volname};
>              $info->{volid} = $volid;
> +            $info->{vtype} = 'vm-vol';
>  
>              push @$res, $info;
>          }
> diff --git a/src/PVE/Storage/LVMPlugin.pm b/src/PVE/Storage/LVMPlugin.pm
> index 9b88c6a..55c4578 100644
> --- a/src/PVE/Storage/LVMPlugin.pm
> +++ b/src/PVE/Storage/LVMPlugin.pm
> @@ -750,7 +750,7 @@ my $check_tags = sub {
>  };
>  
>  sub list_images {
> -    my ($class, $storeid, $scfg, $vmid, $vollist, $cache) = @_;
> +    my ($class, $storeid, $scfg, $vmid, $vollist, $cache, $content_type) = @_;
>  
>      my $vgname = $scfg->{vgname};
>  
> @@ -762,8 +762,11 @@ sub list_images {
>  
>          foreach my $volname (keys %$dat) {
>  
> -            next if $volname !~ m/^vm-(\d+)-/;
> -            my $owner = $1;
> +            next if $volname !~ m/^(?:vol-(?<vtype>vm|ct)-|vm)-(?<owner>\d+)-/xn;
> +            my $owner = $+{owner};
> +            my $vtype = $+{vtype} ? $+{vtype} . '-vol' : undef;
> +
> +            next if !PVE::Storage::Common::should_list_images($content_type, $vtype);
>  
>              my $info = $dat->{$volname};
>  
> @@ -787,14 +790,17 @@ sub list_images {
>                  ? $class->volume_size_info($scfg, $storeid, $volname)
>                  : $info->{lv_size};
>  
> -            push @$res,
> -                {
> -                    volid => $volid,
> -                    format => $format,
> -                    size => $size,
> -                    vmid => $owner,
> -                    ctime => $info->{ctime},
> -                };
> +            my $entry = {
> +                volid => $volid,
> +                format => $format,
> +                size => $size,
> +                vmid => $owner,
> +                ctime => $info->{ctime},
> +            };
> +
> +            $entry->{vtype} = $vtype if defined($vtype);
> +
> +            push @$res, $entry;
>          }
>      }
>  
> diff --git a/src/PVE/Storage/LvmThinPlugin.pm b/src/PVE/Storage/LvmThinPlugin.pm
> index 751bd7b..f6615d9 100644
> --- a/src/PVE/Storage/LvmThinPlugin.pm
> +++ b/src/PVE/Storage/LvmThinPlugin.pm
> @@ -182,7 +182,7 @@ sub free_image {
>  }
>  
>  sub list_images {
> -    my ($class, $storeid, $scfg, $vmid, $vollist, $cache) = @_;
> +    my ($class, $storeid, $scfg, $vmid, $vollist, $cache, $content_type) = @_;
>  
>      my $vgname = $scfg->{vgname};
>  
> @@ -193,9 +193,17 @@ sub list_images {
>      if (my $dat = $cache->{lvs}->{$vgname}) {
>  
>          foreach my $volname (keys %$dat) {
> +            my ($owner, $vtype);
> +            if ($volname =~ m/^(?:base-)?vol-(ct|vm)-(\d+)-/) {
> +                $vtype = "$1-vol";
> +                $owner = $2;
> +            } elsif ($volname =~ m/^(?:vm|base)-(\d+)-/) {
> +                $owner = $1;
> +            } else {
> +                next;
> +            }
>  
> -            next if $volname !~ m/^(vm|base)-(\d+)-/;
> -            my $owner = $2;
> +            next if !PVE::Storage::Common::should_list_images($content_type, $vtype);
>  
>              my $info = $dat->{$volname};
>  
> @@ -212,14 +220,17 @@ sub list_images {
>                  next if defined($vmid) && ($owner ne $vmid);
>              }
>  
> -            push @$res,
> -                {
> -                    volid => $volid,
> -                    format => 'raw',
> -                    size => $info->{lv_size},
> -                    vmid => $owner,
> -                    ctime => $info->{ctime},
> -                };
> +            my $entry = {
> +                volid => $volid,
> +                format => 'raw',
> +                size => $info->{lv_size},
> +                vmid => $owner,
> +                ctime => $info->{ctime},
> +            };
> +
> +            $entry->{vtype} = $vtype if defined($vtype);
> +
> +            push @$res, $entry;
>          }
>      }
>  
> diff --git a/src/PVE/Storage/PBSPlugin.pm b/src/PVE/Storage/PBSPlugin.pm
> index 00170f5..bab026b 100644
> --- a/src/PVE/Storage/PBSPlugin.pm
> +++ b/src/PVE/Storage/PBSPlugin.pm
> @@ -674,7 +674,7 @@ sub free_image {
>  }
>  
>  sub list_images {
> -    my ($class, $storeid, $scfg, $vmid, $vollist, $cache) = @_;
> +    my ($class, $storeid, $scfg, $vmid, $vollist, $cache, $content_type) = @_;
>  
>      my $res = [];
>  
> diff --git a/src/PVE/Storage/RBDPlugin.pm b/src/PVE/Storage/RBDPlugin.pm
> index 4400aeb..2ef1280 100644
> --- a/src/PVE/Storage/RBDPlugin.pm
> +++ b/src/PVE/Storage/RBDPlugin.pm
> @@ -773,7 +773,7 @@ sub free_image {
>  }
>  
>  sub list_images {
> -    my ($class, $storeid, $scfg, $vmid, $vollist, $cache) = @_;
> +    my ($class, $storeid, $scfg, $vmid, $vollist, $cache, $content_type) = @_;
>  
>      my $dat = rbd_ls($scfg, $storeid);
>      return [] if !$dat; # nothing found
> @@ -783,12 +783,17 @@ sub list_images {
>          my $info = $dat->{$image};
>          my ($volname, $parent, $owner) = $info->@{ 'name', 'parent', 'vmid' };
>  
> -        if ($parent && $parent =~ m/^(base-\d+-\S+)\@__base__$/) {
> +        my $vtype;
> +
> +        if ($parent && $parent =~ m/^(base(?:-vol-(?<vtype>vm|ct))?-\d+-\S+)\@__base__$/xn) {
> +            $vtype = $+{vtype} ? $+{vtype} . '-vol' : undef;
>              $info->{volid} = "$storeid:$1/$volname";
>          } else {
>              $info->{volid} = "$storeid:$volname";
>          }
>  
> +        next if !PVE::Storage::Common::should_list_images($content_type, $vtype);
> +
>          if ($vollist) {
>              my $found = grep { $_ eq $info->{volid} } @$vollist;
>              next if !$found;
> diff --git a/src/PVE/Storage/ZFSPoolPlugin.pm b/src/PVE/Storage/ZFSPoolPlugin.pm
> index 8e917b4..d65af69 100644
> --- a/src/PVE/Storage/ZFSPoolPlugin.pm
> +++ b/src/PVE/Storage/ZFSPoolPlugin.pm
> @@ -122,6 +122,16 @@ sub zfs_parse_zvol_list {
>      return $list;
>  }
>  
> +my sub image_vtype_from_name : prototype($) {
> +    my ($name) = @_;
> +
> +    return 'ct-vol' if $name =~ /^(base-)?subvol(-ct)?-/;
> +    return 'ct-vol' if $name =~ /^basevol-/;
> +    return 'vm-vol' if $name =~ /^(base-)?vol(-vm)?-/;
> +    return 'vm-vol' if $name =~ /^base-/;
> +    return 'images';
> +}
> +
>  sub parse_volname {
>      my ($class, $volname) = @_;
>  
> @@ -305,7 +315,7 @@ sub free_image {
>  }
>  
>  sub list_images {
> -    my ($class, $storeid, $scfg, $vmid, $vollist, $cache) = @_;
> +    my ($class, $storeid, $scfg, $vmid, $vollist, $cache, $content_type) = @_;
>  
>      my $zfs_list = $class->zfs_list_zvol($scfg);
>  
> @@ -330,6 +340,10 @@ sub list_images {
>              next if defined($vmid) && ($owner ne $vmid);
>          }
>  
> +        my $vtype = volume_type_from_name($volname);
> +        next if !PVE::Storage::Common::should_list_images($content_type, $vtype);
> +        $info->{vtype} = $vtype if $vtype ne 'images' && $vtype ne 'rootdir';
> +
>          push @$res, $info;
>      }
>      return $res;
> -- 
> 2.47.2
> 
> 
> 
> _______________________________________________
> pve-devel mailing list
> pve-devel@lists.proxmox.com
> https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
> 
> 
> 


_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] 74+ messages in thread

* Re: [pve-devel] [PATCH storage 13/26] plugin, btrfs: update list_images and list_volumes
  2025-07-29 11:15 ` [pve-devel] [PATCH storage 13/26] plugin, btrfs: update list_images and list_volumes Wolfgang Bumiller
@ 2025-07-30  8:36   ` Fabian Grünbichler
  2025-07-30  8:41     ` Fiona Ebner
  0 siblings, 1 reply; 74+ messages in thread
From: Fabian Grünbichler @ 2025-07-30  8:36 UTC (permalink / raw)
  To: Proxmox VE development discussion

On July 29, 2025 1:15 pm, Wolfgang Bumiller wrote:
> `list_images()` now takes a vtype.
> 
> If it is not set, we act like we did previously by listing *all*
> images. This now includes the vm-vol and ct-vol types ones.
> 
> If a new vtype is set (vm-vol or ct-vol), then we list only those.
> 
> For "images" we list both 'vm-vol', for "rootdir" we list both
> "ct-vol" and the "rootdir" type.
> 
> NOTE: Previously the "rootdir" `content-dirs` option did not take
> effect, which is why the `list_images()` implementation for `rootdir`
> uses the `images` subdir.
> This means that `list_images()` in particular lists all/the same
> untyped images regardless of whether `images` or `rootdir` is used as
> a type. For `list_volumes()`, the previous strategy of using the
> existing VMs to decide the volume-type will be used.
> 
> Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
> ---
>  src/PVE/Storage/BTRFSPlugin.pm |  44 ++++++++++-
>  src/PVE/Storage/Plugin.pm      | 139 +++++++++++++++++++++++++++++----
>  2 files changed, 163 insertions(+), 20 deletions(-)
> 
> diff --git a/src/PVE/Storage/BTRFSPlugin.pm b/src/PVE/Storage/BTRFSPlugin.pm
> index d1c0cf9..585489c 100644
> --- a/src/PVE/Storage/BTRFSPlugin.pm
> +++ b/src/PVE/Storage/BTRFSPlugin.pm
> @@ -645,13 +645,40 @@ sub volume_has_feature {
>  }
>  
>  sub list_images {
> -    my ($class, $storeid, $scfg, $vmid, $vollist, $cache) = @_;
> -    my $imagedir = $class->get_subdir($scfg, 'images');
> +    my ($class, $storeid, $scfg, $vmid, $vollist, $cache, $content_type) = @_;
> +
> +    my @image_dirs;
> +    if (defined($content_type)) {
> +        if ($content_type eq 'images') {
> +            @image_dirs = (
> +                [undef, $class->get_subdir($scfg, 'images')],
> +                ['vm-vol', $class->get_subdir($scfg, 'vm-vol')],
> +            );
> +        } elsif ($content_type eq 'rootdir') {
> +            # In the legacy case, the 'rootdir' `content-dir` option did not take
> +            # effect, so use the 'images' dir for it, as that is what it used to return!
> +            @image_dirs = (
> +                [undef, $class->get_subdir($scfg, 'images')],
> +                ['ct-vol', $class->get_subdir($scfg, 'ct-vol')],
> +            );
> +        } else {
> +            @image_dirs = [$content_type, $class->get_subdir($scfg, $content_type)];
> +        }
> +    } else {
> +        @image_dirs = (
> +            [undef, $class->get_subdir($scfg, 'images')],
> +            ['vm-vol', $class->get_subdir($scfg, 'vm-vol')],
> +            ['ct-vol', $class->get_subdir($scfg, 'ct-vol')],
> +        );
> +    }
>  
>      my $res = [];
>  
>      # Copied from Plugin.pm, with file_size_info calls adapted:
> -    foreach my $fn (<$imagedir/[0-9][0-9]*/*>) {
> +    my $current_type;
> +    my $code = sub {
> +        my ($fn) = @_;
> +
>          # different to in Plugin.pm the regex below also excludes '@' as valid file name
>          next if $fn !~ m@^(/.+/(\d+)/([^/\@.]+(?:\.(qcow2|vmdk|subvol))?))$@;
>          $fn = $1; # untaint
> @@ -701,9 +728,20 @@ sub list_images {
>              parent => $parent,
>          };
>  
> +        # Only add vtype if it is not 'images'...
> +        $info->{vtype} = $current_type if defined($current_type);
> +
>          $info->{ctime} = $ctime if $ctime;
>  
>          push @$res, $info;
> +    };
> +
> +    my %dedup;
> +    for my $dir_entry (@image_dirs) {
> +        ($current_type, my $dir) = @$dir_entry;
> +        next if $dedup{$dir};
> +        $dedup{$dir} = 1;
> +        PVE::Storage::Plugin::foreach_guest_file($dir, $code);
>      }
>  
>      return $res;
> diff --git a/src/PVE/Storage/Plugin.pm b/src/PVE/Storage/Plugin.pm
> index 047b2fc..660045d 100644
> --- a/src/PVE/Storage/Plugin.pm
> +++ b/src/PVE/Storage/Plugin.pm
> @@ -10,8 +10,9 @@ use File::chdir;
>  use File::Path;
>  use File::Basename;
>  use File::stat qw();
> +use IO::Dir;
>  
> -use PVE::Tools qw(run_command);
> +use PVE::Tools qw(dir_glob_foreach run_command);
>  use PVE::JSONSchema qw(get_standard_option register_standard_option);
>  use PVE::Cluster qw(cfs_register_file);
>  
> @@ -1567,36 +1568,91 @@ sub volume_has_feature {
>  
>      return undef;
>  }
> +#
> +# Given an volume directory, this iterates over vmid directories and recurses
> +# once to the files inside.
> +#
> +# In other words, this is `glob($dir/[0-9][0-9]*/*)`.
> +my $MAX_VMID;
> +
> +sub foreach_guest_file : prototype($$) {

should this go into PVE::Storage::Common?

> +    my ($dir, $code) = @_;
> +
> +    $MAX_VMID = get_standard_option("pve-vmid")->{maximum} if !defined($MAX_VMID);

> +
> +    dir_glob_foreach(
> +        $dir,
> +        qr/\d+/,
> +        sub {
> +            my ($vmid) = @_;
> +            $vmid = int($vmid);
> +            return if $vmid < 100 || $vmid > $MAX_VMID;

this now means list_images lists less than before - somebody might have
used a very high ID as a placeholder not realizing its outside the "allowed" range..

not sure it's worth it to have this restriction here..


> +            my $dir = "$dir/$vmid";
> +            my $dh = IO::Dir->new($dir) or return;
> +            while (defined(my $entry = $dh->read)) {
> +                next if $entry eq '.' || $entry eq '..';
> +                $code->("$dir/$entry");
> +            }
> +            close $dh;
> +        },
> +    );
> +}
>  
>  sub list_images {
> -    my ($class, $storeid, $scfg, $vmid, $vollist, $cache) = @_;
> -
> -    my $imagedir = $class->get_subdir($scfg, 'images');
> +    my ($class, $storeid, $scfg, $vmid, $vollist, $cache, $content_type) = @_;
> +
> +    my @image_dirs;
> +    if (defined($content_type)) {
> +        if ($content_type eq 'images') {
> +            @image_dirs = (
> +                [undef, $class->get_subdir($scfg, 'images')],
> +                ['vm-vol', $class->get_subdir($scfg, 'vm-vol')],
> +            );
> +        } elsif ($content_type eq 'rootdir') {
> +            # In the legacy case, the 'rootdir' `content-dir` option did not take
> +            # effect, so use the 'images' dir for it, as that is what it used to return!
> +            @image_dirs = (
> +                [undef, $class->get_subdir($scfg, 'images')],
> +                ['ct-vol', $class->get_subdir($scfg, 'ct-vol')],
> +            );
> +        } else {
> +            @image_dirs = [$content_type, $class->get_subdir($scfg, $content_type)];
> +        }
> +    } else {
> +        @image_dirs = (
> +            [undef, $class->get_subdir($scfg, 'images')],
> +            ['vm-vol', $class->get_subdir($scfg, 'vm-vol')],
> +            ['ct-vol', $class->get_subdir($scfg, 'ct-vol')],
> +        );
> +    }
>  
>      my $format_info = $class->get_formats($scfg, $storeid);
>      my $fmts = join('|', sort keys $format_info->{valid}->%*);
>  
>      my $res = [];
>  
> -    foreach my $fn (<$imagedir/[0-9][0-9]*/*>) {
> +    my $current_type;
> +    my $code = sub {
> +        my ($fn) = @_;
>  
> -        next if $fn !~ m!^(/.+/(\d+)/([^/]+\.($fmts)))$!;
> +        return if $fn !~ m!^(/.+/(\d+)/([^/]+\.($fmts)))$!;
>          $fn = $1; # untaint
>  
>          my $owner = $2;
>          my $name = $3;
>          my $format = $4;
>  
> -        next if !$vollist && defined($vmid) && ($owner ne $vmid);
> +        return if !$vollist && defined($vmid) && ($owner ne $vmid);
>  
> -        my ($size, undef, $used, $parent, $ctime) = eval { file_size_info($fn, undef, $format); };
> +        my ($size, undef, $used, $parent, $ctime) =
> +            eval { file_size_info($fn, undef, $format); };
>          if (my $err = $@) {
>              die $err if $err !~ m/Image is not in \S+ format$/;
>              warn "image '$fn' is not in expected format '$format', querying as raw\n";
>              ($size, undef, $used, $parent, $ctime) = file_size_info($fn, undef, 'raw');
>              $format = 'invalid';
>          }
> -        next if !defined($size);
> +        return if !defined($size);
>  
>          my $volid;
>          if ($parent && $parent =~ m!^../(\d+)/([^/]+\.($fmts))$!) {
> @@ -1608,7 +1664,7 @@ sub list_images {
>  
>          if ($vollist) {
>              my $found = grep { $_ eq $volid } @$vollist;
> -            next if !$found;
> +            return if !$found;
>          }
>  
>          my $info = {
> @@ -1620,9 +1676,19 @@ sub list_images {
>              parent => $parent,
>          };
>  
> +        # Only add vtype if it is not 'images'...
> +        $info->{vtype} = $current_type if defined($current_type);
>          $info->{ctime} = $ctime if $ctime;
>  
>          push @$res, $info;
> +    };
> +
> +    my %dedup;
> +    for my $dir_entry (@image_dirs) {
> +        ($current_type, my $dir) = @$dir_entry;
> +        next if $dedup{$dir};
> +        $dedup{$dir} = 1;
> +        foreach_guest_file($dir, $code);
>      }
>  
>      return $res;
> @@ -1709,12 +1775,29 @@ sub list_volumes {
>  
>      my $res = [];
>      my $vmlist = PVE::Cluster::get_vmlist();
> +
> +    my $guest_dirs = 0;
> +    my $DIRS_IMAGES = 1 << 0;
> +    my $DIRS_VMS = 1 << 1;
> +    my $DIRS_CTS = 1 << 2;
> +    my $DIRS_ALL = $DIRS_IMAGES | $DIRS_VMS | $DIRS_CTS;
>      foreach my $type (@$content_types) {
>          my $data;
> +        if ($type eq 'images') {
> +            $guest_dirs |= $DIRS_IMAGES | $DIRS_VMS;
> +            next;
> +        } elsif ($type eq 'rootdir') {
> +            $guest_dirs |= $DIRS_IMAGES | $DIRS_CTS;
> +            next;
> +        } elsif ($type eq 'vm-vol') {
> +            $guest_dirs |= $DIRS_VMS;
> +            next;
> +        } elsif ($type eq 'ct-vol') {
> +            $guest_dirs |= $DIRS_CTS;
> +            next;
> +        }
>  
> -        if ($type eq 'images' || $type eq 'rootdir') {
> -            $data = $class->list_images($storeid, $scfg, $vmid);
> -        } elsif ($scfg->{path}) {
> +        if ($scfg->{path}) {
>              my $path = $class->get_subdir($scfg, $type);
>  
>              if ($type eq 'iso' && !defined($vmid)) {
> @@ -1733,7 +1816,32 @@ sub list_volumes {
>          next if !$data;
>  
>          foreach my $item (@$data) {
> -            if ($type eq 'images' || $type eq 'rootdir') {
> +            $item->{content} = $type;
> +            push @$res, $item;
> +        }
> +    }
> +
> +    if ($guest_dirs) {
> +        my $data;
> +
> +        if ($guest_dirs == $DIRS_ALL) {
> +            $data = $class->list_images($storeid, $scfg, $vmid, undef, undef, undef);
> +        } elsif ($guest_dirs == ($DIRS_IMAGES | $DIRS_VMS)) {
> +            $data = $class->list_images($storeid, $scfg, $vmid, undef, undef, 'images');
> +        } elsif ($guest_dirs == ($DIRS_IMAGES | $DIRS_CTS)) {
> +            $data = $class->list_images($storeid, $scfg, $vmid, undef, undef, 'rootdir');
> +        } elsif ($guest_dirs == $DIRS_VMS) {
> +            $data = $class->list_images($storeid, $scfg, $vmid, undef, undef, 'vm-vol');
> +        } elsif ($guest_dirs == $DIRS_CTS) {
> +            $data = $class->list_images($storeid, $scfg, $vmid, undef, undef, 'ct-vol');
> +        } else {
> +            die "unexpected request to list only untyped images\n";
> +        }
> +
> +        for my $item (@$data) {
> +            if (defined(my $vtype = $item->{vtype})) {
> +                $item->{content} = $vtype;
> +            } else {
>                  my $vminfo = $vmlist->{ids}->{ $item->{vmid} };
>                  my $vmtype;
>                  if (defined($vminfo)) {
> @@ -1744,9 +1852,6 @@ sub list_volumes {
>                  } else {
>                      $item->{content} = 'images';
>                  }
> -                next if $type ne $item->{content};
> -            } else {
> -                $item->{content} = $type;
>              }
>  
>              push @$res, $item;
> -- 
> 2.47.2
> 
> 
> 
> _______________________________________________
> pve-devel mailing list
> pve-devel@lists.proxmox.com
> https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
> 
> 
> 


_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] 74+ messages in thread

* Re: [pve-devel] [PATCH storage 12/26] plugin: support new vtypes in activate_storage checks
  2025-07-29 11:15 ` [pve-devel] [PATCH storage 12/26] plugin: support new vtypes in activate_storage checks Wolfgang Bumiller
@ 2025-07-30  8:36   ` Fabian Grünbichler
  2025-08-08 13:16     ` Wolfgang Bumiller
  0 siblings, 1 reply; 74+ messages in thread
From: Fabian Grünbichler @ 2025-07-30  8:36 UTC (permalink / raw)
  To: Proxmox VE development discussion

On July 29, 2025 1:15 pm, Wolfgang Bumiller wrote:
> Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
> ---
>  src/PVE/Storage/Plugin.pm | 20 ++++++++++++++++++--
>  1 file changed, 18 insertions(+), 2 deletions(-)
> 
> diff --git a/src/PVE/Storage/Plugin.pm b/src/PVE/Storage/Plugin.pm
> index 98788d1..047b2fc 100644
> --- a/src/PVE/Storage/Plugin.pm
> +++ b/src/PVE/Storage/Plugin.pm
> @@ -1882,15 +1882,31 @@ sub activate_storage {
>  
>          # check that content dirs are pairwise inequal
>          my $resolved_subdirs = {};
> -        for my $vtype (sort keys $scfg->{content}->%*) {
> +        my %done;
> +        my $check = sub {
> +            my ($vtype) = @_;
> +
> +            return if $done{$vtype};
> +            $done{$vtype} = 1;
> +
>              my $subdir = $class->get_subdir($scfg, $vtype);
>              my $abs_subdir = abs_path($subdir);
> -            next if !defined($abs_subdir);
> +            return if !defined($abs_subdir);
>  
>              die "storage '$storeid' uses directory $abs_subdir for multiple content types\n"
>                  if defined($abs_subdir) && defined($resolved_subdirs->{$abs_subdir});
>  
>              $resolved_subdirs->{$abs_subdir} = 1;
> +        };
> +        for my $vtype (sort keys $scfg->{content}->%*) {
> +            if ($vtype eq 'images') {

shouldn't we also check for 'images' as well? we don't want that to
overlap with vm-vol or ct-vol!

> +                $check->('vm-vol');
> +                $check->('ct-vol');
> +            } elsif ($vtype eq 'rootdir') {

same here, since this was actually mapped to the dir for 'images' in
practice?

> +                $check->('ct-vol');
> +            } else {
> +                $check->($vtype);
> +            }
>          }
>      }
>  }
> -- 
> 2.47.2
> 
> 
> 
> _______________________________________________
> pve-devel mailing list
> pve-devel@lists.proxmox.com
> https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
> 
> 
> 


_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] 74+ messages in thread

* Re: [pve-devel] [PATCH storage 10/26] plugins: update volname parsing for new naming convention
  2025-07-29 11:15 ` [pve-devel] [PATCH storage 10/26] plugins: update volname parsing for new naming convention Wolfgang Bumiller
@ 2025-07-30  8:37   ` Fabian Grünbichler
  2025-07-30  8:53     ` Wolfgang Bumiller
  0 siblings, 1 reply; 74+ messages in thread
From: Fabian Grünbichler @ 2025-07-30  8:37 UTC (permalink / raw)
  To: Proxmox VE development discussion

On July 29, 2025 1:15 pm, Wolfgang Bumiller wrote:
> - ESXi, ISCSIDirect, ISCSI:
>   Volumes are always vm volumes.
> - LVM:
>   New volumes use a `vol-vm-` or `vol-ct-` prefix.
> - Dir based, LvmThin, RBD:
>   Like LVM, but for base images a `base-` prefix is added
>   *additionally*, instead of *replacing* the `vm-` portion like we
>   used to.
> - ZFS:
>   VMs: `vol-vm-` prefix.
>   Containers: `subvol-ct-` prefix.

we could get rid of this historic anomaly while we're at it, and make
the new vtype just encoded as vol-ct for consistency - that those are
always filesystem datasets, and the vol-vm ones always zvols is an
implementation detail then?

>   Both also get an optional additional `base-` prefix for base
>   volumes.
> 
> Note: all new base- prefix come in front of the `(sub)vol-*` prefixes.
> 
> Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
> ---
>  src/PVE/Storage/ESXiPlugin.pm        |  2 +-
>  src/PVE/Storage/ISCSIDirectPlugin.pm |  2 +-
>  src/PVE/Storage/ISCSIPlugin.pm       |  2 +-
>  src/PVE/Storage/LVMPlugin.pm         | 19 ++++++++---
>  src/PVE/Storage/LvmThinPlugin.pm     | 13 ++++++++
>  src/PVE/Storage/Plugin.pm            | 48 +++++++++++++++++++++-------
>  src/PVE/Storage/RBDPlugin.pm         | 45 ++++++++++++++++++++++++--
>  src/PVE/Storage/ZFSPoolPlugin.pm     | 34 ++++++++++++++++----
>  8 files changed, 138 insertions(+), 27 deletions(-)
> 
> diff --git a/src/PVE/Storage/ESXiPlugin.pm b/src/PVE/Storage/ESXiPlugin.pm
> index eeb6a48..ea2f8f9 100644
> --- a/src/PVE/Storage/ESXiPlugin.pm
> +++ b/src/PVE/Storage/ESXiPlugin.pm
> @@ -421,7 +421,7 @@ sub parse_volname {
>  
>      my $format = 'raw';
>      $format = 'vmdk' if $volname =~ /\.vmdk$/;
> -    return ('images', $volname, 0, undef, undef, undef, $format);
> +    return ('vm-vol', $volname, 0, undef, undef, undef, $format);
>  }
>  
>  sub list_images {
> diff --git a/src/PVE/Storage/ISCSIDirectPlugin.pm b/src/PVE/Storage/ISCSIDirectPlugin.pm
> index 069a41f..f5b466e 100644
> --- a/src/PVE/Storage/ISCSIDirectPlugin.pm
> +++ b/src/PVE/Storage/ISCSIDirectPlugin.pm
> @@ -87,7 +87,7 @@ sub parse_volname {
>      my ($class, $volname) = @_;
>  
>      if ($volname =~ m/^lun(\d+)$/) {
> -        return ('images', $1, undef, undef, undef, undef, 'raw');
> +        return ('vm-vol', $1, undef, undef, undef, undef, 'raw');
>      }
>  
>      die "unable to parse iscsi volume name '$volname'\n";
> diff --git a/src/PVE/Storage/ISCSIPlugin.pm b/src/PVE/Storage/ISCSIPlugin.pm
> index 7b30955..4875a1f 100644
> --- a/src/PVE/Storage/ISCSIPlugin.pm
> +++ b/src/PVE/Storage/ISCSIPlugin.pm
> @@ -371,7 +371,7 @@ sub parse_volname {
>      my ($class, $volname) = @_;
>  
>      if ($volname =~ m!^\d+\.\d+\.\d+\.([^/\s]+)$!) {
> -        return ('images', $1, undef, undef, undef, undef, 'raw');
> +        return ('vm-vol', $1, undef, undef, undef, undef, 'raw');
>      }
>  
>      die "unable to parse iscsi volume name '$volname'\n";
> diff --git a/src/PVE/Storage/LVMPlugin.pm b/src/PVE/Storage/LVMPlugin.pm
> index 6694cf2..9b88c6a 100644
> --- a/src/PVE/Storage/LVMPlugin.pm
> +++ b/src/PVE/Storage/LVMPlugin.pm
> @@ -452,11 +452,22 @@ sub parse_volname {
>  
>      PVE::Storage::Plugin::parse_lvm_name($volname);
>  
> -    if ($volname =~ m/^(vm-(\d+)-\S+)$/) {
> -        my $name = $1;
> -        my $vmid = $2;
> +    if (
> +        $volname =~ m!^(?<name>
> +        (
> +            # New style volumes have a vtype:
> +              vol-(?<vtype>vm|ct)
> +
> +            # Old style:
> +            | vm
> +        )
> +        -(?<vmid>\d+)-\S+
> +        )$!xn
> +    ) {
> +        my ($name, $vmid, $vtype) = @+{qw(name vmid vtype)};
> +        $vtype = $vtype ? "$vtype-vol" : 'images';
>          my $format = $volname =~ m/\.qcow2$/ ? 'qcow2' : 'raw';
> -        return ('images', $name, $vmid, undef, undef, undef, $format);
> +        return ($vtype, $name, $vmid, undef, undef, undef, $format);
>      }
>  
>      die "unable to parse lvm volume name '$volname'\n";
> diff --git a/src/PVE/Storage/LvmThinPlugin.pm b/src/PVE/Storage/LvmThinPlugin.pm
> index cdf0fd0..751bd7b 100644
> --- a/src/PVE/Storage/LvmThinPlugin.pm
> +++ b/src/PVE/Storage/LvmThinPlugin.pm
> @@ -77,6 +77,19 @@ sub parse_volname {
>  
>      PVE::Storage::Plugin::parse_lvm_name($volname);
>  
> +    # New naming convention:
> +    if (
> +        $volname =~ m/^(?<name>
> +        (?<isbase>base-)?
> +        (?:vol-(?<vtype> vm|ct))-
> +        (?<vmid>\d+)-
> +        \S+)$/xn
> +    ) {
> +        my ($name, $vmid, $vtype, $isbase) = @+{qw(name vmid vtype isbase)};
> +        return ($vtype . '-vol', $name, $vmid, undef, undef, !!$isbase, 'raw');
> +    }
> +
> +    # Old naming convention:
>      if ($volname =~ m/^((vm|base)-(\d+)-\S+)$/) {
>          return ('images', $1, $3, undef, undef, $2 eq 'base', 'raw');
>      }
> diff --git a/src/PVE/Storage/Plugin.pm b/src/PVE/Storage/Plugin.pm
> index ae9d673..77bcfc7 100644
> --- a/src/PVE/Storage/Plugin.pm
> +++ b/src/PVE/Storage/Plugin.pm
> @@ -711,19 +711,46 @@ sub cluster_lock_storage {
>  my sub parse_snap_name {
>      my ($name) = @_;
>  
> +    if ($name =~ m/^snap-(.*)-vol-(?:vm|ct)(.*)$/) {
> +        return $1;
> +    }
> +
>      if ($name =~ m/^snap-(.*)-vm(.*)$/) {
>          return $1;
>      }
> +
> +    return;
>  }
>  
> +our $DISK_NAME_REGEX = qr!
> +    (?<name>
> +        (
> +            # New convention: 'base-' prefix, 'vol-vm' and 'subvol-ct'.
> +              (?<israw> (?<isbase>base-)? vol-    (?<vtype> vm|ct))
> +            | (?<issub> (?<isbase>base-)? subvol- (?<vtype> ct))
> +
> +            # Old convention: "vm" vs "base" and "subvol" vs "basevol"
> +            | (?<israw> vm)

`israw` is a weird identifier here. it's also not used anywhere, so
maybe we could drop it for now and think of a better name if we ever
need it?

> +            | (?<issub> subvol)
> +            | (?<israw> (?<isbase>base))
> +            | (?<issub> (?<isbase>basevol))

the old convention was actually a lot more loose, see below..

we probably should add a warning to pve8to9 for volumes on builtin
storage types that don't match this strict scheme at least?

> +        )
> +        -
> +        (?<vmid>\d+)
> +        -
> +        (?<label>[^/\s]+)
> +    )
> +!xn;
> +
>  sub parse_name_dir {
> -    my $name = shift;
> +    my ($name) = @_;
>  
> -    if ($name =~ m!^((vm-|base-|subvol-)(\d+)-[^/\s]+\.(raw|qcow2|vmdk|subvol))$!) {
> -        my $isbase = $2 eq 'base-' ? $2 : undef;
> -        return ($1, $4, $isbase); # (name, format, isBase)
> +    if ($name =~ m!^$DISK_NAME_REGEX\.(?<format>raw|qcow2|vmdk|subvol)$!xn) {
> +        my ($name, $israw, $issub, $isbase, $vmid, $vtype, $label, $format) =
> +            @+{qw(name israw issub isbase vmid vtype label format)};
> +        return ($name, $format, !!$isbase, $vtype ? "$vtype-vol" : "images");
>      } elsif ($name =~ m!^((base-)?[^/\s]+\.(raw|qcow2|vmdk|subvol))$!) {
> -        warn "this volume name `$name` is not supported anymore\n" if !parse_snap_name($name);
> +        die "this volume name `$name` is not supported anymore\n";

as discussed off list, this regressed recently and needs to be fixed -
we only want to skip snapshot volumes, and allow other things for the
legacy types..

>      }
>  
>      die "unable to parse volume filename '$name'\n";
> @@ -733,15 +760,14 @@ sub parse_volname {
>      my ($class, $volname) = @_;
>  
>      if ($volname =~ m!^(\d+)/(\S+)/(\d+)/(\S+)$!) {
> -        my ($basedvmid, $basename) = ($1, $2);
> +        my ($basedvmid, $basename, $vmid, $name) = ($1, $2, $3, $4);
>          parse_name_dir($basename);
> -        my ($vmid, $name) = ($3, $4);
> -        my (undef, $format, $isBase) = parse_name_dir($name);
> -        return ('images', $name, $vmid, $basename, $basedvmid, $isBase, $format);
> +        my (undef, $format, $isBase, $vtype) = parse_name_dir($name);
> +        return ($vtype, $name, $vmid, $basename, $basedvmid, $isBase, $format);
>      } elsif ($volname =~ m!^(\d+)/(\S+)$!) {
>          my ($vmid, $name) = ($1, $2);
> -        my (undef, $format, $isBase) = parse_name_dir($name);
> -        return ('images', $name, $vmid, undef, undef, $isBase, $format);
> +        my (undef, $format, $isBase, $vtype) = parse_name_dir($name);
> +        return ($vtype, $name, $vmid, undef, undef, $isBase, $format);
>      } elsif ($volname =~ m!^iso/([^/]+$PVE::Storage::ISO_EXT_RE_0)$!) {
>          return ('iso', $1, undef, undef, undef, undef, 'raw');
>      } elsif ($volname =~ m!^vztmpl/([^/]+$PVE::Storage::VZTMPL_EXT_RE_1)$!) {

[..]


_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] 74+ messages in thread

* Re: [pve-devel] [PATCH storage 09/26] plugins: add new content types to all plugindata
  2025-07-29 11:15 ` [pve-devel] [PATCH storage 09/26] plugins: add new content types to all plugindata Wolfgang Bumiller
@ 2025-07-30  8:38   ` Fabian Grünbichler
  2025-08-08 12:10     ` Wolfgang Bumiller
  0 siblings, 1 reply; 74+ messages in thread
From: Fabian Grünbichler @ 2025-07-30  8:38 UTC (permalink / raw)
  To: Proxmox VE development discussion

question - do we also want to add them to existing configs on updates?
or on RMW cycles, always implying that as long as images is set vm-vol
is also set, and same for rootdir ct-vol (but obviously not the other
way round ;))?

that might allow us to get rid of some of the extra compat mapping in
code..

On July 29, 2025 1:15 pm, Wolfgang Bumiller wrote:
> Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
> ---
>  src/PVE/Storage/BTRFSPlugin.pm       |  4 +++-
>  src/PVE/Storage/CIFSPlugin.pm        |  4 +++-
>  src/PVE/Storage/DirPlugin.pm         |  4 +++-
>  src/PVE/Storage/ISCSIDirectPlugin.pm |  2 +-
>  src/PVE/Storage/ISCSIPlugin.pm       |  2 +-
>  src/PVE/Storage/LVMPlugin.pm         | 10 +++++++++-
>  src/PVE/Storage/LvmThinPlugin.pm     | 15 ++++++++++++++-
>  src/PVE/Storage/NFSPlugin.pm         |  4 +++-
>  src/PVE/Storage/RBDPlugin.pm         | 10 +++++++++-
>  src/PVE/Storage/ZFSPlugin.pm         |  2 +-
>  src/PVE/Storage/ZFSPoolPlugin.pm     | 15 ++++++++++++++-
>  11 files changed, 61 insertions(+), 11 deletions(-)
> 
> diff --git a/src/PVE/Storage/BTRFSPlugin.pm b/src/PVE/Storage/BTRFSPlugin.pm
> index bd2c0bf..d1c0cf9 100644
> --- a/src/PVE/Storage/BTRFSPlugin.pm
> +++ b/src/PVE/Storage/BTRFSPlugin.pm
> @@ -35,6 +35,8 @@ sub plugindata {
>              {
>                  images => 1,
>                  rootdir => 1,
> +                'vm-vol' => 1,
> +                'ct-vol' => 1,
>                  vztmpl => 1,
>                  iso => 1,
>                  backup => 1,
> @@ -42,7 +44,7 @@ sub plugindata {
>                  none => 1,
>                  import => 1,
>              },
> -            { images => 1, rootdir => 1 },
> +            { 'vm-vol' => 1, 'ct-vol' => 1, images => 1, rootdir => 1 },
>          ],
>          format => [{ raw => 1, subvol => 1 }, 'raw'],
>          'sensitive-properties' => {},
> diff --git a/src/PVE/Storage/CIFSPlugin.pm b/src/PVE/Storage/CIFSPlugin.pm
> index 75d89c1..5d59c7c 100644
> --- a/src/PVE/Storage/CIFSPlugin.pm
> +++ b/src/PVE/Storage/CIFSPlugin.pm
> @@ -102,13 +102,15 @@ sub plugindata {
>              {
>                  images => 1,
>                  rootdir => 1,
> +                'vm-vol' => 1,
> +                'ct-vol' => 1,
>                  vztmpl => 1,
>                  iso => 1,
>                  backup => 1,
>                  snippets => 1,
>                  import => 1,
>              },
> -            { images => 1 },
> +            { 'vm-vol' => 1, images => 1 },
>          ],
>          format => [{ raw => 1, qcow2 => 1, vmdk => 1 }, 'raw'],
>          'sensitive-properties' => { password => 1 },
> diff --git a/src/PVE/Storage/DirPlugin.pm b/src/PVE/Storage/DirPlugin.pm
> index 9d15f33..53aded3 100644
> --- a/src/PVE/Storage/DirPlugin.pm
> +++ b/src/PVE/Storage/DirPlugin.pm
> @@ -28,6 +28,8 @@ sub plugindata {
>              {
>                  images => 1,
>                  rootdir => 1,
> +                'vm-vol' => 1,
> +                'ct-vol' => 1,
>                  vztmpl => 1,
>                  iso => 1,
>                  backup => 1,
> @@ -35,7 +37,7 @@ sub plugindata {
>                  none => 1,
>                  import => 1,
>              },
> -            { images => 1, rootdir => 1 },
> +            { 'vm-vol' => 1, 'ct-vol' => 1, images => 1, rootdir => 1 },
>          ],
>          format => [{ raw => 1, qcow2 => 1, vmdk => 1, subvol => 1 }, 'raw'],
>          'sensitive-properties' => {},
> diff --git a/src/PVE/Storage/ISCSIDirectPlugin.pm b/src/PVE/Storage/ISCSIDirectPlugin.pm
> index 62e9026..069a41f 100644
> --- a/src/PVE/Storage/ISCSIDirectPlugin.pm
> +++ b/src/PVE/Storage/ISCSIDirectPlugin.pm
> @@ -64,7 +64,7 @@ sub type {
>  
>  sub plugindata {
>      return {
> -        content => [{ images => 1, none => 1 }, { images => 1 }],
> +        content => [{ 'vm-vol' => 1, images => 1, none => 1 }, { 'vm-vol' => 1, images => 1 }],
>          select_existing => 1,
>          'sensitive-properties' => {},
>      };
> diff --git a/src/PVE/Storage/ISCSIPlugin.pm b/src/PVE/Storage/ISCSIPlugin.pm
> index 7691ec6..7b30955 100644
> --- a/src/PVE/Storage/ISCSIPlugin.pm
> +++ b/src/PVE/Storage/ISCSIPlugin.pm
> @@ -334,7 +334,7 @@ sub type {
>  
>  sub plugindata {
>      return {
> -        content => [{ images => 1, none => 1 }, { images => 1 }],
> +        content => [{ 'vm-vol' => 1, images => 1, none => 1 }, { 'vm-vol' => 1, images => 1 }],
>          select_existing => 1,
>          'sensitive-properties' => {},
>      };
> diff --git a/src/PVE/Storage/LVMPlugin.pm b/src/PVE/Storage/LVMPlugin.pm
> index c1f5474..6694cf2 100644
> --- a/src/PVE/Storage/LVMPlugin.pm
> +++ b/src/PVE/Storage/LVMPlugin.pm
> @@ -354,7 +354,15 @@ sub type {
>  
>  sub plugindata {
>      return {
> -        content => [{ images => 1, rootdir => 1 }, { images => 1 }],
> +        content => [
> +            {
> +                'vm-vol' => 1,
> +                'ct-vol' => 1,
> +                images => 1,
> +                rootdir => 1,
> +            },
> +            { 'vm-vol' => 1, images => 1 },
> +        ],
>          format => [{ raw => 1, qcow2 => 1 }, 'raw'],
>          'sensitive-properties' => {},
>      };
> diff --git a/src/PVE/Storage/LvmThinPlugin.pm b/src/PVE/Storage/LvmThinPlugin.pm
> index ccefd0e..cdf0fd0 100644
> --- a/src/PVE/Storage/LvmThinPlugin.pm
> +++ b/src/PVE/Storage/LvmThinPlugin.pm
> @@ -30,7 +30,20 @@ sub type {
>  
>  sub plugindata {
>      return {
> -        content => [{ images => 1, rootdir => 1 }, { images => 1, rootdir => 1 }],
> +        content => [
> +            {
> +                'vm-vol' => 1,
> +                'ct-vol' => 1,
> +                images => 1,
> +                rootdir => 1,
> +            },
> +            {
> +                'vm-vol' => 1,
> +                'ct-vol' => 1,
> +                images => 1,
> +                rootdir => 1,
> +            },
> +        ],
>          'sensitive-properties' => {},
>      };
>  }
> diff --git a/src/PVE/Storage/NFSPlugin.pm b/src/PVE/Storage/NFSPlugin.pm
> index a8339ef..4c23cd5 100644
> --- a/src/PVE/Storage/NFSPlugin.pm
> +++ b/src/PVE/Storage/NFSPlugin.pm
> @@ -57,13 +57,15 @@ sub plugindata {
>              {
>                  images => 1,
>                  rootdir => 1,
> +                'vm-vol' => 1,
> +                'ct-vol' => 1,
>                  vztmpl => 1,
>                  iso => 1,
>                  backup => 1,
>                  snippets => 1,
>                  import => 1,
>              },
> -            { images => 1 },
> +            { 'vm-vol' => 1, images => 1 },
>          ],
>          format => [{ raw => 1, qcow2 => 1, vmdk => 1 }, 'raw'],
>          'sensitive-properties' => {},
> diff --git a/src/PVE/Storage/RBDPlugin.pm b/src/PVE/Storage/RBDPlugin.pm
> index cf371c7..9f95c73 100644
> --- a/src/PVE/Storage/RBDPlugin.pm
> +++ b/src/PVE/Storage/RBDPlugin.pm
> @@ -392,7 +392,15 @@ sub type {
>  
>  sub plugindata {
>      return {
> -        content => [{ images => 1, rootdir => 1 }, { images => 1 }],
> +        content => [
> +            {
> +                'vm-vol' => 1,
> +                'ct-vol' => 1,
> +                images => 1,
> +                rootdir => 1,
> +            },
> +            { 'vm-vol' => 1, images => 1 },
> +        ],
>          'sensitive-properties' => { keyring => 1 },
>      };
>  }
> diff --git a/src/PVE/Storage/ZFSPlugin.pm b/src/PVE/Storage/ZFSPlugin.pm
> index 99d8c8f..a05f521 100644
> --- a/src/PVE/Storage/ZFSPlugin.pm
> +++ b/src/PVE/Storage/ZFSPlugin.pm
> @@ -175,7 +175,7 @@ sub type {
>  
>  sub plugindata {
>      return {
> -        content => [{ images => 1 }, { images => 1 }],
> +        content => [{ 'vm-vol' => 1, images => 1 }, { 'vm-vol' => 1, images => 1 }],
>          'sensitive-properties' => {},
>      };
>  }
> diff --git a/src/PVE/Storage/ZFSPoolPlugin.pm b/src/PVE/Storage/ZFSPoolPlugin.pm
> index cdf5868..0152c89 100644
> --- a/src/PVE/Storage/ZFSPoolPlugin.pm
> +++ b/src/PVE/Storage/ZFSPoolPlugin.pm
> @@ -20,7 +20,20 @@ sub type {
>  
>  sub plugindata {
>      return {
> -        content => [{ images => 1, rootdir => 1 }, { images => 1, rootdir => 1 }],
> +        content => [
> +            {
> +                'vm-vol' => 1,
> +                'ct-vol' => 1,
> +                images => 1,
> +                rootdir => 1,
> +            },
> +            {
> +                'vm-vol' => 1,
> +                'ct-vol' => 1,
> +                images => 1,
> +                rootdir => 1,
> +            },
> +        ],
>          format => [{ raw => 1, subvol => 1 }, 'raw'],
>          'sensitive-properties' => {},
>      };
> -- 
> 2.47.2
> 
> 
> 
> _______________________________________________
> pve-devel mailing list
> pve-devel@lists.proxmox.com
> https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
> 
> 
> 


_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] 74+ messages in thread

* Re: [pve-devel] [PATCH storage 08/26] prepare for vm-vol and ct-vol content and vtypes
  2025-07-29 11:15 ` [pve-devel] [PATCH storage 08/26] prepare for vm-vol and ct-vol content and vtypes Wolfgang Bumiller
@ 2025-07-30  8:38   ` Fabian Grünbichler
  2025-08-08 12:01     ` Wolfgang Bumiller
  2025-07-30  9:14   ` Fabian Grünbichler
  1 sibling, 1 reply; 74+ messages in thread
From: Fabian Grünbichler @ 2025-07-30  8:38 UTC (permalink / raw)
  To: Proxmox VE development discussion

On July 29, 2025 1:15 pm, Wolfgang Bumiller wrote:
> Prepares the stoplevel PVE::Storage API updates as well as adding the
> new vtype subdirs to the base plugin's vtype subdir hash.
> 
> The new types are "vm-vol" and "ct-vol". They represent VM and
> container volumes, respectively. The "images" and "rootdir" types are
> considered legacy/deprecated, as the "rootdir" type was not properly
> used, and container volumes were technically of type "images", with
> the "rootdir" case "hacked in" by checking the existing VMs.
> 
> To more easily transition, the "images" type is now also a "supertype"
> of "vm-vol", and the "rootdir" type a "supertype" of "ct-vol".
> 
> - `get_images_dir()` is replaced by `get_vm_volume_dir()`
> - `get_private_dir()` is dropped as it is an openvz leftover
> - `get_ct_volume_dir()` is added its stead
> 
> We now also unify the vtypes and content types. As such,
> `content-dirs` can now include separate dirs for `vm-vol` and
> `ct-vol`.
> This is now also taken into account in `path_to_volume_id()` which
> tries to match file system paths to a storage and content type.
> 
> The following subs also get a $vtype parameter:
> - `vdisk_alloc()`
> - `vdisk_clone()`
> - `volume_import()`
> 
> `volume_list()`'s `$content` parameter allows `vm-vol` and
> `ct-vol` as type.
> 
> New helpers are added:
> - is_content_type_covered($content_hash, $content_type)
>   Check if the contents listed in the hash(set) allows the provided
>   $content_type.
>   Meaning the content type is in the set *or* as supertype is in the
>   set (see above).
> - storage_check_type_allowed($cfg, $storeid, $type [, $noerr])
>   Access to the above in our usual public storag API signature.
> 
> Finally: the content type completion also gets the new content types.
> 
> Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
> ---
>  src/PVE/GuestImport.pm    |   2 +-
>  src/PVE/Storage.pm        | 113 ++++++++++++++++++++++++++++++--------
>  src/PVE/Storage/Plugin.pm |   4 +-
>  3 files changed, 95 insertions(+), 24 deletions(-)
> 
> diff --git a/src/PVE/GuestImport.pm b/src/PVE/GuestImport.pm
> index 3d59dcd..ec2f09d 100644
> --- a/src/PVE/GuestImport.pm
> +++ b/src/PVE/GuestImport.pm
> @@ -40,7 +40,7 @@ sub extract_disk_from_import_file {
>  
>      my $ova_path = PVE::Storage::path($cfg, $archive_volid);
>  
> -    my $tmpdir = PVE::Storage::get_image_dir($cfg, $target_storeid, $vmid);
> +    my $tmpdir = PVE::Storage::get_vm_volume_dir($cfg, $target_storeid, $vmid);
>      my $pid = $$;
>      $tmpdir .= "/tmp_${pid}_${vmid}";
>      mkpath $tmpdir;
> diff --git a/src/PVE/Storage.pm b/src/PVE/Storage.pm
> index da53beb..91a0278 100755
> --- a/src/PVE/Storage.pm
> +++ b/src/PVE/Storage.pm
> @@ -547,24 +547,24 @@ sub volume_snapshot_info {
>      return $plugin->volume_snapshot_info($scfg, $storeid, $volname);
>  }
>  
> -sub get_image_dir {
> +sub get_vm_volume_dir {
>      my ($cfg, $storeid, $vmid) = @_;
>  
>      my $scfg = storage_config($cfg, $storeid);
>      my $plugin = PVE::Storage::Plugin->lookup($scfg->{type});
>  
> -    my $path = $plugin->get_subdir($scfg, 'images');
> +    my $path = $plugin->get_subdir($scfg, 'vm-vol');
>  
>      return $vmid ? "$path/$vmid" : $path;
>  }

this one is only used by GuestImport above AFAICT, should we use this
opportunity and give it a better name to make it clear that this should
not be used in general? we use it there to get a base path for creating
a tmpdir inside for extracting the OVA, and might want to switch to some
other subdir in the future..

>  
> -sub get_private_dir {
> +sub get_ct_volume_dir {
>      my ($cfg, $storeid, $vmid) = @_;
>  
>      my $scfg = storage_config($cfg, $storeid);
>      my $plugin = PVE::Storage::Plugin->lookup($scfg->{type});
>  
> -    my $path = $plugin->get_subdir($scfg, 'rootdir');
> +    my $path = $plugin->get_subdir($scfg, 'ct-vol');
>  
>      return $vmid ? "$path/$vmid" : $path;
>  }

this one is not used anywhere, should we drop it?

> @@ -737,22 +737,26 @@ sub path_to_volume_id {
>          next if !$scfg->{path};
>          my $plugin = PVE::Storage::Plugin->lookup($scfg->{type});
>          my $imagedir = $plugin->get_subdir($scfg, 'images');
> +        my $vmdir = $plugin->get_subdir($scfg, 'vm-vol');
> +        my $ctdir = $plugin->get_subdir($scfg, 'ct-vol');
>          my $isodir = $plugin->get_subdir($scfg, 'iso');
>          my $tmpldir = $plugin->get_subdir($scfg, 'vztmpl');
>          my $backupdir = $plugin->get_subdir($scfg, 'backup');
>          my $snippetsdir = $plugin->get_subdir($scfg, 'snippets');
>          my $importdir = $plugin->get_subdir($scfg, 'import');
>  
> -        if ($path =~ m!^\Q$imagedir\E/(\d+)/([^/\s]+)$!) {
> -            my $vmid = $1;
> -            my $name = $2;
> +        if ($path =~ m!^(\Q$imagedir\E|\Q$vmdir\E|\Q$ctdir\E)/(\d+)/([^/\s]+)$!) {
> +            my $subdir = $1;
> +            my $vmid = $2;
> +            my $name = $3;
>  
>              my $vollist = $plugin->list_images($sid, $scfg, $vmid);
>              foreach my $info (@$vollist) {
>                  my ($storeid, $volname) = parse_volume_id($info->{volid});
> +                my ($vtype) = parse_volname($cfg, $info->{volid});
>                  my $volpath = $plugin->path($scfg, $volname, $storeid);
>                  if ($volpath eq $path) {
> -                    return ('images', $info->{volid});
> +                    return ($vtype, $info->{volid});
>                  }
>              }
>          } elsif ($path =~ m!^\Q$isodir\E/([^/]+$ISO_EXT_RE_0)$!) {
> @@ -822,7 +826,7 @@ sub qemu_blockdev_options {
>  
>      my ($vtype) = $plugin->parse_volname($volname);
>      die "cannot use volume of type '$vtype' as a QEMU blockdevice\n"
> -        if $vtype ne 'images' && $vtype ne 'iso' && $vtype ne 'import';
> +        if $vtype ne 'vm-vol' && $vtype ne 'images' && $vtype ne 'iso' && $vtype ne 'import';
>  
>      my $blockdev =
>          $plugin->qemu_blockdev_options($scfg, $storeid, $volname, $machine_version, $options);
> @@ -884,6 +888,7 @@ my $volume_import_prepare = sub {
>      my $with_snapshots = $opts->{with_snapshots} ? 1 : 0;
>      my $migration_snapshot = $opts->{migration_snapshot} ? 1 : 0;
>      my $allow_rename = $opts->{allow_rename} ? 1 : 0;
> +    my $vtype = $opts->{vtype};
>  
>      my $recv = ['pvesm', 'import', $volid, $format, $path, '-with-snapshots', $with_snapshots];
>      if (defined($snapshot)) {
> @@ -892,6 +897,9 @@ my $volume_import_prepare = sub {
>      if ($migration_snapshot) {
>          push @$recv, '-delete-snapshot', $snapshot;
>      }
> +    if ($vtype) {
> +        push @$recv, '-vtype', $vtype;
> +    }

should we skip this if `$vtype` is `images`, to improve backwards
compat? otherwise this would break migrating back from new to old nodes,
right?

>      push @$recv, '-allow-rename', $allow_rename;
>  
>      if (defined($base_snapshot)) {
> @@ -1099,7 +1107,7 @@ sub storage_migrate {
>  }
>  
>  sub vdisk_clone {
> -    my ($cfg, $volid, $vmid, $snap) = @_;
> +    my ($cfg, $volid, $vmid, $snap, $vtype) = @_;
>  
>      my ($storeid, $volname) = parse_volume_id($volid);
>  
> @@ -1115,7 +1123,7 @@ sub vdisk_clone {
>          $scfg->{shared},
>          undef,
>          sub {
> -            my $volname = $plugin->clone_image($scfg, $storeid, $volname, $vmid, $snap);
> +            my $volname = $plugin->clone_image($scfg, $storeid, $volname, $vmid, $snap, $vtype);
>              return "$storeid:$volname";
>          },
>      );
> @@ -1168,8 +1176,52 @@ sub unmap_volume {
>      return $plugin->unmap_volume($storeid, $scfg, $volname, $snapname);
>  }
>  
> +=head3 is_content_type_covered($content_hash, $content_type)
> +
> +Check if the C<$content_hash> allows content of type C<$content_type>.
> +
> +Note that the legacy types C<images> and C<rootdir> will allow content of type C<vm-vol> and
> +C<ct-vol> respectively, but not the other way round.
> +
> +For anything else this just checks whether C<$content_hash->{$content_type}> is set.
> +
> +=cut
> +
> +my sub is_content_type_covered : prototype($$) {
> +    my ($content_hash, $content_type) = @_;
> +
> +    return
> +        $content_hash->{$content_type}
> +        || ($content_type eq 'vm-vol' && $content_hash->{images})
> +        || ($content_type eq 'ct-vol' && $content_hash->{rootdir});
> +}
> +
> +=head3 storage_check_type_allowed($cfg, $storeid, $type [, $noerr])

should this be called by qemu-server? see comments there ;)

> +
> +Check if a storage allows content of type C<$type>.
> +
> +Note that the legacy types C<images> and C<rootdir> will allow content of type C<vm-vol> and
> +C<ct-vol> respectively, but not the other way round.
> +
> +If C<$noerr> is true, returns true if the type is allowed, false otherwise.
> +If C<$noerr> is false, dies if the type is not allowed, returns true otherwise.
> +
> +=cut
> +
> +sub storage_check_type_allowed : prototype($$$;$) {
> +    my ($cfg, $storeid, $content_type, $noerr) = @_;
> +
> +    my $scfg = storage_config($cfg, $storeid);
> +
> +    return !!1 if is_content_type_covered($scfg->{content}, $content_type);
> +    return !!0 if $noerr;
> +    die "storage '$storeid' doees not allow content of type '$content_type'\n";

typo 'doees'

> +}
> +
>  sub vdisk_alloc {
> -    my ($cfg, $storeid, $vmid, $fmt, $name, $size) = @_;
> +    my ($cfg, $storeid, $vmid, $fmt, $name, $size, $vtype) = @_;
> +
> +    die "vdisk_alloc without vtype not allowed anymore\n" if !defined($vtype);
>  
>      die "no storage ID specified\n" if !$storeid;
>  
> @@ -1187,6 +1239,8 @@ sub vdisk_alloc {
>  
>      activate_storage($cfg, $storeid);
>  
> +    storage_check_type_allowed($cfg, $storeid, $vtype);
> +
>      # lock shared storage
>      return $plugin->cluster_lock_storage(
>          $storeid,
> @@ -1195,7 +1249,7 @@ sub vdisk_alloc {
>          sub {
>              my $old_umask = umask(umask | 0037);
>              my $volname =
> -                eval { $plugin->alloc_image($storeid, $scfg, $vmid, $fmt, $name, $size) };
> +                eval { $plugin->alloc_image($storeid, $scfg, $vmid, $fmt, $name, $size, $vtype) };
>              my $err = $@;
>              umask $old_umask;
>              die $err if $err;
> @@ -1263,8 +1317,10 @@ sub vdisk_list {
>              next if $storeid && $storeid ne $sid;
>              next if !storage_check_enabled($cfg, $sid, undef, 1);
>              my $content = $ids->{$sid}->{content};
> -            next if defined($ctype) && !$content->{$ctype};
> -            next if !($content->{rootdir} || $content->{images});
> +            next if defined($ctype) && !is_content_type_covered($content, $ctype);
> +            next
> +                if !(is_content_type_covered($content, 'vm-vol')
> +                    || is_content_type_covered($content, 'ct-vol'));
>              push @$storage_list, $sid;
>          }
>      }
> @@ -1278,7 +1334,7 @@ sub vdisk_list {
>  
>          my $scfg = $ids->{$sid};
>          my $plugin = PVE::Storage::Plugin->lookup($scfg->{type});
> -        $res->{$sid} = $plugin->list_images($sid, $scfg, $vmid, $vollist, $cache);
> +        $res->{$sid} = $plugin->list_images($sid, $scfg, $vmid, $vollist, $cache, $ctype);
>          @{ $res->{$sid} } = sort { lc($a->{volid}) cmp lc($b->{volid}) } @{ $res->{$sid} }
>              if $res->{$sid};
>      }
> @@ -1318,13 +1374,15 @@ sub template_list {
>  sub volume_list {
>      my ($cfg, $storeid, $vmid, $content) = @_;
>  
> +    # We don't need to extend this by 'vm-vol' and 'ct-vol' as they are included by 'images' and
> +    # 'rootdir'.
>      my @ctypes = qw(rootdir images vztmpl iso backup snippets import);

I am not sure that's a good approach - we want to sunset 'images' and
'rootdir' at some point, and we don't allow users to opt-into not
allowing the legacy types if we do this?

>  
>      my $cts = $content ? [$content] : [@ctypes];
>  
>      my $scfg = PVE::Storage::storage_config($cfg, $storeid);
>  
> -    $cts = [grep { defined($scfg->{content}->{$_}) } @$cts];
> +    $cts = [grep { is_content_type_covered($scfg->{content}, $_) } @$cts];
>  
>      my $plugin = PVE::Storage::Plugin->lookup($scfg->{type});
>  
> @@ -2121,8 +2179,18 @@ sub volume_export : prototype($$$$$$$) {
>      );
>  }
>  
> -sub volume_import : prototype($$$$$$$$) {
> -    my ($cfg, $fh, $volid, $format, $snapshot, $base_snapshot, $with_snapshots, $allow_rename) = @_;
> +sub volume_import : prototype($$$$$$$$$) {
> +    my (
> +        $cfg,
> +        $fh,
> +        $volid,
> +        $format,
> +        $snapshot,
> +        $base_snapshot,
> +        $with_snapshots,
> +        $allow_rename,
> +        $import_vtype,
> +    ) = @_;
>  
>      my ($storeid, $volname) = parse_volume_id($volid, 1);
>      die "cannot import into volume '$volid'\n" if !$storeid;
> @@ -2138,6 +2206,7 @@ sub volume_import : prototype($$$$$$$$) {
>          $base_snapshot,
>          $with_snapshots,
>          $allow_rename,
> +        $import_vtype,
>      ) // $volid;
>  }
>  
> @@ -2288,7 +2357,7 @@ sub complete_storage_enabled {
>  sub complete_content_type {
>      my ($cmdname, $pname, $cvalue) = @_;
>  
> -    return [qw(rootdir images vztmpl iso backup snippets)];
> +    return [qw(vm-vol ct-vol rootdir images vztmpl iso backup snippets)];
>  }
>  
>  sub complete_volume {
> @@ -2326,7 +2395,7 @@ sub complete_volume {
>  }
>  
>  sub rename_volume {
> -    my ($cfg, $source_volid, $target_vmid, $target_volname) = @_;
> +    my ($cfg, $source_volid, $target_vmid, $target_volname, $vtype) = @_;
>  
>      die "no source volid provided\n" if !$source_volid;
>      die "no target VMID or target volname provided\n" if !$target_vmid && !$target_volname;
> @@ -2346,7 +2415,7 @@ sub rename_volume {
>          undef,
>          sub {
>              return $plugin->rename_volume(
> -                $scfg, $storeid, $source_volname, $target_vmid, $target_volname,
> +                $scfg, $storeid, $source_volname, $target_vmid, $target_volname, $vtype,
>              );
>          },
>      );
> diff --git a/src/PVE/Storage/Plugin.pm b/src/PVE/Storage/Plugin.pm
> index 0107976..ae9d673 100644
> --- a/src/PVE/Storage/Plugin.pm
> +++ b/src/PVE/Storage/Plugin.pm
> @@ -771,7 +771,9 @@ sub parse_volname {
>  
>  my $vtype_subdirs = {
>      images => 'images',
> -    rootdir => 'private',
> +    rootdir => 'images',
> +    'vm-vol' => 'vms',
> +    'ct-vol' => 'cts',
>      iso => 'template/iso',
>      vztmpl => 'template/cache',
>      backup => 'dump',
> -- 
> 2.47.2
> 
> 
> 
> _______________________________________________
> pve-devel mailing list
> pve-devel@lists.proxmox.com
> https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
> 
> 
> 


_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] 74+ messages in thread

* Re: [pve-devel] [PATCH qemu-server 04/10] expect 'vm-vol' vtype wherever 'images' was expected
  2025-07-29 11:15 ` [pve-devel] [PATCH qemu-server 04/10] expect 'vm-vol' vtype wherever 'images' was expected Wolfgang Bumiller
@ 2025-07-30  8:40   ` Fabian Grünbichler
  2025-07-30  9:17   ` Fiona Ebner
  1 sibling, 0 replies; 74+ messages in thread
From: Fabian Grünbichler @ 2025-07-30  8:40 UTC (permalink / raw)
  To: Proxmox VE development discussion

On July 29, 2025 1:15 pm, Wolfgang Bumiller wrote:
> Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
> ---
>  src/PVE/API2/Qemu.pm   | 16 +++++++++-------
>  src/PVE/QemuMigrate.pm |  3 ++-
>  src/PVE/QemuServer.pm  |  6 ++++--
>  3 files changed, 15 insertions(+), 10 deletions(-)
> 
> diff --git a/src/PVE/API2/Qemu.pm b/src/PVE/API2/Qemu.pm
> index 76883a5b..deb2eae8 100644
> --- a/src/PVE/API2/Qemu.pm
> +++ b/src/PVE/API2/Qemu.pm
> @@ -191,8 +191,9 @@ my $check_storage_access = sub {
>                  PVE::Storage::check_volume_access($rpcenv, $authuser, $storecfg, $vmid, $volid);
>                  if ($storeid) {
>                      my ($vtype) = PVE::Storage::parse_volname($storecfg, $volid);
> -                    raise_param_exc({ $ds => "content type needs to be 'images' or 'iso'" })
> -                        if $vtype ne 'images' && $vtype ne 'iso';
> +                    raise_param_exc(
> +                        { $ds => "content type needs to be 'vm-vol', 'images' or 'iso'" })
> +                        if $vtype ne 'vm-vol' && $vtype ne 'images' && $vtype ne 'iso';
>                  }
>              }
>  
> @@ -206,10 +207,10 @@ my $check_storage_access = sub {
>  
>                      raise_param_exc(
>                          {
> -                            $ds =>
> -                                "$src_image has wrong type '$vtype' - needs to be 'images' or 'import'",
> +                            $ds => "$src_image has wrong type '$vtype'"
> +                                . " - needs to be 'vm-vol', 'images' or 'import'",
>                          },
> -                    ) if $vtype ne 'images' && $vtype ne 'import';
> +                    ) if $vtype ne 'vm-vol' && $vtype ne 'images' && $vtype ne 'import';
>  
>                      if (PVE::QemuServer::Helpers::needs_extraction($vtype, $fmt)) {
>                          my $extraction_scfg =
> @@ -658,8 +659,9 @@ my sub create_disks : prototype($$$$$$$$$$$) {
>              if ($storeid) {
>                  my ($vtype, $volume_format) = (checked_parse_volname($storecfg, $volid))[0, 6];
>  
> -                die "cannot use volume $volid - content type needs to be 'images' or 'iso'"
> -                    if $vtype ne 'images' && $vtype ne 'iso';
> +                die "cannot use volume $volid"
> +                    . " - content type needs to be 'vm-vol', 'images' or 'iso'"
> +                    if $vtype ne 'vm-vol' && $vtype ne 'images' && $vtype ne 'iso';
>  
>                  # TODO PVE 9 - consider disallowing setting an explicit format for managed volumes.
>                  if ($disk->{format} && $disk->{format} ne $volume_format) {
> diff --git a/src/PVE/QemuMigrate.pm b/src/PVE/QemuMigrate.pm
> index 9585e292..bdb1fce3 100644
> --- a/src/PVE/QemuMigrate.pm
> +++ b/src/PVE/QemuMigrate.pm
> @@ -168,8 +168,9 @@ sub target_storage_check_available {
>              $storecfg, $targetsid, $self->{node},
>          );
>          my ($vtype) = PVE::Storage::parse_volname($storecfg, $volid);
> +        my $ctype = $vtype eq 'vm-vol' ? 'images' : $vtype;
>          die "$volid: content type '$vtype' is not available on storage '$targetsid'\n"
> -            if !$target_scfg->{content}->{$vtype};
> +            if !$target_scfg->{content}->{$ctype};

should this use the helper in pve-storage?

>      }
>  }
>  
> diff --git a/src/PVE/QemuServer.pm b/src/PVE/QemuServer.pm
> index d004dd55..05a3be91 100644
> --- a/src/PVE/QemuServer.pm
> +++ b/src/PVE/QemuServer.pm
> @@ -8241,8 +8241,10 @@ sub check_volume_storage_type {
>      my $scfg = PVE::Storage::storage_config($storecfg, $storeid);
>      my ($vtype) = PVE::Storage::parse_volname($storecfg, $vol);
>  
> -    die "storage '$storeid' does not support content-type '$vtype'\n"
> -        if !$scfg->{content}->{$vtype};
> +    my $ctype = $vtype eq 'vm-vol' ? 'images' : $vtype;
> +
> +    die "storage '$storeid' does not support content-type '$ctype'\n"
> +        if !$scfg->{content}->{$ctype};

this as well?

>  
>      return 1;
>  }
> -- 
> 2.47.2
> 
> 
> 
> _______________________________________________
> pve-devel mailing list
> pve-devel@lists.proxmox.com
> https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
> 
> 
> 


_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] 74+ messages in thread

* Re: [pve-devel] [PATCH storage 13/26] plugin, btrfs: update list_images and list_volumes
  2025-07-30  8:36   ` Fabian Grünbichler
@ 2025-07-30  8:41     ` Fiona Ebner
  0 siblings, 0 replies; 74+ messages in thread
From: Fiona Ebner @ 2025-07-30  8:41 UTC (permalink / raw)
  To: Proxmox VE development discussion, Fabian Grünbichler

Am 30.07.25 um 10:37 AM schrieb Fabian Grünbichler:
> On July 29, 2025 1:15 pm, Wolfgang Bumiller wrote:
>> +sub foreach_guest_file : prototype($$) {
> 
> should this go into PVE::Storage::Common?
> 
>> +    my ($dir, $code) = @_;
>> +
>> +    $MAX_VMID = get_standard_option("pve-vmid")->{maximum} if !defined($MAX_VMID);
> 
>> +
>> +    dir_glob_foreach(
>> +        $dir,
>> +        qr/\d+/,
>> +        sub {
>> +            my ($vmid) = @_;
>> +            $vmid = int($vmid);
>> +            return if $vmid < 100 || $vmid > $MAX_VMID;
> 
> this now means list_images lists less than before - somebody might have
> used a very high ID as a placeholder not realizing its outside the "allowed" range..
> 
> not sure it's worth it to have this restriction here..

Or a low ID as placeholder ;)
https://bugzilla.proxmox.com/show_bug.cgi?id=6551#c5


_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

^ permalink raw reply	[flat|nested] 74+ messages in thread

* Re: [pve-devel] [PATCH storage 10/26] plugins: update volname parsing for new naming convention
  2025-07-30  8:37   ` Fabian Grünbichler
@ 2025-07-30  8:53     ` Wolfgang Bumiller
  2025-07-30  8:58       ` Fabian Grünbichler
  0 siblings, 1 reply; 74+ messages in thread
From: Wolfgang Bumiller @ 2025-07-30  8:53 UTC (permalink / raw)
  To: Fabian Grünbichler; +Cc: Proxmox VE development discussion

On Wed, Jul 30, 2025 at 10:37:27AM +0200, Fabian Grünbichler wrote:
> On July 29, 2025 1:15 pm, Wolfgang Bumiller wrote:
> > - ESXi, ISCSIDirect, ISCSI:
> >   Volumes are always vm volumes.
> > - LVM:
> >   New volumes use a `vol-vm-` or `vol-ct-` prefix.
> > - Dir based, LvmThin, RBD:
> >   Like LVM, but for base images a `base-` prefix is added
> >   *additionally*, instead of *replacing* the `vm-` portion like we
> >   used to.
> > - ZFS:
> >   VMs: `vol-vm-` prefix.
> >   Containers: `subvol-ct-` prefix.
> 
> we could get rid of this historic anomaly while we're at it, and make
> the new vtype just encoded as vol-ct for consistency - that those are
> always filesystem datasets, and the vol-vm ones always zvols is an
> implementation detail then?

But this would also make it difficult if we ever want to allow zvols
with file systems. And given that the code falls through to Plugin.pm in
some places (and dir plugins can theoretically have size=0 containers
dirs), it seemed much safer to stick with a scheme that works across
more storage types. Eg. we fall through to Plugin.pm via
`get_next_vm_diskname()` which is the thing that causes the "subvol-ct-"
prefix for "format == subvol". And unlike dir plugins, our ZFS plugin
does not have a distinguishing format suffix for this...

> 
> >   Both also get an optional additional `base-` prefix for base
> >   volumes.
> > 
> > Note: all new base- prefix come in front of the `(sub)vol-*` prefixes.
> > 
> > Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
> > ---
> >  src/PVE/Storage/ESXiPlugin.pm        |  2 +-
> >  src/PVE/Storage/ISCSIDirectPlugin.pm |  2 +-
> >  src/PVE/Storage/ISCSIPlugin.pm       |  2 +-
> >  src/PVE/Storage/LVMPlugin.pm         | 19 ++++++++---
> >  src/PVE/Storage/LvmThinPlugin.pm     | 13 ++++++++
> >  src/PVE/Storage/Plugin.pm            | 48 +++++++++++++++++++++-------
> >  src/PVE/Storage/RBDPlugin.pm         | 45 ++++++++++++++++++++++++--
> >  src/PVE/Storage/ZFSPoolPlugin.pm     | 34 ++++++++++++++++----
> >  8 files changed, 138 insertions(+), 27 deletions(-)
> > 
> > diff --git a/src/PVE/Storage/ESXiPlugin.pm b/src/PVE/Storage/ESXiPlugin.pm
> > index eeb6a48..ea2f8f9 100644
> > --- a/src/PVE/Storage/ESXiPlugin.pm
> > +++ b/src/PVE/Storage/ESXiPlugin.pm
> > @@ -421,7 +421,7 @@ sub parse_volname {
> >  
> >      my $format = 'raw';
> >      $format = 'vmdk' if $volname =~ /\.vmdk$/;
> > -    return ('images', $volname, 0, undef, undef, undef, $format);
> > +    return ('vm-vol', $volname, 0, undef, undef, undef, $format);
> >  }
> >  
> >  sub list_images {
> > diff --git a/src/PVE/Storage/ISCSIDirectPlugin.pm b/src/PVE/Storage/ISCSIDirectPlugin.pm
> > index 069a41f..f5b466e 100644
> > --- a/src/PVE/Storage/ISCSIDirectPlugin.pm
> > +++ b/src/PVE/Storage/ISCSIDirectPlugin.pm
> > @@ -87,7 +87,7 @@ sub parse_volname {
> >      my ($class, $volname) = @_;
> >  
> >      if ($volname =~ m/^lun(\d+)$/) {
> > -        return ('images', $1, undef, undef, undef, undef, 'raw');
> > +        return ('vm-vol', $1, undef, undef, undef, undef, 'raw');
> >      }
> >  
> >      die "unable to parse iscsi volume name '$volname'\n";
> > diff --git a/src/PVE/Storage/ISCSIPlugin.pm b/src/PVE/Storage/ISCSIPlugin.pm
> > index 7b30955..4875a1f 100644
> > --- a/src/PVE/Storage/ISCSIPlugin.pm
> > +++ b/src/PVE/Storage/ISCSIPlugin.pm
> > @@ -371,7 +371,7 @@ sub parse_volname {
> >      my ($class, $volname) = @_;
> >  
> >      if ($volname =~ m!^\d+\.\d+\.\d+\.([^/\s]+)$!) {
> > -        return ('images', $1, undef, undef, undef, undef, 'raw');
> > +        return ('vm-vol', $1, undef, undef, undef, undef, 'raw');
> >      }
> >  
> >      die "unable to parse iscsi volume name '$volname'\n";
> > diff --git a/src/PVE/Storage/LVMPlugin.pm b/src/PVE/Storage/LVMPlugin.pm
> > index 6694cf2..9b88c6a 100644
> > --- a/src/PVE/Storage/LVMPlugin.pm
> > +++ b/src/PVE/Storage/LVMPlugin.pm
> > @@ -452,11 +452,22 @@ sub parse_volname {
> >  
> >      PVE::Storage::Plugin::parse_lvm_name($volname);
> >  
> > -    if ($volname =~ m/^(vm-(\d+)-\S+)$/) {
> > -        my $name = $1;
> > -        my $vmid = $2;
> > +    if (
> > +        $volname =~ m!^(?<name>
> > +        (
> > +            # New style volumes have a vtype:
> > +              vol-(?<vtype>vm|ct)
> > +
> > +            # Old style:
> > +            | vm
> > +        )
> > +        -(?<vmid>\d+)-\S+
> > +        )$!xn
> > +    ) {
> > +        my ($name, $vmid, $vtype) = @+{qw(name vmid vtype)};
> > +        $vtype = $vtype ? "$vtype-vol" : 'images';
> >          my $format = $volname =~ m/\.qcow2$/ ? 'qcow2' : 'raw';
> > -        return ('images', $name, $vmid, undef, undef, undef, $format);
> > +        return ($vtype, $name, $vmid, undef, undef, undef, $format);
> >      }
> >  
> >      die "unable to parse lvm volume name '$volname'\n";
> > diff --git a/src/PVE/Storage/LvmThinPlugin.pm b/src/PVE/Storage/LvmThinPlugin.pm
> > index cdf0fd0..751bd7b 100644
> > --- a/src/PVE/Storage/LvmThinPlugin.pm
> > +++ b/src/PVE/Storage/LvmThinPlugin.pm
> > @@ -77,6 +77,19 @@ sub parse_volname {
> >  
> >      PVE::Storage::Plugin::parse_lvm_name($volname);
> >  
> > +    # New naming convention:
> > +    if (
> > +        $volname =~ m/^(?<name>
> > +        (?<isbase>base-)?
> > +        (?:vol-(?<vtype> vm|ct))-
> > +        (?<vmid>\d+)-
> > +        \S+)$/xn
> > +    ) {
> > +        my ($name, $vmid, $vtype, $isbase) = @+{qw(name vmid vtype isbase)};
> > +        return ($vtype . '-vol', $name, $vmid, undef, undef, !!$isbase, 'raw');
> > +    }
> > +
> > +    # Old naming convention:
> >      if ($volname =~ m/^((vm|base)-(\d+)-\S+)$/) {
> >          return ('images', $1, $3, undef, undef, $2 eq 'base', 'raw');
> >      }
> > diff --git a/src/PVE/Storage/Plugin.pm b/src/PVE/Storage/Plugin.pm
> > index ae9d673..77bcfc7 100644
> > --- a/src/PVE/Storage/Plugin.pm
> > +++ b/src/PVE/Storage/Plugin.pm
> > @@ -711,19 +711,46 @@ sub cluster_lock_storage {
> >  my sub parse_snap_name {
> >      my ($name) = @_;
> >  
> > +    if ($name =~ m/^snap-(.*)-vol-(?:vm|ct)(.*)$/) {
> > +        return $1;
> > +    }
> > +
> >      if ($name =~ m/^snap-(.*)-vm(.*)$/) {
> >          return $1;
> >      }
> > +
> > +    return;
> >  }
> >  
> > +our $DISK_NAME_REGEX = qr!
> > +    (?<name>
> > +        (
> > +            # New convention: 'base-' prefix, 'vol-vm' and 'subvol-ct'.
> > +              (?<israw> (?<isbase>base-)? vol-    (?<vtype> vm|ct))
> > +            | (?<issub> (?<isbase>base-)? subvol- (?<vtype> ct))
> > +
> > +            # Old convention: "vm" vs "base" and "subvol" vs "basevol"
> > +            | (?<israw> vm)
> 
> `israw` is a weird identifier here. it's also not used anywhere, so
> maybe we could drop it for now and think of a better name if we ever
> need it?

(Yeah... I just left it in for better alignment/documentation :P)

> 
> > +            | (?<issub> subvol)
> > +            | (?<israw> (?<isbase>base))
> > +            | (?<issub> (?<isbase>basevol))
> 
> the old convention was actually a lot more loose, see below..

IMO the more loose part should be in an `else` in `parse_name_dir`.
This regex is used in other plugins and I don't want this regex to allow
zvols named `💩`.

> 
> we probably should add a warning to pve8to9 for volumes on builtin
> storage types that don't match this strict scheme at least?
> 
> > +        )
> > +        -
> > +        (?<vmid>\d+)
> > +        -
> > +        (?<label>[^/\s]+)
> > +    )
> > +!xn;
> > +
> >  sub parse_name_dir {
> > -    my $name = shift;
> > +    my ($name) = @_;
> >  
> > -    if ($name =~ m!^((vm-|base-|subvol-)(\d+)-[^/\s]+\.(raw|qcow2|vmdk|subvol))$!) {
> > -        my $isbase = $2 eq 'base-' ? $2 : undef;
> > -        return ($1, $4, $isbase); # (name, format, isBase)
> > +    if ($name =~ m!^$DISK_NAME_REGEX\.(?<format>raw|qcow2|vmdk|subvol)$!xn) {
> > +        my ($name, $israw, $issub, $isbase, $vmid, $vtype, $label, $format) =
> > +            @+{qw(name israw issub isbase vmid vtype label format)};
> > +        return ($name, $format, !!$isbase, $vtype ? "$vtype-vol" : "images");
> >      } elsif ($name =~ m!^((base-)?[^/\s]+\.(raw|qcow2|vmdk|subvol))$!) {
> > -        warn "this volume name `$name` is not supported anymore\n" if !parse_snap_name($name);
> > +        die "this volume name `$name` is not supported anymore\n";
> 
> as discussed off list, this regressed recently and needs to be fixed -
> we only want to skip snapshot volumes, and allow other things for the
> legacy types..
> 
> >      }
> >  
> >      die "unable to parse volume filename '$name'\n";
> > @@ -733,15 +760,14 @@ sub parse_volname {
> >      my ($class, $volname) = @_;
> >  
> >      if ($volname =~ m!^(\d+)/(\S+)/(\d+)/(\S+)$!) {
> > -        my ($basedvmid, $basename) = ($1, $2);
> > +        my ($basedvmid, $basename, $vmid, $name) = ($1, $2, $3, $4);
> >          parse_name_dir($basename);
> > -        my ($vmid, $name) = ($3, $4);
> > -        my (undef, $format, $isBase) = parse_name_dir($name);
> > -        return ('images', $name, $vmid, $basename, $basedvmid, $isBase, $format);
> > +        my (undef, $format, $isBase, $vtype) = parse_name_dir($name);
> > +        return ($vtype, $name, $vmid, $basename, $basedvmid, $isBase, $format);
> >      } elsif ($volname =~ m!^(\d+)/(\S+)$!) {
> >          my ($vmid, $name) = ($1, $2);
> > -        my (undef, $format, $isBase) = parse_name_dir($name);
> > -        return ('images', $name, $vmid, undef, undef, $isBase, $format);
> > +        my (undef, $format, $isBase, $vtype) = parse_name_dir($name);
> > +        return ($vtype, $name, $vmid, undef, undef, $isBase, $format);
> >      } elsif ($volname =~ m!^iso/([^/]+$PVE::Storage::ISO_EXT_RE_0)$!) {
> >          return ('iso', $1, undef, undef, undef, undef, 'raw');
> >      } elsif ($volname =~ m!^vztmpl/([^/]+$PVE::Storage::VZTMPL_EXT_RE_1)$!) {
> 
> [..]


_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

^ permalink raw reply	[flat|nested] 74+ messages in thread

* Re: [pve-devel] [PATCH storage 10/26] plugins: update volname parsing for new naming convention
  2025-07-30  8:53     ` Wolfgang Bumiller
@ 2025-07-30  8:58       ` Fabian Grünbichler
  0 siblings, 0 replies; 74+ messages in thread
From: Fabian Grünbichler @ 2025-07-30  8:58 UTC (permalink / raw)
  To: Wolfgang Bumiller; +Cc: Proxmox VE development discussion

On July 30, 2025 10:53 am, Wolfgang Bumiller wrote:
> On Wed, Jul 30, 2025 at 10:37:27AM +0200, Fabian Grünbichler wrote:
>> On July 29, 2025 1:15 pm, Wolfgang Bumiller wrote:
>> > - ESXi, ISCSIDirect, ISCSI:
>> >   Volumes are always vm volumes.
>> > - LVM:
>> >   New volumes use a `vol-vm-` or `vol-ct-` prefix.
>> > - Dir based, LvmThin, RBD:
>> >   Like LVM, but for base images a `base-` prefix is added
>> >   *additionally*, instead of *replacing* the `vm-` portion like we
>> >   used to.
>> > - ZFS:
>> >   VMs: `vol-vm-` prefix.
>> >   Containers: `subvol-ct-` prefix.
>> 
>> we could get rid of this historic anomaly while we're at it, and make
>> the new vtype just encoded as vol-ct for consistency - that those are
>> always filesystem datasets, and the vol-vm ones always zvols is an
>> implementation detail then?
> 
> But this would also make it difficult if we ever want to allow zvols
> with file systems. And given that the code falls through to Plugin.pm in
> some places (and dir plugins can theoretically have size=0 containers
> dirs), it seemed much safer to stick with a scheme that works across
> more storage types. Eg. we fall through to Plugin.pm via
> `get_next_vm_diskname()` which is the thing that causes the "subvol-ct-"
> prefix for "format == subvol". And unlike dir plugins, our ZFS plugin
> does not have a distinguishing format suffix for this...

using zvols there doesn't seem like a good idea, but point taken ;)

> 
>> 
>> >   Both also get an optional additional `base-` prefix for base
>> >   volumes.
>> > 
>> > Note: all new base- prefix come in front of the `(sub)vol-*` prefixes.
>> > 
>> > Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
>> > ---
>> >  src/PVE/Storage/ESXiPlugin.pm        |  2 +-
>> >  src/PVE/Storage/ISCSIDirectPlugin.pm |  2 +-
>> >  src/PVE/Storage/ISCSIPlugin.pm       |  2 +-
>> >  src/PVE/Storage/LVMPlugin.pm         | 19 ++++++++---
>> >  src/PVE/Storage/LvmThinPlugin.pm     | 13 ++++++++
>> >  src/PVE/Storage/Plugin.pm            | 48 +++++++++++++++++++++-------
>> >  src/PVE/Storage/RBDPlugin.pm         | 45 ++++++++++++++++++++++++--
>> >  src/PVE/Storage/ZFSPoolPlugin.pm     | 34 ++++++++++++++++----
>> >  8 files changed, 138 insertions(+), 27 deletions(-)
>> > 
>> > diff --git a/src/PVE/Storage/ESXiPlugin.pm b/src/PVE/Storage/ESXiPlugin.pm
>> > index eeb6a48..ea2f8f9 100644
>> > --- a/src/PVE/Storage/ESXiPlugin.pm
>> > +++ b/src/PVE/Storage/ESXiPlugin.pm
>> > @@ -421,7 +421,7 @@ sub parse_volname {
>> >  
>> >      my $format = 'raw';
>> >      $format = 'vmdk' if $volname =~ /\.vmdk$/;
>> > -    return ('images', $volname, 0, undef, undef, undef, $format);
>> > +    return ('vm-vol', $volname, 0, undef, undef, undef, $format);
>> >  }
>> >  
>> >  sub list_images {
>> > diff --git a/src/PVE/Storage/ISCSIDirectPlugin.pm b/src/PVE/Storage/ISCSIDirectPlugin.pm
>> > index 069a41f..f5b466e 100644
>> > --- a/src/PVE/Storage/ISCSIDirectPlugin.pm
>> > +++ b/src/PVE/Storage/ISCSIDirectPlugin.pm
>> > @@ -87,7 +87,7 @@ sub parse_volname {
>> >      my ($class, $volname) = @_;
>> >  
>> >      if ($volname =~ m/^lun(\d+)$/) {
>> > -        return ('images', $1, undef, undef, undef, undef, 'raw');
>> > +        return ('vm-vol', $1, undef, undef, undef, undef, 'raw');
>> >      }
>> >  
>> >      die "unable to parse iscsi volume name '$volname'\n";
>> > diff --git a/src/PVE/Storage/ISCSIPlugin.pm b/src/PVE/Storage/ISCSIPlugin.pm
>> > index 7b30955..4875a1f 100644
>> > --- a/src/PVE/Storage/ISCSIPlugin.pm
>> > +++ b/src/PVE/Storage/ISCSIPlugin.pm
>> > @@ -371,7 +371,7 @@ sub parse_volname {
>> >      my ($class, $volname) = @_;
>> >  
>> >      if ($volname =~ m!^\d+\.\d+\.\d+\.([^/\s]+)$!) {
>> > -        return ('images', $1, undef, undef, undef, undef, 'raw');
>> > +        return ('vm-vol', $1, undef, undef, undef, undef, 'raw');
>> >      }
>> >  
>> >      die "unable to parse iscsi volume name '$volname'\n";
>> > diff --git a/src/PVE/Storage/LVMPlugin.pm b/src/PVE/Storage/LVMPlugin.pm
>> > index 6694cf2..9b88c6a 100644
>> > --- a/src/PVE/Storage/LVMPlugin.pm
>> > +++ b/src/PVE/Storage/LVMPlugin.pm
>> > @@ -452,11 +452,22 @@ sub parse_volname {
>> >  
>> >      PVE::Storage::Plugin::parse_lvm_name($volname);
>> >  
>> > -    if ($volname =~ m/^(vm-(\d+)-\S+)$/) {
>> > -        my $name = $1;
>> > -        my $vmid = $2;
>> > +    if (
>> > +        $volname =~ m!^(?<name>
>> > +        (
>> > +            # New style volumes have a vtype:
>> > +              vol-(?<vtype>vm|ct)
>> > +
>> > +            # Old style:
>> > +            | vm
>> > +        )
>> > +        -(?<vmid>\d+)-\S+
>> > +        )$!xn
>> > +    ) {
>> > +        my ($name, $vmid, $vtype) = @+{qw(name vmid vtype)};
>> > +        $vtype = $vtype ? "$vtype-vol" : 'images';
>> >          my $format = $volname =~ m/\.qcow2$/ ? 'qcow2' : 'raw';
>> > -        return ('images', $name, $vmid, undef, undef, undef, $format);
>> > +        return ($vtype, $name, $vmid, undef, undef, undef, $format);
>> >      }
>> >  
>> >      die "unable to parse lvm volume name '$volname'\n";
>> > diff --git a/src/PVE/Storage/LvmThinPlugin.pm b/src/PVE/Storage/LvmThinPlugin.pm
>> > index cdf0fd0..751bd7b 100644
>> > --- a/src/PVE/Storage/LvmThinPlugin.pm
>> > +++ b/src/PVE/Storage/LvmThinPlugin.pm
>> > @@ -77,6 +77,19 @@ sub parse_volname {
>> >  
>> >      PVE::Storage::Plugin::parse_lvm_name($volname);
>> >  
>> > +    # New naming convention:
>> > +    if (
>> > +        $volname =~ m/^(?<name>
>> > +        (?<isbase>base-)?
>> > +        (?:vol-(?<vtype> vm|ct))-
>> > +        (?<vmid>\d+)-
>> > +        \S+)$/xn
>> > +    ) {
>> > +        my ($name, $vmid, $vtype, $isbase) = @+{qw(name vmid vtype isbase)};
>> > +        return ($vtype . '-vol', $name, $vmid, undef, undef, !!$isbase, 'raw');
>> > +    }
>> > +
>> > +    # Old naming convention:
>> >      if ($volname =~ m/^((vm|base)-(\d+)-\S+)$/) {
>> >          return ('images', $1, $3, undef, undef, $2 eq 'base', 'raw');
>> >      }
>> > diff --git a/src/PVE/Storage/Plugin.pm b/src/PVE/Storage/Plugin.pm
>> > index ae9d673..77bcfc7 100644
>> > --- a/src/PVE/Storage/Plugin.pm
>> > +++ b/src/PVE/Storage/Plugin.pm
>> > @@ -711,19 +711,46 @@ sub cluster_lock_storage {
>> >  my sub parse_snap_name {
>> >      my ($name) = @_;
>> >  
>> > +    if ($name =~ m/^snap-(.*)-vol-(?:vm|ct)(.*)$/) {
>> > +        return $1;
>> > +    }
>> > +
>> >      if ($name =~ m/^snap-(.*)-vm(.*)$/) {
>> >          return $1;
>> >      }
>> > +
>> > +    return;
>> >  }
>> >  
>> > +our $DISK_NAME_REGEX = qr!
>> > +    (?<name>
>> > +        (
>> > +            # New convention: 'base-' prefix, 'vol-vm' and 'subvol-ct'.
>> > +              (?<israw> (?<isbase>base-)? vol-    (?<vtype> vm|ct))
>> > +            | (?<issub> (?<isbase>base-)? subvol- (?<vtype> ct))
>> > +
>> > +            # Old convention: "vm" vs "base" and "subvol" vs "basevol"
>> > +            | (?<israw> vm)
>> 
>> `israw` is a weird identifier here. it's also not used anywhere, so
>> maybe we could drop it for now and think of a better name if we ever
>> need it?
> 
> (Yeah... I just left it in for better alignment/documentation :P)

but it's confusing - the opposite of subvol is not raw, the opposite of
subvol is .. file? image? ..?

>> > +            | (?<issub> subvol)
>> > +            | (?<israw> (?<isbase>base))
>> > +            | (?<issub> (?<isbase>basevol))
>> 
>> the old convention was actually a lot more loose, see below..
> 
> IMO the more loose part should be in an `else` in `parse_name_dir`.
> This regex is used in other plugins and I don't want this regex to allow
> zvols named `💩`.

fair enough.

> 
>> 
>> we probably should add a warning to pve8to9 for volumes on builtin
>> storage types that don't match this strict scheme at least?
>> 
>> > +        )
>> > +        -
>> > +        (?<vmid>\d+)
>> > +        -
>> > +        (?<label>[^/\s]+)
>> > +    )
>> > +!xn;
>> > +
>> >  sub parse_name_dir {
>> > -    my $name = shift;
>> > +    my ($name) = @_;
>> >  
>> > -    if ($name =~ m!^((vm-|base-|subvol-)(\d+)-[^/\s]+\.(raw|qcow2|vmdk|subvol))$!) {
>> > -        my $isbase = $2 eq 'base-' ? $2 : undef;
>> > -        return ($1, $4, $isbase); # (name, format, isBase)
>> > +    if ($name =~ m!^$DISK_NAME_REGEX\.(?<format>raw|qcow2|vmdk|subvol)$!xn) {
>> > +        my ($name, $israw, $issub, $isbase, $vmid, $vtype, $label, $format) =
>> > +            @+{qw(name israw issub isbase vmid vtype label format)};
>> > +        return ($name, $format, !!$isbase, $vtype ? "$vtype-vol" : "images");
>> >      } elsif ($name =~ m!^((base-)?[^/\s]+\.(raw|qcow2|vmdk|subvol))$!) {
>> > -        warn "this volume name `$name` is not supported anymore\n" if !parse_snap_name($name);
>> > +        die "this volume name `$name` is not supported anymore\n";
>> 
>> as discussed off list, this regressed recently and needs to be fixed -
>> we only want to skip snapshot volumes, and allow other things for the
>> legacy types..
>> 
>> >      }
>> >  
>> >      die "unable to parse volume filename '$name'\n";
>> > @@ -733,15 +760,14 @@ sub parse_volname {
>> >      my ($class, $volname) = @_;
>> >  
>> >      if ($volname =~ m!^(\d+)/(\S+)/(\d+)/(\S+)$!) {
>> > -        my ($basedvmid, $basename) = ($1, $2);
>> > +        my ($basedvmid, $basename, $vmid, $name) = ($1, $2, $3, $4);
>> >          parse_name_dir($basename);
>> > -        my ($vmid, $name) = ($3, $4);
>> > -        my (undef, $format, $isBase) = parse_name_dir($name);
>> > -        return ('images', $name, $vmid, $basename, $basedvmid, $isBase, $format);
>> > +        my (undef, $format, $isBase, $vtype) = parse_name_dir($name);
>> > +        return ($vtype, $name, $vmid, $basename, $basedvmid, $isBase, $format);
>> >      } elsif ($volname =~ m!^(\d+)/(\S+)$!) {
>> >          my ($vmid, $name) = ($1, $2);
>> > -        my (undef, $format, $isBase) = parse_name_dir($name);
>> > -        return ('images', $name, $vmid, undef, undef, $isBase, $format);
>> > +        my (undef, $format, $isBase, $vtype) = parse_name_dir($name);
>> > +        return ($vtype, $name, $vmid, undef, undef, $isBase, $format);
>> >      } elsif ($volname =~ m!^iso/([^/]+$PVE::Storage::ISO_EXT_RE_0)$!) {
>> >          return ('iso', $1, undef, undef, undef, undef, 'raw');
>> >      } elsif ($volname =~ m!^vztmpl/([^/]+$PVE::Storage::VZTMPL_EXT_RE_1)$!) {
>> 
>> [..]
> 


_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

^ permalink raw reply	[flat|nested] 74+ messages in thread

* Re: [pve-devel] [PATCH storage 15/26] common: add is_volume_type and is_type_change_allowed helpers
  2025-07-29 11:15 ` [pve-devel] [PATCH storage 15/26] common: add is_volume_type and is_type_change_allowed helpers Wolfgang Bumiller
@ 2025-07-30  9:01   ` Fabian Grünbichler
  0 siblings, 0 replies; 74+ messages in thread
From: Fabian Grünbichler @ 2025-07-30  9:01 UTC (permalink / raw)
  To: Proxmox VE development discussion

On July 29, 2025 1:15 pm, Wolfgang Bumiller wrote:
> Generally we want to allow transitioning from 'images' or 'rootdir' to
> 'vm-vol' or 'ct-vol' respectively, but not the other way round.
> Obviously, staying *within* any of the types is also allowed.
> 
> The `is_volume_type` helper is just a convenience helper for
> functionality such as, for directory based storages, deciding whether
> a volume needs a VMID subdirectory.
> 
> Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
> ---
>  src/PVE/Storage/Common.pm | 42 +++++++++++++++++++++++++++++++++++++++
>  1 file changed, 42 insertions(+)
> 
> diff --git a/src/PVE/Storage/Common.pm b/src/PVE/Storage/Common.pm
> index bab1260..7086e1c 100644
> --- a/src/PVE/Storage/Common.pm
> +++ b/src/PVE/Storage/Common.pm
> @@ -313,4 +313,46 @@ sub should_list_images : prototype($$) ($expected_content_type, $volume_type) {
>      return $expected_content_type eq $volume_type;
>  }
>  
> +=head3 is_volume_type
> +
> +    is_volume_type($vtype)
> +
> +Returns true if C<$vtype> is C<images>, C<rootdir>, C<vm-vol> or C<ct-vol>.

then it should be called `vtype_is_vdisk`. the `v` in `vtype` stands for
`volume`, so every vtype is by definition a volume..

> +
> +Convenience helper to distinguish volume vtypes and content types from other types.
> +
> +=cut
> +
> +my %VOLUME_TYPE = map { $_ => 1 } qw(images vm-vol rootdir ct-vol);
> +
> +sub is_volume_type : prototype($) ($vtype) {
> +    return $VOLUME_TYPE{$vtype};
> +}
> +
> +=head3 is_type_change_allowed
> +
> +    is_type_change_allowed($source_vtype, $target_vtype)
> +
> +Returns true if a volume may change from C<$source_vtype> to C<$target_vtype>.
> +
> +This is generally allowed if the target vtype is equal or "more strict" than the source vtype. That
> +is, if the source vtype is not known, is C<"images">, or equal to C<$target_vtype>.
> +
> +Note that without a target vtype, only generic source vtypes (C<undef> or C<"images">) are allowed.
> +
> +=cut
> +
> +sub is_type_change_allowed : prototype($$) ($from, $to) {

this should probably be limited to vdisks?

> +    # If the source is unknown we don't care:
> +    return 1 if !defined($from);
> +
> +    # Likewise, if the source is "images" we don't actually know what it represents.
> +    return 1 if $from eq 'images';
> +
> +    # Otherwise if *both* are defined they must be equal.
> +    return 1 if defined($from) && defined($to) && $from eq $to; #
> +
> +    return undef;
> +}
> +
>  1;
> -- 
> 2.47.2
> 
> 
> 
> _______________________________________________
> pve-devel mailing list
> pve-devel@lists.proxmox.com
> https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
> 
> 
> 


_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] 74+ messages in thread

* Re: [pve-devel] [PATCH storage 16/26] common: add volume_type_from_name convenience helper
  2025-07-30  8:36   ` Fabian Grünbichler
@ 2025-07-30  9:09     ` Wolfgang Bumiller
  0 siblings, 0 replies; 74+ messages in thread
From: Wolfgang Bumiller @ 2025-07-30  9:09 UTC (permalink / raw)
  To: Fabian Grünbichler; +Cc: Proxmox VE development discussion

On Wed, Jul 30, 2025 at 10:36:49AM +0200, Fabian Grünbichler wrote:
> On July 29, 2025 1:15 pm, Wolfgang Bumiller wrote:
> > For plugins which follow our new naming scheme.
> > 
> > Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
> > ---
> >  src/PVE/Storage/Common.pm | 29 +++++++++++++++++++++++++++++
> >  1 file changed, 29 insertions(+)
> > 
> > diff --git a/src/PVE/Storage/Common.pm b/src/PVE/Storage/Common.pm
> > index 7086e1c..813fba6 100644
> > --- a/src/PVE/Storage/Common.pm
> > +++ b/src/PVE/Storage/Common.pm
> > @@ -313,6 +313,35 @@ sub should_list_images : prototype($$) ($expected_content_type, $volume_type) {
> >      return $expected_content_type eq $volume_type;
> >  }
> >  
> > +=head3 volume_type_from_name
> > +
> > +    volume_type_from_name($name)
> > +
> > +This is available for storages which follow our most common naming scheme relating to volume types:
> > +A "vol-vm-" prefix for the C<vm-vol> vtype, and a "vol-ct-" prefix for the C<ct-vol> vtype.
> > +
> > +This function allows (and ignores) an optional "base-" prefix, such that
> > +"base-vol-ct-100-disk-0.raw" would return C<ct-vol>.
> > +
> > +In any other case it returns C<images>.
> > +
> > +=cut
> > +
> > +sub volume_type_from_name : prototype($) {
> > +    my ($name) = @_;
> > +
> > +    if ($name =~ /^(?:base-)?(?:(?:sub)?vol-(vm|ct))-/) {
> > +        return "$1-vol";
> > +    }
> > +
> > +    # Note: Despite the legacy `subvol-*` and `basevol-*` dirs always being containers, giving
> > +    # them the vtype `ct-vol` would break `path_to_volume_id` which would expect their volids to
> > +    # be in the `cts/` subdir instead of in `images/`...
> > +    # return 'ct-vol' if $name =~ /^(?:subvol|basevol)-/;
> > +
> > +    return 'images';
> > +}
> 
> ZFSPoolPlugin has it's own variant of this, and this one here seems
> unused?

Yeah, that's a leftover from transitional patches I had...


_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] 74+ messages in thread

* Re: [pve-devel] [PATCH storage 08/26] prepare for vm-vol and ct-vol content and vtypes
  2025-07-29 11:15 ` [pve-devel] [PATCH storage 08/26] prepare for vm-vol and ct-vol content and vtypes Wolfgang Bumiller
  2025-07-30  8:38   ` Fabian Grünbichler
@ 2025-07-30  9:14   ` Fabian Grünbichler
  2025-08-08 12:05     ` Wolfgang Bumiller
  1 sibling, 1 reply; 74+ messages in thread
From: Fabian Grünbichler @ 2025-07-30  9:14 UTC (permalink / raw)
  To: Proxmox VE development discussion

On July 29, 2025 1:15 pm, Wolfgang Bumiller wrote:
> Prepares the stoplevel PVE::Storage API updates as well as adding the
> new vtype subdirs to the base plugin's vtype subdir hash.
> 
> The new types are "vm-vol" and "ct-vol". They represent VM and
> container volumes, respectively. The "images" and "rootdir" types are
> considered legacy/deprecated, as the "rootdir" type was not properly
> used, and container volumes were technically of type "images", with
> the "rootdir" case "hacked in" by checking the existing VMs.
> 
> To more easily transition, the "images" type is now also a "supertype"
> of "vm-vol", and the "rootdir" type a "supertype" of "ct-vol".
> 
> - `get_images_dir()` is replaced by `get_vm_volume_dir()`
> - `get_private_dir()` is dropped as it is an openvz leftover
> - `get_ct_volume_dir()` is added its stead
> 
> We now also unify the vtypes and content types. As such,
> `content-dirs` can now include separate dirs for `vm-vol` and
> `ct-vol`.
> This is now also taken into account in `path_to_volume_id()` which
> tries to match file system paths to a storage and content type.
> 
> The following subs also get a $vtype parameter:
> - `vdisk_alloc()`

alloc requires it

> - `vdisk_clone()`
> - `volume_import()`

these two don't. should we make vdisk_clone also require it? or should
we remove it altogether and always use the vtype of the base volume?

for import we probably want to make it optional for now to support old
nodes triggering it..


_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] 74+ messages in thread

* Re: [pve-devel] [PATCH qemu-server 04/10] expect 'vm-vol' vtype wherever 'images' was expected
  2025-07-29 11:15 ` [pve-devel] [PATCH qemu-server 04/10] expect 'vm-vol' vtype wherever 'images' was expected Wolfgang Bumiller
  2025-07-30  8:40   ` Fabian Grünbichler
@ 2025-07-30  9:17   ` Fiona Ebner
  2025-07-30  9:33     ` Fiona Ebner
  1 sibling, 1 reply; 74+ messages in thread
From: Fiona Ebner @ 2025-07-30  9:17 UTC (permalink / raw)
  To: pve-devel

Am 29.07.25 um 1:25 PM schrieb Wolfgang Bumiller:
> Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
> ---
>  src/PVE/API2/Qemu.pm   | 16 +++++++++-------
>  src/PVE/QemuMigrate.pm |  3 ++-
>  src/PVE/QemuServer.pm  |  6 ++++--
>  3 files changed, 15 insertions(+), 10 deletions(-)

The verify_media_type() helper in QemuServer.pm needs updating too,
e.g:

diff --git a/src/PVE/QemuServer.pm b/src/PVE/QemuServer.pm
index 05a3be91..15b38caf 100644
--- a/src/PVE/QemuServer.pm
+++ b/src/PVE/QemuServer.pm
@@ -1090,18 +1090,18 @@ sub verify_media_type {
 
     return if !$media;
 
-    my $etype;
     if ($media eq 'disk') {
-        $etype = 'images';
+        return if $vtype eq 'images' || $vtype eq 'vm-vol';
+        raise_param_exc({
+            $opt =>
+                "wrong volume type '$vtype' for media=$media - expected 'images' or 'vm-vol'",
+        });
     } elsif ($media eq 'cdrom') {
-        $etype = 'iso';
-    } else {
-        die "internal error";
+        return if $vtype eq 'iso';
+        raise_param_exc({ $opt => "wrong volume type '$vtype' for media=$media - expected 'iso'" });
     }
 
-    return if ($vtype eq $etype);
-
-    raise_param_exc({ $opt => "unexpected media type ($vtype != $etype)" });
+    die "internal error - unexpected media type '$media'\n";
 }
 
 sub cleanup_drive_path {
-- 
2.47.2



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] 74+ messages in thread

* Re: [pve-devel] [PATCH storage 17/26] plugins: add vtype parameter to alloc_image
  2025-07-29 11:15 ` [pve-devel] [PATCH storage 17/26] plugins: add vtype parameter to alloc_image Wolfgang Bumiller
@ 2025-07-30  9:24   ` Fabian Grünbichler
  2025-07-30 14:00   ` Max R. Carrara
  1 sibling, 0 replies; 74+ messages in thread
From: Fabian Grünbichler @ 2025-07-30  9:24 UTC (permalink / raw)
  To: Proxmox VE development discussion

On July 29, 2025 1:15 pm, Wolfgang Bumiller wrote:
> Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
> ---
>  src/PVE/Storage/BTRFSPlugin.pm       | 25 ++++++++----
>  src/PVE/Storage/ESXiPlugin.pm        |  2 +-
>  src/PVE/Storage/ISCSIDirectPlugin.pm |  2 +-
>  src/PVE/Storage/ISCSIPlugin.pm       |  2 +-
>  src/PVE/Storage/LVMPlugin.pm         | 35 ++++++++++++-----
>  src/PVE/Storage/LvmThinPlugin.pm     | 19 +++++++--
>  src/PVE/Storage/Plugin.pm            | 59 +++++++++++++++++-----------
>  src/PVE/Storage/RBDPlugin.pm         | 27 +++++++++----
>  src/PVE/Storage/ZFSPlugin.pm         | 17 ++++++--
>  src/PVE/Storage/ZFSPoolPlugin.pm     | 35 +++++++++++------
>  10 files changed, 154 insertions(+), 69 deletions(-)
> 
> diff --git a/src/PVE/Storage/BTRFSPlugin.pm b/src/PVE/Storage/BTRFSPlugin.pm
> index 585489c..0a42c88 100644
> --- a/src/PVE/Storage/BTRFSPlugin.pm
> +++ b/src/PVE/Storage/BTRFSPlugin.pm
> @@ -13,6 +13,7 @@ use POSIX qw(EEXIST);
>  
>  use PVE::Tools qw(run_command dir_glob_foreach);
>  
> +use PVE::Storage::Common;
>  use PVE::Storage::DirPlugin;
>  
>  use constant {
> @@ -193,15 +194,16 @@ sub filesystem_path {
>  
>      my $path = $class->get_subdir($scfg, $vtype);
>  
> -    $path .= "/$vmid" if $vtype eq 'images';
> +    my $is_volume_type = PVE::Storage::Common::is_volume_type($vtype);
> +    $path .= "/$vmid" if $is_volume_type;
>  
> -    if ($vtype eq 'images' && defined($format) && $format eq 'raw') {
> +    if ($is_volume_type && defined($format) && $format eq 'raw') {
>          my $dir = raw_name_to_dir($name);
>          if ($snapname) {
>              $dir .= "\@$snapname";
>          }
>          $path .= "/$dir/disk.raw";
> -    } elsif ($vtype eq 'images' && defined($format) && $format eq 'subvol') {
> +    } elsif ($is_volume_type && defined($format) && $format eq 'subvol') {
>          $path .= "/$name";
>          if ($snapname) {
>              $path .= "\@$snapname";
> @@ -322,19 +324,28 @@ sub clone_image {
>  }
>  
>  sub alloc_image {
> -    my ($class, $storeid, $scfg, $vmid, $fmt, $name, $size) = @_;
> +    my ($class, $storeid, $scfg, $vmid, $fmt, $name, $size, $vtype) = @_;
>  
>      if ($fmt ne 'raw' && $fmt ne 'subvol') {
> -        return $class->SUPER::alloc_image($storeid, $scfg, $vmid, $fmt, $name, $size);
> +        return $class->SUPER::alloc_image($storeid, $scfg, $vmid, $fmt, $name, $size, $vtype);
>      }
>  
>      # From Plugin.pm:
>  
> -    my $imagedir = $class->get_subdir($scfg, 'images') . "/$vmid";
> +    my $imagedir = $class->get_subdir($scfg, $vtype // 'images') . "/$vmid";
>  
>      mkpath $imagedir;
>  
> -    $name = $class->find_free_diskname($storeid, $scfg, $vmid, $fmt, 1) if !$name;
> +    if ($name) {
> +        if (defined($vtype)) {
> +            die "illegal name '$name' - should be 'vol-vm-$vmid-*'\n"
> +                if $vtype eq 'vm-vol' && $name !~ m/^vol-vm-$vmid-/;
> +            die "illegal name '$name' - should be 'vol-ct-$vmid-*'\n"
> +                if $vtype eq 'ct-vol' && $name !~ m/^vol-ct-$vmid-/;
> +        }

couldn't we parse the name and check the vtype that returns, like we do
for the format below?

> +    } else {
> +        $name = $class->find_free_diskname($storeid, $scfg, $vmid, $fmt, 1, $vtype);
> +    }
>  
>      my (undef, $tmpfmt) = PVE::Storage::Plugin::parse_name_dir($name);
>  
> diff --git a/src/PVE/Storage/ESXiPlugin.pm b/src/PVE/Storage/ESXiPlugin.pm
> index ea2f8f9..d10b156 100644
> --- a/src/PVE/Storage/ESXiPlugin.pm
> +++ b/src/PVE/Storage/ESXiPlugin.pm
> @@ -480,7 +480,7 @@ sub path {
>  }
>  
>  sub alloc_image {
> -    my ($class, $storeid, $scfg, $vmid, $fmt, $name, $size) = @_;
> +    my ($class, $storeid, $scfg, $vmid, $fmt, $name, $size, $vtype) = @_;
>  
>      die "creating images is not supported for $class\n";
>  }
> diff --git a/src/PVE/Storage/ISCSIDirectPlugin.pm b/src/PVE/Storage/ISCSIDirectPlugin.pm
> index 98a3391..0fee541 100644
> --- a/src/PVE/Storage/ISCSIDirectPlugin.pm
> +++ b/src/PVE/Storage/ISCSIDirectPlugin.pm
> @@ -140,7 +140,7 @@ sub clone_image {
>  }
>  
>  sub alloc_image {
> -    my ($class, $storeid, $scfg, $vmid, $fmt, $name, $size) = @_;
> +    my ($class, $storeid, $scfg, $vmid, $fmt, $name, $size, $vtype) = @_;
>  
>      die "can't allocate space in iscsi storage\n";
>  }
> diff --git a/src/PVE/Storage/ISCSIPlugin.pm b/src/PVE/Storage/ISCSIPlugin.pm
> index 77a9173..5118d73 100644
> --- a/src/PVE/Storage/ISCSIPlugin.pm
> +++ b/src/PVE/Storage/ISCSIPlugin.pm
> @@ -402,7 +402,7 @@ sub clone_image {
>  }
>  
>  sub alloc_image {
> -    my ($class, $storeid, $scfg, $vmid, $fmt, $name, $size) = @_;
> +    my ($class, $storeid, $scfg, $vmid, $fmt, $name, $size, $vtype) = @_;
>  
>      die "can't allocate space in iscsi storage\n";
>  }
> diff --git a/src/PVE/Storage/LVMPlugin.pm b/src/PVE/Storage/LVMPlugin.pm
> index 55c4578..af789ba 100644
> --- a/src/PVE/Storage/LVMPlugin.pm
> +++ b/src/PVE/Storage/LVMPlugin.pm
> @@ -535,7 +535,7 @@ sub clone_image {
>  }
>  
>  sub find_free_diskname {
> -    my ($class, $storeid, $scfg, $vmid, $fmt, $add_fmt_suffix) = @_;
> +    my ($class, $storeid, $scfg, $vmid, $fmt, $add_fmt_suffix, $vtype) = @_;
>  
>      my $vg = $scfg->{vgname};
>  
> @@ -546,7 +546,7 @@ sub find_free_diskname {
>      $add_fmt_suffix = $fmt && $fmt eq 'qcow2' ? 1 : undef;
>  
>      return PVE::Storage::Plugin::get_next_vm_diskname(
> -        $disk_list, $storeid, $vmid, $fmt, $scfg, $add_fmt_suffix,
> +        $disk_list, $storeid, $vmid, $fmt, $scfg, $add_fmt_suffix, $vtype,
>      );
>  }
>  
> @@ -628,8 +628,8 @@ my sub calculate_lvm_size {
>      return $info->{'fully-allocated'} / 1024;
>  }
>  
> -my sub alloc_lvm_image {
> -    my ($class, $storeid, $scfg, $vmid, $fmt, $name, $size, $backing_snap) = @_;
> +my sub alloc_lvm_image : prototype($$$$$$$$$) {
> +    my ($class, $storeid, $scfg, $vmid, $fmt, $name, $size, $backing_snap, $vtype) = @_;
>  
>      die "unsupported format '$fmt'" if $fmt ne 'raw' && $fmt ne 'qcow2';
>  
> @@ -637,6 +637,20 @@ my sub alloc_lvm_image {
>          if $fmt eq 'qcow2'
>          && !$scfg->{'snapshot-as-volume-chain'};
>  
> +    if ($name) {
> +        if (defined($vtype) && $vtype eq 'vm-vol') {
> +            die "illegal name '$name' - should be 'vol-vm-$vmid-*'\n"
> +                if $name !~ m/^vol-vm-$vmid-/;
> +        } elsif (defined($vtype) && $vtype eq 'ct-vol') {
> +            die "illegal name '$name' - should be 'vol-ct-$vmid-*'\n"
> +                if $name !~ m/^vol-ct-$vmid-/;
> +        } else {
> +            die "illegal name '$name'"
> +                . " - should be 'vm-$vmid-*', 'vol-vm-$vmid-*' or 'vol-ct-$vmid-*'\n"
> +                if $name !~ m/^(?:vol-vm|vol-ct|vm)-$vmid-/;
> +        }
> +    }
> +

same question here..

>      $class->parse_volname($name);
>  
>      my $vgs = lvm_vgs();
> @@ -672,20 +686,20 @@ my sub alloc_lvm_image {
>  }
>  
>  sub alloc_image {
> -    my ($class, $storeid, $scfg, $vmid, $fmt, $name, $size) = @_;
> +    my ($class, $storeid, $scfg, $vmid, $fmt, $name, $size, $vtype) = @_;
>  
> -    $name = $class->find_free_diskname($storeid, $scfg, $vmid, $fmt)
> +    $name = $class->find_free_diskname($storeid, $scfg, $vmid, $fmt, 0, $vtype)
>          if !$name;
>  
> -    alloc_lvm_image($class, $storeid, $scfg, $vmid, $fmt, $name, $size);
> +    alloc_lvm_image($class, $storeid, $scfg, $vmid, $fmt, $name, $size, undef, $vtype);
>  
>      return $name;
>  }
>  
> -my sub alloc_snap_image {
> +my sub alloc_snap_image : prototype($$$$$) {
>      my ($class, $storeid, $scfg, $volname, $backing_snap) = @_;
>  
> -    my ($vmid, $format) = ($class->parse_volname($volname))[2, 6];
> +    my ($vtype, $vmid, $format) = ($class->parse_volname($volname))[0, 2, 6];
>      my $path = $class->path($scfg, $volname, $storeid, $backing_snap);
>  
>      #we need to use same size than the backing image qcow2 virtual-size
> @@ -694,7 +708,8 @@ my sub alloc_snap_image {
>  
>      $size = $size / 1024; #we use kb in lvcreate
>  
> -    alloc_lvm_image($class, $storeid, $scfg, $vmid, $format, $volname, $size, $backing_snap);
> +    alloc_lvm_image($class, $storeid, $scfg, $vmid, $format, $volname, $size, $backing_snap,
> +        $vtype);
>  }
>  
>  my sub free_snap_image {
> diff --git a/src/PVE/Storage/LvmThinPlugin.pm b/src/PVE/Storage/LvmThinPlugin.pm
> index f6615d9..2071822 100644
> --- a/src/PVE/Storage/LvmThinPlugin.pm
> +++ b/src/PVE/Storage/LvmThinPlugin.pm
> @@ -122,12 +122,23 @@ my $set_lv_autoactivation = sub {
>  };
>  
>  sub alloc_image {
> -    my ($class, $storeid, $scfg, $vmid, $fmt, $name, $size) = @_;
> +    my ($class, $storeid, $scfg, $vmid, $fmt, $name, $size, $vtype) = @_;
>  
>      die "unsupported format '$fmt'" if $fmt ne 'raw';
>  
> -    die "illegal name '$name' - should be 'vm-$vmid-*'\n"
> -        if $name && $name !~ m/^vm-$vmid-/;
> +    if ($name) {
> +        if (defined($vtype) && $vtype eq 'vm-vol') {
> +            die "illegal name '$name' - should be 'vol-vm-$vmid-*'\n"
> +                if $name !~ m/^vol-vm-$vmid-/;
> +        } elsif (defined($vtype) && $vtype eq 'ct-vol') {
> +            die "illegal name '$name' - should be 'vol-ct-$vmid-*'\n"
> +                if $name !~ m/^vol-ct-$vmid-/;
> +        } else {
> +            die "illegal name '$name'"
> +                . " - should be 'vm-$vmid-*', 'vol-vm-$vmid-*' or 'vol-ct-$vmid-*'\n"
> +                if $name !~ m/^(?:vol-vm|vol-ct|vm)-$vmid-/;
> +        }
> +    }

and here..

>  
>      my $vgs = PVE::Storage::LVMPlugin::lvm_vgs();
>  
> @@ -135,7 +146,7 @@ sub alloc_image {
>  
>      die "no such volume group '$vg'\n" if !defined($vgs->{$vg});
>  
> -    $name = $class->find_free_diskname($storeid, $scfg, $vmid)
> +    $name = $class->find_free_diskname($storeid, $scfg, $vmid, undef, 0, $vtype)
>          if !$name;
>  
>      my $cmd = [
> diff --git a/src/PVE/Storage/Plugin.pm b/src/PVE/Storage/Plugin.pm
> index 660045d..adaca47 100644
> --- a/src/PVE/Storage/Plugin.pm
> +++ b/src/PVE/Storage/Plugin.pm
> @@ -851,7 +851,7 @@ sub filesystem_path {
>  
>      my $dir = $class->get_subdir($scfg, $vtype);
>  
> -    $dir .= "/$vmid" if $vtype eq 'images';
> +    $dir .= "/$vmid" if PVE::Storage::Common::is_volume_type($vtype);
>  
>      my $path = "$dir/$name";
>  
> @@ -912,30 +912,34 @@ sub create_base {
>  }
>  
>  my $get_vm_disk_number = sub {
> -    my ($disk_name, $scfg, $vmid, $suffix) = @_;
> -
> -    my $disk_regex = qr/(vm|base)-$vmid-disk-(\d+)$suffix/;
> -
> -    my $type = $scfg->{type};
> -    my $def = { %{ $defaultData->{plugindata}->{$type} } };
> -
> -    my $valid = $def->{format}->[0];
> -    if ($valid->{subvol}) {
> -        $disk_regex = qr/(vm|base|subvol|basevol)-$vmid-disk-(\d+)/;
> -    }
> -
> -    if ($disk_name =~ m/$disk_regex/) {
> -        return $2;
> +    my ($disk_volid, $scfg, $vmid, $suffix) = @_;
> +
> +    # Dir storage have a vmid/ subdir, zfs/lvm/rbd/... do not.
> +    # Also: LVM storages don't pass the `storeid:` prefix...

should we fix that up?

> +    if ($disk_volid =~ m!^(?:[^:]+:)? (?:\d+/)? $DISK_NAME_REGEX $!xn) {
> +        my $label = $+{label};
> +        # Dir storages have a format suffix, zfs/lvm/rbd/... do not.
> +        if ($label =~ /^disk-(\d+)(?:\..*)?$/) {
> +            return int($1);
> +        }
>      }
>  
>      return undef;
>  };
>  
> +# note: disk_list is an array of *volids*
>  sub get_next_vm_diskname {
> -    my ($disk_list, $storeid, $vmid, $fmt, $scfg, $add_fmt_suffix) = @_;
> +    my ($disk_list, $storeid, $vmid, $fmt, $scfg, $add_fmt_suffix, $vtype) = @_;
>  
>      $fmt //= '';
> -    my $prefix = ($fmt eq 'subvol') ? 'subvol' : 'vm';
> +    my $prefix;
> +    if (defined($vtype) && $vtype eq 'vm-vol') {
> +        $prefix = 'vol-vm';
> +    } elsif (defined($vtype) && $vtype eq 'ct-vol') {
> +        $prefix = ($fmt eq 'subvol') ? 'subvol-ct' : 'vol-ct';
> +    } else {
> +        $prefix = ($fmt eq 'subvol') ? 'subvol' : 'vm';
> +    }
>      my $suffix = $add_fmt_suffix ? ".$fmt" : '';
>  
>      my $disk_ids = {};
> @@ -954,13 +958,13 @@ sub get_next_vm_diskname {
>  }
>  
>  sub find_free_diskname {
> -    my ($class, $storeid, $scfg, $vmid, $fmt, $add_fmt_suffix) = @_;
> +    my ($class, $storeid, $scfg, $vmid, $fmt, $add_fmt_suffix, $vtype) = @_;
>  
> -    my $disks = $class->list_images($storeid, $scfg, $vmid);
> +    my $disks = $class->list_images($storeid, $scfg, $vmid, undef, undef, $vtype);
>  
>      my $disk_list = [map { $_->{volid} } @$disks];
>  
> -    return get_next_vm_diskname($disk_list, $storeid, $vmid, $fmt, $scfg, $add_fmt_suffix);
> +    return get_next_vm_diskname($disk_list, $storeid, $vmid, $fmt, $scfg, $add_fmt_suffix, $vtype);
>  }
>  
>  sub clone_image {
> @@ -1011,14 +1015,23 @@ sub clone_image {
>  }
>  
>  sub alloc_image {
> -    my ($class, $storeid, $scfg, $vmid, $fmt, $name, $size) = @_;
> +    my ($class, $storeid, $scfg, $vmid, $fmt, $name, $size, $vtype) = @_;
>  
> -    my $imagedir = $class->get_subdir($scfg, 'images');
> +    my $imagedir = $class->get_subdir($scfg, $vtype // 'images');
>      $imagedir .= "/$vmid";
>  
>      mkpath $imagedir;
>  
> -    $name = $class->find_free_diskname($storeid, $scfg, $vmid, $fmt, 1) if !$name;
> +    if ($name) {
> +        if (defined($vtype)) {
> +            die "illegal name '$name' - should be 'vol-vm-$vmid-*'\n"
> +                if $vtype eq 'vm-vol' && $name !~ m/^vol-vm-$vmid-/;
> +            die "illegal name '$name' - should be 'vol-ct-$vmid-*'\n"
> +                if $vtype eq 'ct-vol' && $name !~ m/^vol-ct-$vmid-/;
> +        }

same question here

> +    } else {
> +        $name = $class->find_free_diskname($storeid, $scfg, $vmid, $fmt, 1, $vtype);
> +    }
>  
>      my (undef, $tmpfmt) = parse_name_dir($name);
>  
> diff --git a/src/PVE/Storage/RBDPlugin.pm b/src/PVE/Storage/RBDPlugin.pm
> index 2ef1280..839ff73 100644
> --- a/src/PVE/Storage/RBDPlugin.pm
> +++ b/src/PVE/Storage/RBDPlugin.pm
> @@ -620,7 +620,7 @@ sub qemu_blockdev_options {
>  }
>  
>  sub find_free_diskname {
> -    my ($class, $storeid, $scfg, $vmid, $fmt, $add_fmt_suffix) = @_;
> +    my ($class, $storeid, $scfg, $vmid, $fmt, $add_fmt_suffix, $vtype) = @_;
>  
>      my $cmd = $rbd_cmd->($scfg, $storeid, 'ls');
>  
> @@ -640,7 +640,9 @@ sub find_free_diskname {
>  
>      die $err if $err && $err !~ m/doesn't contain rbd images/;
>  
> -    return PVE::Storage::Plugin::get_next_vm_diskname($disk_list, $storeid, $vmid, undef, $scfg);
> +    return PVE::Storage::Plugin::get_next_vm_diskname(
> +        $disk_list, $storeid, $vmid, undef, $scfg, 0, $vtype,
> +    );
>  }
>  
>  sub create_base {
> @@ -730,12 +732,23 @@ sub clone_image {
>  }
>  
>  sub alloc_image {
> -    my ($class, $storeid, $scfg, $vmid, $fmt, $name, $size) = @_;
> -
> -    die "illegal name '$name' - should be 'vm-$vmid-*'\n"
> -        if $name && $name !~ m/^vm-$vmid-/;
> +    my ($class, $storeid, $scfg, $vmid, $fmt, $name, $size, $vtype) = @_;
> +
> +    if ($name) {
> +        if (defined($vtype) && $vtype eq 'vm-vol') {
> +            die "illegal name '$name' - should be 'vol-vm-$vmid-*'\n"
> +                if $name !~ m/^vol-vm-$vmid-/;
> +        } elsif (defined($vtype) && $vtype eq 'ct-vol') {
> +            die "illegal name '$name' - should be 'vol-ct-$vmid-*'\n"
> +                if $name !~ m/^vol-ct-$vmid-/;
> +        } else {
> +            die "illegal name '$name'"
> +                . " - should be 'vm-$vmid-*', 'vol-vm-$vmid-*' or 'vol-ct-$vmid-*'\n"
> +                if $name !~ m/^(?:vol-vm|vol-ct|vm)-$vmid-/;
> +        }

and also here

> +    }
>  
> -    $name = $class->find_free_diskname($storeid, $scfg, $vmid) if !$name;
> +    $name = $class->find_free_diskname($storeid, $scfg, $vmid, undef, 0, $vtype) if !$name;
>  
>      my @options = (
>          '--image-format', 2, '--size', int(($size + 1023) / 1024),
> diff --git a/src/PVE/Storage/ZFSPlugin.pm b/src/PVE/Storage/ZFSPlugin.pm
> index a05f521..259e468 100644
> --- a/src/PVE/Storage/ZFSPlugin.pm
> +++ b/src/PVE/Storage/ZFSPlugin.pm
> @@ -355,16 +355,25 @@ sub clone_image {
>  }
>  
>  sub alloc_image {
> -    my ($class, $storeid, $scfg, $vmid, $fmt, $name, $size) = @_;
> +    my ($class, $storeid, $scfg, $vmid, $fmt, $name, $size, $vtype) = @_;
>  
>      die "unsupported format '$fmt'" if $fmt ne 'raw';
>  
> -    die "illegal name '$name' - should be 'vm-$vmid-*'\n"
> -        if $name && $name !~ m/^vm-$vmid-/;
> +    if ($name) {
> +        if (defined($vtype) && $vtype eq 'vm-vol') {
> +            die "illegal name '$name' - should be 'vol-vm-$vmid-*'\n"
> +                if $name !~ m/^vol-vm-$vmid-/;
> +        } elsif (defined($vtype) && $vtype eq 'ct-vol') {
> +            die "non-subvolumes not allowed for containers\n";
> +        } else {
> +            die "illegal name '$name'" . " - should be 'vm-$vmid-*', 'vol-vm-$vmid-*'\n"
> +                if $name !~ m/^(?:vol-vm|vm)-$vmid-/;
> +        }
> +    }

and here

>  
>      my $volname = $name;
>  
> -    $volname = $class->find_free_diskname($storeid, $scfg, $vmid, $fmt) if !$volname;
> +    $volname = $class->find_free_diskname($storeid, $scfg, $vmid, $fmt, 0, $vtype) if !$volname;
>  
>      $class->zfs_create_zvol($scfg, $volname, $size);
>  
> diff --git a/src/PVE/Storage/ZFSPoolPlugin.pm b/src/PVE/Storage/ZFSPoolPlugin.pm
> index d65af69..f972718 100644
> --- a/src/PVE/Storage/ZFSPoolPlugin.pm
> +++ b/src/PVE/Storage/ZFSPoolPlugin.pm
> @@ -271,29 +271,42 @@ sub zfs_wait_for_zvol_link {
>  }
>  
>  sub alloc_image {
> -    my ($class, $storeid, $scfg, $vmid, $fmt, $name, $size) = @_;
> +    my ($class, $storeid, $scfg, $vmid, $fmt, $name, $size, $vtype) = @_;
>  
>      my $volname = $name;
>  
>      if ($fmt eq 'raw') {
> -
> -        die "illegal name '$volname' - should be 'vm-$vmid-*'\n"
> -            if $volname && $volname !~ m/^vm-$vmid-/;
> -        $volname = $class->find_free_diskname($storeid, $scfg, $vmid, $fmt)
> +        $volname = $class->find_free_diskname($storeid, $scfg, $vmid, $fmt, 0, $vtype)
>              if !$volname;
>  
> +        if ($vtype) {
> +            die "'raw' format not allowed for container volumes\n"
> +                if $vtype ne 'vm-vol';
> +
> +            die "illegal name '$volname' - should be 'vol-vm-$vmid-*'\n"
> +                if $volname !~ m/^vol-vm-$vmid-/;
> +        } else {
> +            die "illegal name '$volname' - should be 'vol-vm-$vmid-*' or 'vm-$vmid-*'\n"
> +                if $volname !~ m/^(vol-)?vm-$vmid-/;
> +        }
> +

here as well

>          $class->zfs_create_zvol($scfg, $volname, $size);
>          $class->zfs_wait_for_zvol_link($scfg, $volname);
>  
>      } elsif ($fmt eq 'subvol') {
> -
> -        die "illegal name '$volname' - should be 'subvol-$vmid-*'\n"
> -            if $volname && $volname !~ m/^subvol-$vmid-/;
> -        $volname = $class->find_free_diskname($storeid, $scfg, $vmid, $fmt)
> +        $volname = $class->find_free_diskname($storeid, $scfg, $vmid, $fmt, 0, $vtype)
>              if !$volname;
>  
> -        die "illegal name '$volname' - should be 'subvol-$vmid-*'\n"
> -            if $volname !~ m/^subvol-$vmid-/;
> +        if ($vtype) {
> +            die "'subvol' format not allowed for VM volumes\n"
> +                if $vtype ne 'ct-vol';
> +
> +            die "illegal name '$volname' - should be 'subvol-ct-$vmid-*'\n"
> +                if $volname !~ m/^subvol-ct-$vmid-/;
> +        } else {
> +            die "illegal name '$volname' - should be 'subvol-ct-$vmid-*' or 'subvol-$vmid-*'\n"
> +                if $volname !~ m/^subvol(-ct)?-$vmid-/;
> +        }

and here as well..

>  
>          $class->zfs_create_subvol($scfg, $volname, $size);
>  
> -- 
> 2.47.2
> 
> 
> 
> _______________________________________________
> pve-devel mailing list
> pve-devel@lists.proxmox.com
> https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
> 
> 
> 


_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] 74+ messages in thread

* Re: [pve-devel] [PATCH storage 22/26] zfs: update 'path' method for new naming scheme
  2025-07-29 11:15 ` [pve-devel] [PATCH storage 22/26] zfs: update 'path' method for new naming scheme Wolfgang Bumiller
@ 2025-07-30  9:31   ` Fabian Grünbichler
  0 siblings, 0 replies; 74+ messages in thread
From: Fabian Grünbichler @ 2025-07-30  9:31 UTC (permalink / raw)
  To: Proxmox VE development discussion

On July 29, 2025 1:15 pm, Wolfgang Bumiller wrote:
> Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
> ---
>  src/PVE/Storage/ZFSPoolPlugin.pm | 25 ++++++++++++++++---------
>  1 file changed, 16 insertions(+), 9 deletions(-)
> 
> diff --git a/src/PVE/Storage/ZFSPoolPlugin.pm b/src/PVE/Storage/ZFSPoolPlugin.pm
> index 2cae090..83cb9fb 100644
> --- a/src/PVE/Storage/ZFSPoolPlugin.pm
> +++ b/src/PVE/Storage/ZFSPoolPlugin.pm
> @@ -123,7 +123,15 @@ sub zfs_parse_zvol_list {
>      return $list;
>  }
>  
> -my sub image_vtype_from_name : prototype($) {
> +my sub volname_is_subvol : prototype($) {
> +    my ($volname) = @_;
> +    return 1 if $volname =~ /^(?:base-)?subvol-ct-/;
> +    return 1 if $volname =~ /^subvol-/;
> +    return 1 if $volname =~ /^basevol-/;
> +    return 0;
> +}
> +
> +my sub volume_type_from_name : prototype($) {
>      my ($name) = @_;
>  
>      return 'ct-vol' if $name =~ /^(base-)?subvol(-ct)?-/;
> @@ -194,16 +202,15 @@ sub path {
>      my $path = '';
>      my $mountpoint = $scfg->{mountpoint} // "/$scfg->{pool}";
>  
> -    if ($vtype eq "images") {
> -        if ($name =~ m/^subvol-/ || $name =~ m/^basevol-/) {
> -            $path = "$mountpoint/$name";
> -        } else {
> -            $path = "/dev/zvol/$scfg->{pool}/$name";
> -        }
> -        $path .= "\@$snapname" if defined($snapname);
> +    die "$vtype is not allowed in ZFSPool!"
> +        if $vtype ne 'vm-vol' && $vtype ne 'ct-vol' && $vtype ne 'images';

should use the volume_is_vdisk (currently is_volume_type) helper

> +
> +    if (volname_is_subvol($name)) {
> +        $path = "$mountpoint/$name";
>      } else {
> -        die "$vtype is not allowed in ZFSPool!";
> +        $path = "/dev/zvol/$scfg->{pool}/$name";
>      }
> +    $path .= "\@$snapname" if defined($snapname);
>  
>      return ($path, $vmid, $vtype);
>  }
> -- 
> 2.47.2
> 
> 
> 
> _______________________________________________
> pve-devel mailing list
> pve-devel@lists.proxmox.com
> https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
> 
> 
> 


_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] 74+ messages in thread

* Re: [pve-devel] [PATCH qemu-server 04/10] expect 'vm-vol' vtype wherever 'images' was expected
  2025-07-30  9:17   ` Fiona Ebner
@ 2025-07-30  9:33     ` Fiona Ebner
  0 siblings, 0 replies; 74+ messages in thread
From: Fiona Ebner @ 2025-07-30  9:33 UTC (permalink / raw)
  To: pve-devel, Wolfgang Bumiller

Am 30.07.25 um 11:18 AM schrieb Fiona Ebner:
> Am 29.07.25 um 1:25 PM schrieb Wolfgang Bumiller:
>> Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
>> ---
>>  src/PVE/API2/Qemu.pm   | 16 +++++++++-------
>>  src/PVE/QemuMigrate.pm |  3 ++-
>>  src/PVE/QemuServer.pm  |  6 ++++--
>>  3 files changed, 15 insertions(+), 10 deletions(-)
> 
> The verify_media_type() helper in QemuServer.pm needs updating too,
> e.g:
> 
> diff --git a/src/PVE/QemuServer.pm b/src/PVE/QemuServer.pm
> index 05a3be91..15b38caf 100644
> --- a/src/PVE/QemuServer.pm
> +++ b/src/PVE/QemuServer.pm
> @@ -1090,18 +1090,18 @@ sub verify_media_type {
>  
>      return if !$media;
>  
> -    my $etype;
>      if ($media eq 'disk') {
> -        $etype = 'images';
> +        return if $vtype eq 'images' || $vtype eq 'vm-vol';
> +        raise_param_exc({
> +            $opt =>
> +                "wrong volume type '$vtype' for media=$media - expected 'images' or 'vm-vol'",
> +        });
>      } elsif ($media eq 'cdrom') {
> -        $etype = 'iso';
> -    } else {
> -        die "internal error";
> +        return if $vtype eq 'iso';
> +        raise_param_exc({ $opt => "wrong volume type '$vtype' for media=$media - expected 'iso'" });
>      }
>  
> -    return if ($vtype eq $etype);
> -
> -    raise_param_exc({ $opt => "unexpected media type ($vtype != $etype)" });
> +    die "internal error - unexpected media type '$media'\n";
>  }
>  
>  sub cleanup_drive_path {

Other places that still need to be adapted:

QemuServer.pm:

$parse_backup_hints
complete_storage()
complete_migration_storage()

CLI/qm.pm:

remote_migrate_vm API endpoint
importdisk API endpoint

API2/Qemu.pm:

$check_storage_access - NEW_DISK_RE branch
$check_storage_access - branch checking $extraction_scfg
$check_storage_access_migrate
update_vm_async API endpoint - documentation for
  'import-working-storage' should also mention 'vm-vol'
clone_vm API endpoint
move_vm_disk API endpoint


_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] 74+ messages in thread

* Re: [pve-devel] [PATCH storage 17/26] plugins: add vtype parameter to alloc_image
  2025-07-29 11:15 ` [pve-devel] [PATCH storage 17/26] plugins: add vtype parameter to alloc_image Wolfgang Bumiller
  2025-07-30  9:24   ` Fabian Grünbichler
@ 2025-07-30 14:00   ` Max R. Carrara
  2025-07-30 14:05     ` Max R. Carrara
  1 sibling, 1 reply; 74+ messages in thread
From: Max R. Carrara @ 2025-07-30 14:00 UTC (permalink / raw)
  To: Proxmox VE development discussion

On Tue Jul 29, 2025 at 1:15 PM CEST, Wolfgang Bumiller wrote:
> Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
> ---
>  src/PVE/Storage/BTRFSPlugin.pm       | 25 ++++++++----
>  src/PVE/Storage/ESXiPlugin.pm        |  2 +-
>  src/PVE/Storage/ISCSIDirectPlugin.pm |  2 +-
>  src/PVE/Storage/ISCSIPlugin.pm       |  2 +-
>  src/PVE/Storage/LVMPlugin.pm         | 35 ++++++++++++-----
>  src/PVE/Storage/LvmThinPlugin.pm     | 19 +++++++--
>  src/PVE/Storage/Plugin.pm            | 59 +++++++++++++++++-----------
>  src/PVE/Storage/RBDPlugin.pm         | 27 +++++++++----
>  src/PVE/Storage/ZFSPlugin.pm         | 17 ++++++--
>  src/PVE/Storage/ZFSPoolPlugin.pm     | 35 +++++++++++------
>  10 files changed, 154 insertions(+), 69 deletions(-)
>
> diff --git a/src/PVE/Storage/BTRFSPlugin.pm b/src/PVE/Storage/BTRFSPlugin.pm
> index 585489c..0a42c88 100644
> --- a/src/PVE/Storage/BTRFSPlugin.pm
> +++ b/src/PVE/Storage/BTRFSPlugin.pm
> @@ -13,6 +13,7 @@ use POSIX qw(EEXIST);
>  
>  use PVE::Tools qw(run_command dir_glob_foreach);
>  
> +use PVE::Storage::Common;
>  use PVE::Storage::DirPlugin;
>  
>  use constant {
> @@ -193,15 +194,16 @@ sub filesystem_path {
>  
>      my $path = $class->get_subdir($scfg, $vtype);
>  
> -    $path .= "/$vmid" if $vtype eq 'images';
> +    my $is_volume_type = PVE::Storage::Common::is_volume_type($vtype);
> +    $path .= "/$vmid" if $is_volume_type;
>  
> -    if ($vtype eq 'images' && defined($format) && $format eq 'raw') {
> +    if ($is_volume_type && defined($format) && $format eq 'raw') {
>          my $dir = raw_name_to_dir($name);
>          if ($snapname) {
>              $dir .= "\@$snapname";
>          }
>          $path .= "/$dir/disk.raw";
> -    } elsif ($vtype eq 'images' && defined($format) && $format eq 'subvol') {
> +    } elsif ($is_volume_type && defined($format) && $format eq 'subvol') {
>          $path .= "/$name";
>          if ($snapname) {
>              $path .= "\@$snapname";
> @@ -322,19 +324,28 @@ sub clone_image {
>  }
>  
>  sub alloc_image {
> -    my ($class, $storeid, $scfg, $vmid, $fmt, $name, $size) = @_;
> +    my ($class, $storeid, $scfg, $vmid, $fmt, $name, $size, $vtype) = @_;
>  
>      if ($fmt ne 'raw' && $fmt ne 'subvol') {
> -        return $class->SUPER::alloc_image($storeid, $scfg, $vmid, $fmt, $name, $size);
> +        return $class->SUPER::alloc_image($storeid, $scfg, $vmid, $fmt, $name, $size, $vtype);
>      }
>  
>      # From Plugin.pm:
>  
> -    my $imagedir = $class->get_subdir($scfg, 'images') . "/$vmid";
> +    my $imagedir = $class->get_subdir($scfg, $vtype // 'images') . "/$vmid";
>  
>      mkpath $imagedir;
>  
> -    $name = $class->find_free_diskname($storeid, $scfg, $vmid, $fmt, 1) if !$name;
> +    if ($name) {
> +        if (defined($vtype)) {
> +            die "illegal name '$name' - should be 'vol-vm-$vmid-*'\n"
> +                if $vtype eq 'vm-vol' && $name !~ m/^vol-vm-$vmid-/;
> +            die "illegal name '$name' - should be 'vol-ct-$vmid-*'\n"
> +                if $vtype eq 'ct-vol' && $name !~ m/^vol-ct-$vmid-/;
> +        }
> +    } else {
> +        $name = $class->find_free_diskname($storeid, $scfg, $vmid, $fmt, 1, $vtype);
> +    }
>  
>      my (undef, $tmpfmt) = PVE::Storage::Plugin::parse_name_dir($name);
>  
> diff --git a/src/PVE/Storage/ESXiPlugin.pm b/src/PVE/Storage/ESXiPlugin.pm
> index ea2f8f9..d10b156 100644
> --- a/src/PVE/Storage/ESXiPlugin.pm
> +++ b/src/PVE/Storage/ESXiPlugin.pm
> @@ -480,7 +480,7 @@ sub path {
>  }
>  
>  sub alloc_image {
> -    my ($class, $storeid, $scfg, $vmid, $fmt, $name, $size) = @_;
> +    my ($class, $storeid, $scfg, $vmid, $fmt, $name, $size, $vtype) = @_;
>  
>      die "creating images is not supported for $class\n";
>  }
> diff --git a/src/PVE/Storage/ISCSIDirectPlugin.pm b/src/PVE/Storage/ISCSIDirectPlugin.pm
> index 98a3391..0fee541 100644
> --- a/src/PVE/Storage/ISCSIDirectPlugin.pm
> +++ b/src/PVE/Storage/ISCSIDirectPlugin.pm
> @@ -140,7 +140,7 @@ sub clone_image {
>  }
>  
>  sub alloc_image {
> -    my ($class, $storeid, $scfg, $vmid, $fmt, $name, $size) = @_;
> +    my ($class, $storeid, $scfg, $vmid, $fmt, $name, $size, $vtype) = @_;
>  
>      die "can't allocate space in iscsi storage\n";
>  }
> diff --git a/src/PVE/Storage/ISCSIPlugin.pm b/src/PVE/Storage/ISCSIPlugin.pm
> index 77a9173..5118d73 100644
> --- a/src/PVE/Storage/ISCSIPlugin.pm
> +++ b/src/PVE/Storage/ISCSIPlugin.pm
> @@ -402,7 +402,7 @@ sub clone_image {
>  }
>  
>  sub alloc_image {
> -    my ($class, $storeid, $scfg, $vmid, $fmt, $name, $size) = @_;
> +    my ($class, $storeid, $scfg, $vmid, $fmt, $name, $size, $vtype) = @_;
>  
>      die "can't allocate space in iscsi storage\n";
>  }
> diff --git a/src/PVE/Storage/LVMPlugin.pm b/src/PVE/Storage/LVMPlugin.pm
> index 55c4578..af789ba 100644
> --- a/src/PVE/Storage/LVMPlugin.pm
> +++ b/src/PVE/Storage/LVMPlugin.pm
> @@ -535,7 +535,7 @@ sub clone_image {
>  }
>  
>  sub find_free_diskname {
> -    my ($class, $storeid, $scfg, $vmid, $fmt, $add_fmt_suffix) = @_;
> +    my ($class, $storeid, $scfg, $vmid, $fmt, $add_fmt_suffix, $vtype) = @_;
>  
>      my $vg = $scfg->{vgname};
>  
> @@ -546,7 +546,7 @@ sub find_free_diskname {
>      $add_fmt_suffix = $fmt && $fmt eq 'qcow2' ? 1 : undef;
>  
>      return PVE::Storage::Plugin::get_next_vm_diskname(
> -        $disk_list, $storeid, $vmid, $fmt, $scfg, $add_fmt_suffix,
> +        $disk_list, $storeid, $vmid, $fmt, $scfg, $add_fmt_suffix, $vtype,
>      );
>  }
>  
> @@ -628,8 +628,8 @@ my sub calculate_lvm_size {
>      return $info->{'fully-allocated'} / 1024;
>  }
>  
> -my sub alloc_lvm_image {
> -    my ($class, $storeid, $scfg, $vmid, $fmt, $name, $size, $backing_snap) = @_;
> +my sub alloc_lvm_image : prototype($$$$$$$$$) {
> +    my ($class, $storeid, $scfg, $vmid, $fmt, $name, $size, $backing_snap, $vtype) = @_;
>  
>      die "unsupported format '$fmt'" if $fmt ne 'raw' && $fmt ne 'qcow2';
>  
> @@ -637,6 +637,20 @@ my sub alloc_lvm_image {
>          if $fmt eq 'qcow2'
>          && !$scfg->{'snapshot-as-volume-chain'};
>  
> +    if ($name) {
> +        if (defined($vtype) && $vtype eq 'vm-vol') {
> +            die "illegal name '$name' - should be 'vol-vm-$vmid-*'\n"
> +                if $name !~ m/^vol-vm-$vmid-/;
> +        } elsif (defined($vtype) && $vtype eq 'ct-vol') {
> +            die "illegal name '$name' - should be 'vol-ct-$vmid-*'\n"
> +                if $name !~ m/^vol-ct-$vmid-/;
> +        } else {
> +            die "illegal name '$name'"
> +                . " - should be 'vm-$vmid-*', 'vol-vm-$vmid-*' or 'vol-ct-$vmid-*'\n"
> +                if $name !~ m/^(?:vol-vm|vol-ct|vm)-$vmid-/;
> +        }
> +    }
> +
>      $class->parse_volname($name);
>  
>      my $vgs = lvm_vgs();
> @@ -672,20 +686,20 @@ my sub alloc_lvm_image {
>  }
>  
>  sub alloc_image {
> -    my ($class, $storeid, $scfg, $vmid, $fmt, $name, $size) = @_;
> +    my ($class, $storeid, $scfg, $vmid, $fmt, $name, $size, $vtype) = @_;
>  
> -    $name = $class->find_free_diskname($storeid, $scfg, $vmid, $fmt)
> +    $name = $class->find_free_diskname($storeid, $scfg, $vmid, $fmt, 0, $vtype)
>          if !$name;
>  
> -    alloc_lvm_image($class, $storeid, $scfg, $vmid, $fmt, $name, $size);
> +    alloc_lvm_image($class, $storeid, $scfg, $vmid, $fmt, $name, $size, undef, $vtype);
>  
>      return $name;
>  }
>  
> -my sub alloc_snap_image {
> +my sub alloc_snap_image : prototype($$$$$) {
>      my ($class, $storeid, $scfg, $volname, $backing_snap) = @_;
>  
> -    my ($vmid, $format) = ($class->parse_volname($volname))[2, 6];
> +    my ($vtype, $vmid, $format) = ($class->parse_volname($volname))[0, 2, 6];
>      my $path = $class->path($scfg, $volname, $storeid, $backing_snap);
>  
>      #we need to use same size than the backing image qcow2 virtual-size
> @@ -694,7 +708,8 @@ my sub alloc_snap_image {
>  
>      $size = $size / 1024; #we use kb in lvcreate
>  
> -    alloc_lvm_image($class, $storeid, $scfg, $vmid, $format, $volname, $size, $backing_snap);
> +    alloc_lvm_image($class, $storeid, $scfg, $vmid, $format, $volname, $size, $backing_snap,
> +        $vtype);
>  }
>  
>  my sub free_snap_image {
> diff --git a/src/PVE/Storage/LvmThinPlugin.pm b/src/PVE/Storage/LvmThinPlugin.pm
> index f6615d9..2071822 100644
> --- a/src/PVE/Storage/LvmThinPlugin.pm
> +++ b/src/PVE/Storage/LvmThinPlugin.pm
> @@ -122,12 +122,23 @@ my $set_lv_autoactivation = sub {
>  };
>  
>  sub alloc_image {
> -    my ($class, $storeid, $scfg, $vmid, $fmt, $name, $size) = @_;
> +    my ($class, $storeid, $scfg, $vmid, $fmt, $name, $size, $vtype) = @_;
>  
>      die "unsupported format '$fmt'" if $fmt ne 'raw';
>  
> -    die "illegal name '$name' - should be 'vm-$vmid-*'\n"
> -        if $name && $name !~ m/^vm-$vmid-/;
> +    if ($name) {
> +        if (defined($vtype) && $vtype eq 'vm-vol') {
> +            die "illegal name '$name' - should be 'vol-vm-$vmid-*'\n"
> +                if $name !~ m/^vol-vm-$vmid-/;
> +        } elsif (defined($vtype) && $vtype eq 'ct-vol') {
> +            die "illegal name '$name' - should be 'vol-ct-$vmid-*'\n"
> +                if $name !~ m/^vol-ct-$vmid-/;
> +        } else {
> +            die "illegal name '$name'"
> +                . " - should be 'vm-$vmid-*', 'vol-vm-$vmid-*' or 'vol-ct-$vmid-*'\n"
> +                if $name !~ m/^(?:vol-vm|vol-ct|vm)-$vmid-/;
> +        }
> +    }

^ This currently trips up when you try to make a snapshot on a VM disk
following the new naming scheme:

TASK ERROR: illegal name 'vm-200-state-foo' - should be 'vol-vm-200-*'

Did some debugging and stacktrace-diving--turns out that
`PVE::QemuConfig::__snapshot_save_vmstate()` passes the wrong name for
the snapshot.

Should we keep the old snapshot naming scheme for 'vm-$vmid-*' volumes
or also use the new one from now on?

With that being said, perhaps this could be a good opportunity to let
`PVE::Storage::vdisk_alloc()` decide on the snapshot's name instead?
As in, have `__snapshot_save_vmstate()` just pass on the plain name,
that is "foo" instead of e.g. "vm-666-state-foo" since the $vmid is
passed along anyway (and the vtype now is, too).

NOTE: This also happens for directory storage too, and I'm assuming
others as well. However, containers seem to be fine..?

>  
>      my $vgs = PVE::Storage::LVMPlugin::lvm_vgs();
>  
> @@ -135,7 +146,7 @@ sub alloc_image {
>  
>      die "no such volume group '$vg'\n" if !defined($vgs->{$vg});
>  
> -    $name = $class->find_free_diskname($storeid, $scfg, $vmid)
> +    $name = $class->find_free_diskname($storeid, $scfg, $vmid, undef, 0, $vtype)
>          if !$name;
>  
>      my $cmd = [
> diff --git a/src/PVE/Storage/Plugin.pm b/src/PVE/Storage/Plugin.pm
> index 660045d..adaca47 100644
> --- a/src/PVE/Storage/Plugin.pm
> +++ b/src/PVE/Storage/Plugin.pm
> @@ -851,7 +851,7 @@ sub filesystem_path {
>  
>      my $dir = $class->get_subdir($scfg, $vtype);
>  
> -    $dir .= "/$vmid" if $vtype eq 'images';
> +    $dir .= "/$vmid" if PVE::Storage::Common::is_volume_type($vtype);
>  
>      my $path = "$dir/$name";
>  
> @@ -912,30 +912,34 @@ sub create_base {
>  }
>  
>  my $get_vm_disk_number = sub {
> -    my ($disk_name, $scfg, $vmid, $suffix) = @_;
> -
> -    my $disk_regex = qr/(vm|base)-$vmid-disk-(\d+)$suffix/;
> -
> -    my $type = $scfg->{type};
> -    my $def = { %{ $defaultData->{plugindata}->{$type} } };
> -
> -    my $valid = $def->{format}->[0];
> -    if ($valid->{subvol}) {
> -        $disk_regex = qr/(vm|base|subvol|basevol)-$vmid-disk-(\d+)/;
> -    }
> -
> -    if ($disk_name =~ m/$disk_regex/) {
> -        return $2;
> +    my ($disk_volid, $scfg, $vmid, $suffix) = @_;
> +
> +    # Dir storage have a vmid/ subdir, zfs/lvm/rbd/... do not.
> +    # Also: LVM storages don't pass the `storeid:` prefix...
> +    if ($disk_volid =~ m!^(?:[^:]+:)? (?:\d+/)? $DISK_NAME_REGEX $!xn) {
> +        my $label = $+{label};
> +        # Dir storages have a format suffix, zfs/lvm/rbd/... do not.
> +        if ($label =~ /^disk-(\d+)(?:\..*)?$/) {
> +            return int($1);
> +        }
>      }
>  
>      return undef;
>  };
>  
> +# note: disk_list is an array of *volids*
>  sub get_next_vm_diskname {
> -    my ($disk_list, $storeid, $vmid, $fmt, $scfg, $add_fmt_suffix) = @_;
> +    my ($disk_list, $storeid, $vmid, $fmt, $scfg, $add_fmt_suffix, $vtype) = @_;
>  
>      $fmt //= '';
> -    my $prefix = ($fmt eq 'subvol') ? 'subvol' : 'vm';
> +    my $prefix;
> +    if (defined($vtype) && $vtype eq 'vm-vol') {
> +        $prefix = 'vol-vm';
> +    } elsif (defined($vtype) && $vtype eq 'ct-vol') {
> +        $prefix = ($fmt eq 'subvol') ? 'subvol-ct' : 'vol-ct';
> +    } else {
> +        $prefix = ($fmt eq 'subvol') ? 'subvol' : 'vm';
> +    }
>      my $suffix = $add_fmt_suffix ? ".$fmt" : '';
>  
>      my $disk_ids = {};
> @@ -954,13 +958,13 @@ sub get_next_vm_diskname {
>  }
>  
>  sub find_free_diskname {
> -    my ($class, $storeid, $scfg, $vmid, $fmt, $add_fmt_suffix) = @_;
> +    my ($class, $storeid, $scfg, $vmid, $fmt, $add_fmt_suffix, $vtype) = @_;
>  
> -    my $disks = $class->list_images($storeid, $scfg, $vmid);
> +    my $disks = $class->list_images($storeid, $scfg, $vmid, undef, undef, $vtype);
>  
>      my $disk_list = [map { $_->{volid} } @$disks];
>  
> -    return get_next_vm_diskname($disk_list, $storeid, $vmid, $fmt, $scfg, $add_fmt_suffix);
> +    return get_next_vm_diskname($disk_list, $storeid, $vmid, $fmt, $scfg, $add_fmt_suffix, $vtype);
>  }
>  
>  sub clone_image {
> @@ -1011,14 +1015,23 @@ sub clone_image {
>  }
>  
>  sub alloc_image {
> -    my ($class, $storeid, $scfg, $vmid, $fmt, $name, $size) = @_;
> +    my ($class, $storeid, $scfg, $vmid, $fmt, $name, $size, $vtype) = @_;
>  
> -    my $imagedir = $class->get_subdir($scfg, 'images');
> +    my $imagedir = $class->get_subdir($scfg, $vtype // 'images');
>      $imagedir .= "/$vmid";
>  
>      mkpath $imagedir;
>  
> -    $name = $class->find_free_diskname($storeid, $scfg, $vmid, $fmt, 1) if !$name;
> +    if ($name) {
> +        if (defined($vtype)) {
> +            die "illegal name '$name' - should be 'vol-vm-$vmid-*'\n"
> +                if $vtype eq 'vm-vol' && $name !~ m/^vol-vm-$vmid-/;
> +            die "illegal name '$name' - should be 'vol-ct-$vmid-*'\n"
> +                if $vtype eq 'ct-vol' && $name !~ m/^vol-ct-$vmid-/;
> +        }
> +    } else {
> +        $name = $class->find_free_diskname($storeid, $scfg, $vmid, $fmt, 1, $vtype);
> +    }
>  
>      my (undef, $tmpfmt) = parse_name_dir($name);
>  
> diff --git a/src/PVE/Storage/RBDPlugin.pm b/src/PVE/Storage/RBDPlugin.pm
> index 2ef1280..839ff73 100644
> --- a/src/PVE/Storage/RBDPlugin.pm
> +++ b/src/PVE/Storage/RBDPlugin.pm
> @@ -620,7 +620,7 @@ sub qemu_blockdev_options {
>  }
>  
>  sub find_free_diskname {
> -    my ($class, $storeid, $scfg, $vmid, $fmt, $add_fmt_suffix) = @_;
> +    my ($class, $storeid, $scfg, $vmid, $fmt, $add_fmt_suffix, $vtype) = @_;
>  
>      my $cmd = $rbd_cmd->($scfg, $storeid, 'ls');
>  
> @@ -640,7 +640,9 @@ sub find_free_diskname {
>  
>      die $err if $err && $err !~ m/doesn't contain rbd images/;
>  
> -    return PVE::Storage::Plugin::get_next_vm_diskname($disk_list, $storeid, $vmid, undef, $scfg);
> +    return PVE::Storage::Plugin::get_next_vm_diskname(
> +        $disk_list, $storeid, $vmid, undef, $scfg, 0, $vtype,
> +    );
>  }
>  
>  sub create_base {
> @@ -730,12 +732,23 @@ sub clone_image {
>  }
>  
>  sub alloc_image {
> -    my ($class, $storeid, $scfg, $vmid, $fmt, $name, $size) = @_;
> -
> -    die "illegal name '$name' - should be 'vm-$vmid-*'\n"
> -        if $name && $name !~ m/^vm-$vmid-/;
> +    my ($class, $storeid, $scfg, $vmid, $fmt, $name, $size, $vtype) = @_;
> +
> +    if ($name) {
> +        if (defined($vtype) && $vtype eq 'vm-vol') {
> +            die "illegal name '$name' - should be 'vol-vm-$vmid-*'\n"
> +                if $name !~ m/^vol-vm-$vmid-/;
> +        } elsif (defined($vtype) && $vtype eq 'ct-vol') {
> +            die "illegal name '$name' - should be 'vol-ct-$vmid-*'\n"
> +                if $name !~ m/^vol-ct-$vmid-/;
> +        } else {
> +            die "illegal name '$name'"
> +                . " - should be 'vm-$vmid-*', 'vol-vm-$vmid-*' or 'vol-ct-$vmid-*'\n"
> +                if $name !~ m/^(?:vol-vm|vol-ct|vm)-$vmid-/;
> +        }
> +    }
>  
> -    $name = $class->find_free_diskname($storeid, $scfg, $vmid) if !$name;
> +    $name = $class->find_free_diskname($storeid, $scfg, $vmid, undef, 0, $vtype) if !$name;
>  
>      my @options = (
>          '--image-format', 2, '--size', int(($size + 1023) / 1024),
> diff --git a/src/PVE/Storage/ZFSPlugin.pm b/src/PVE/Storage/ZFSPlugin.pm
> index a05f521..259e468 100644
> --- a/src/PVE/Storage/ZFSPlugin.pm
> +++ b/src/PVE/Storage/ZFSPlugin.pm
> @@ -355,16 +355,25 @@ sub clone_image {
>  }
>  
>  sub alloc_image {
> -    my ($class, $storeid, $scfg, $vmid, $fmt, $name, $size) = @_;
> +    my ($class, $storeid, $scfg, $vmid, $fmt, $name, $size, $vtype) = @_;
>  
>      die "unsupported format '$fmt'" if $fmt ne 'raw';
>  
> -    die "illegal name '$name' - should be 'vm-$vmid-*'\n"
> -        if $name && $name !~ m/^vm-$vmid-/;
> +    if ($name) {
> +        if (defined($vtype) && $vtype eq 'vm-vol') {
> +            die "illegal name '$name' - should be 'vol-vm-$vmid-*'\n"
> +                if $name !~ m/^vol-vm-$vmid-/;
> +        } elsif (defined($vtype) && $vtype eq 'ct-vol') {
> +            die "non-subvolumes not allowed for containers\n";
> +        } else {
> +            die "illegal name '$name'" . " - should be 'vm-$vmid-*', 'vol-vm-$vmid-*'\n"
> +                if $name !~ m/^(?:vol-vm|vm)-$vmid-/;
> +        }
> +    }
>  
>      my $volname = $name;
>  
> -    $volname = $class->find_free_diskname($storeid, $scfg, $vmid, $fmt) if !$volname;
> +    $volname = $class->find_free_diskname($storeid, $scfg, $vmid, $fmt, 0, $vtype) if !$volname;
>  
>      $class->zfs_create_zvol($scfg, $volname, $size);
>  
> diff --git a/src/PVE/Storage/ZFSPoolPlugin.pm b/src/PVE/Storage/ZFSPoolPlugin.pm
> index d65af69..f972718 100644
> --- a/src/PVE/Storage/ZFSPoolPlugin.pm
> +++ b/src/PVE/Storage/ZFSPoolPlugin.pm
> @@ -271,29 +271,42 @@ sub zfs_wait_for_zvol_link {
>  }
>  
>  sub alloc_image {
> -    my ($class, $storeid, $scfg, $vmid, $fmt, $name, $size) = @_;
> +    my ($class, $storeid, $scfg, $vmid, $fmt, $name, $size, $vtype) = @_;
>  
>      my $volname = $name;
>  
>      if ($fmt eq 'raw') {
> -
> -        die "illegal name '$volname' - should be 'vm-$vmid-*'\n"
> -            if $volname && $volname !~ m/^vm-$vmid-/;
> -        $volname = $class->find_free_diskname($storeid, $scfg, $vmid, $fmt)
> +        $volname = $class->find_free_diskname($storeid, $scfg, $vmid, $fmt, 0, $vtype)
>              if !$volname;
>  
> +        if ($vtype) {
> +            die "'raw' format not allowed for container volumes\n"
> +                if $vtype ne 'vm-vol';
> +
> +            die "illegal name '$volname' - should be 'vol-vm-$vmid-*'\n"
> +                if $volname !~ m/^vol-vm-$vmid-/;
> +        } else {
> +            die "illegal name '$volname' - should be 'vol-vm-$vmid-*' or 'vm-$vmid-*'\n"
> +                if $volname !~ m/^(vol-)?vm-$vmid-/;
> +        }
> +
>          $class->zfs_create_zvol($scfg, $volname, $size);
>          $class->zfs_wait_for_zvol_link($scfg, $volname);
>  
>      } elsif ($fmt eq 'subvol') {
> -
> -        die "illegal name '$volname' - should be 'subvol-$vmid-*'\n"
> -            if $volname && $volname !~ m/^subvol-$vmid-/;
> -        $volname = $class->find_free_diskname($storeid, $scfg, $vmid, $fmt)
> +        $volname = $class->find_free_diskname($storeid, $scfg, $vmid, $fmt, 0, $vtype)
>              if !$volname;
>  
> -        die "illegal name '$volname' - should be 'subvol-$vmid-*'\n"
> -            if $volname !~ m/^subvol-$vmid-/;
> +        if ($vtype) {
> +            die "'subvol' format not allowed for VM volumes\n"
> +                if $vtype ne 'ct-vol';
> +
> +            die "illegal name '$volname' - should be 'subvol-ct-$vmid-*'\n"
> +                if $volname !~ m/^subvol-ct-$vmid-/;
> +        } else {
> +            die "illegal name '$volname' - should be 'subvol-ct-$vmid-*' or 'subvol-$vmid-*'\n"
> +                if $volname !~ m/^subvol(-ct)?-$vmid-/;
> +        }
>  
>          $class->zfs_create_subvol($scfg, $volname, $size);
>  



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] 74+ messages in thread

* Re: [pve-devel] [PATCH storage 17/26] plugins: add vtype parameter to alloc_image
  2025-07-30 14:00   ` Max R. Carrara
@ 2025-07-30 14:05     ` Max R. Carrara
  2025-07-30 14:26       ` Fabian Grünbichler
  0 siblings, 1 reply; 74+ messages in thread
From: Max R. Carrara @ 2025-07-30 14:05 UTC (permalink / raw)
  To: Proxmox VE development discussion

On Wed Jul 30, 2025 at 4:00 PM CEST, Max R. Carrara wrote:
> On Tue Jul 29, 2025 at 1:15 PM CEST, Wolfgang Bumiller wrote:
> > Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
> > ---
> >  src/PVE/Storage/BTRFSPlugin.pm       | 25 ++++++++----
> >  src/PVE/Storage/ESXiPlugin.pm        |  2 +-
> >  src/PVE/Storage/ISCSIDirectPlugin.pm |  2 +-
> >  src/PVE/Storage/ISCSIPlugin.pm       |  2 +-
> >  src/PVE/Storage/LVMPlugin.pm         | 35 ++++++++++++-----
> >  src/PVE/Storage/LvmThinPlugin.pm     | 19 +++++++--
> >  src/PVE/Storage/Plugin.pm            | 59 +++++++++++++++++-----------
> >  src/PVE/Storage/RBDPlugin.pm         | 27 +++++++++----
> >  src/PVE/Storage/ZFSPlugin.pm         | 17 ++++++--
> >  src/PVE/Storage/ZFSPoolPlugin.pm     | 35 +++++++++++------
> >  10 files changed, 154 insertions(+), 69 deletions(-)
> >
> > diff --git a/src/PVE/Storage/BTRFSPlugin.pm b/src/PVE/Storage/BTRFSPlugin.pm
> > index 585489c..0a42c88 100644
> > --- a/src/PVE/Storage/BTRFSPlugin.pm
> > +++ b/src/PVE/Storage/BTRFSPlugin.pm
> > @@ -13,6 +13,7 @@ use POSIX qw(EEXIST);
> >  
> >  use PVE::Tools qw(run_command dir_glob_foreach);
> >  
> > +use PVE::Storage::Common;
> >  use PVE::Storage::DirPlugin;
> >  
> >  use constant {
> > @@ -193,15 +194,16 @@ sub filesystem_path {
> >  
> >      my $path = $class->get_subdir($scfg, $vtype);
> >  
> > -    $path .= "/$vmid" if $vtype eq 'images';
> > +    my $is_volume_type = PVE::Storage::Common::is_volume_type($vtype);
> > +    $path .= "/$vmid" if $is_volume_type;
> >  
> > -    if ($vtype eq 'images' && defined($format) && $format eq 'raw') {
> > +    if ($is_volume_type && defined($format) && $format eq 'raw') {
> >          my $dir = raw_name_to_dir($name);
> >          if ($snapname) {
> >              $dir .= "\@$snapname";
> >          }
> >          $path .= "/$dir/disk.raw";
> > -    } elsif ($vtype eq 'images' && defined($format) && $format eq 'subvol') {
> > +    } elsif ($is_volume_type && defined($format) && $format eq 'subvol') {
> >          $path .= "/$name";
> >          if ($snapname) {
> >              $path .= "\@$snapname";
> > @@ -322,19 +324,28 @@ sub clone_image {
> >  }
> >  
> >  sub alloc_image {
> > -    my ($class, $storeid, $scfg, $vmid, $fmt, $name, $size) = @_;
> > +    my ($class, $storeid, $scfg, $vmid, $fmt, $name, $size, $vtype) = @_;
> >  
> >      if ($fmt ne 'raw' && $fmt ne 'subvol') {
> > -        return $class->SUPER::alloc_image($storeid, $scfg, $vmid, $fmt, $name, $size);
> > +        return $class->SUPER::alloc_image($storeid, $scfg, $vmid, $fmt, $name, $size, $vtype);
> >      }
> >  
> >      # From Plugin.pm:
> >  
> > -    my $imagedir = $class->get_subdir($scfg, 'images') . "/$vmid";
> > +    my $imagedir = $class->get_subdir($scfg, $vtype // 'images') . "/$vmid";
> >  
> >      mkpath $imagedir;
> >  
> > -    $name = $class->find_free_diskname($storeid, $scfg, $vmid, $fmt, 1) if !$name;
> > +    if ($name) {
> > +        if (defined($vtype)) {
> > +            die "illegal name '$name' - should be 'vol-vm-$vmid-*'\n"
> > +                if $vtype eq 'vm-vol' && $name !~ m/^vol-vm-$vmid-/;
> > +            die "illegal name '$name' - should be 'vol-ct-$vmid-*'\n"
> > +                if $vtype eq 'ct-vol' && $name !~ m/^vol-ct-$vmid-/;
> > +        }
> > +    } else {
> > +        $name = $class->find_free_diskname($storeid, $scfg, $vmid, $fmt, 1, $vtype);
> > +    }
> >  
> >      my (undef, $tmpfmt) = PVE::Storage::Plugin::parse_name_dir($name);
> >  
> > diff --git a/src/PVE/Storage/ESXiPlugin.pm b/src/PVE/Storage/ESXiPlugin.pm
> > index ea2f8f9..d10b156 100644
> > --- a/src/PVE/Storage/ESXiPlugin.pm
> > +++ b/src/PVE/Storage/ESXiPlugin.pm
> > @@ -480,7 +480,7 @@ sub path {
> >  }
> >  
> >  sub alloc_image {
> > -    my ($class, $storeid, $scfg, $vmid, $fmt, $name, $size) = @_;
> > +    my ($class, $storeid, $scfg, $vmid, $fmt, $name, $size, $vtype) = @_;
> >  
> >      die "creating images is not supported for $class\n";
> >  }
> > diff --git a/src/PVE/Storage/ISCSIDirectPlugin.pm b/src/PVE/Storage/ISCSIDirectPlugin.pm
> > index 98a3391..0fee541 100644
> > --- a/src/PVE/Storage/ISCSIDirectPlugin.pm
> > +++ b/src/PVE/Storage/ISCSIDirectPlugin.pm
> > @@ -140,7 +140,7 @@ sub clone_image {
> >  }
> >  
> >  sub alloc_image {
> > -    my ($class, $storeid, $scfg, $vmid, $fmt, $name, $size) = @_;
> > +    my ($class, $storeid, $scfg, $vmid, $fmt, $name, $size, $vtype) = @_;
> >  
> >      die "can't allocate space in iscsi storage\n";
> >  }
> > diff --git a/src/PVE/Storage/ISCSIPlugin.pm b/src/PVE/Storage/ISCSIPlugin.pm
> > index 77a9173..5118d73 100644
> > --- a/src/PVE/Storage/ISCSIPlugin.pm
> > +++ b/src/PVE/Storage/ISCSIPlugin.pm
> > @@ -402,7 +402,7 @@ sub clone_image {
> >  }
> >  
> >  sub alloc_image {
> > -    my ($class, $storeid, $scfg, $vmid, $fmt, $name, $size) = @_;
> > +    my ($class, $storeid, $scfg, $vmid, $fmt, $name, $size, $vtype) = @_;
> >  
> >      die "can't allocate space in iscsi storage\n";
> >  }
> > diff --git a/src/PVE/Storage/LVMPlugin.pm b/src/PVE/Storage/LVMPlugin.pm
> > index 55c4578..af789ba 100644
> > --- a/src/PVE/Storage/LVMPlugin.pm
> > +++ b/src/PVE/Storage/LVMPlugin.pm
> > @@ -535,7 +535,7 @@ sub clone_image {
> >  }
> >  
> >  sub find_free_diskname {
> > -    my ($class, $storeid, $scfg, $vmid, $fmt, $add_fmt_suffix) = @_;
> > +    my ($class, $storeid, $scfg, $vmid, $fmt, $add_fmt_suffix, $vtype) = @_;
> >  
> >      my $vg = $scfg->{vgname};
> >  
> > @@ -546,7 +546,7 @@ sub find_free_diskname {
> >      $add_fmt_suffix = $fmt && $fmt eq 'qcow2' ? 1 : undef;
> >  
> >      return PVE::Storage::Plugin::get_next_vm_diskname(
> > -        $disk_list, $storeid, $vmid, $fmt, $scfg, $add_fmt_suffix,
> > +        $disk_list, $storeid, $vmid, $fmt, $scfg, $add_fmt_suffix, $vtype,
> >      );
> >  }
> >  
> > @@ -628,8 +628,8 @@ my sub calculate_lvm_size {
> >      return $info->{'fully-allocated'} / 1024;
> >  }
> >  
> > -my sub alloc_lvm_image {
> > -    my ($class, $storeid, $scfg, $vmid, $fmt, $name, $size, $backing_snap) = @_;
> > +my sub alloc_lvm_image : prototype($$$$$$$$$) {
> > +    my ($class, $storeid, $scfg, $vmid, $fmt, $name, $size, $backing_snap, $vtype) = @_;
> >  
> >      die "unsupported format '$fmt'" if $fmt ne 'raw' && $fmt ne 'qcow2';
> >  
> > @@ -637,6 +637,20 @@ my sub alloc_lvm_image {
> >          if $fmt eq 'qcow2'
> >          && !$scfg->{'snapshot-as-volume-chain'};
> >  
> > +    if ($name) {
> > +        if (defined($vtype) && $vtype eq 'vm-vol') {
> > +            die "illegal name '$name' - should be 'vol-vm-$vmid-*'\n"
> > +                if $name !~ m/^vol-vm-$vmid-/;
> > +        } elsif (defined($vtype) && $vtype eq 'ct-vol') {
> > +            die "illegal name '$name' - should be 'vol-ct-$vmid-*'\n"
> > +                if $name !~ m/^vol-ct-$vmid-/;
> > +        } else {
> > +            die "illegal name '$name'"
> > +                . " - should be 'vm-$vmid-*', 'vol-vm-$vmid-*' or 'vol-ct-$vmid-*'\n"
> > +                if $name !~ m/^(?:vol-vm|vol-ct|vm)-$vmid-/;
> > +        }
> > +    }
> > +
> >      $class->parse_volname($name);
> >  
> >      my $vgs = lvm_vgs();
> > @@ -672,20 +686,20 @@ my sub alloc_lvm_image {
> >  }
> >  
> >  sub alloc_image {
> > -    my ($class, $storeid, $scfg, $vmid, $fmt, $name, $size) = @_;
> > +    my ($class, $storeid, $scfg, $vmid, $fmt, $name, $size, $vtype) = @_;
> >  
> > -    $name = $class->find_free_diskname($storeid, $scfg, $vmid, $fmt)
> > +    $name = $class->find_free_diskname($storeid, $scfg, $vmid, $fmt, 0, $vtype)
> >          if !$name;
> >  
> > -    alloc_lvm_image($class, $storeid, $scfg, $vmid, $fmt, $name, $size);
> > +    alloc_lvm_image($class, $storeid, $scfg, $vmid, $fmt, $name, $size, undef, $vtype);
> >  
> >      return $name;
> >  }
> >  
> > -my sub alloc_snap_image {
> > +my sub alloc_snap_image : prototype($$$$$) {
> >      my ($class, $storeid, $scfg, $volname, $backing_snap) = @_;
> >  
> > -    my ($vmid, $format) = ($class->parse_volname($volname))[2, 6];
> > +    my ($vtype, $vmid, $format) = ($class->parse_volname($volname))[0, 2, 6];
> >      my $path = $class->path($scfg, $volname, $storeid, $backing_snap);
> >  
> >      #we need to use same size than the backing image qcow2 virtual-size
> > @@ -694,7 +708,8 @@ my sub alloc_snap_image {
> >  
> >      $size = $size / 1024; #we use kb in lvcreate
> >  
> > -    alloc_lvm_image($class, $storeid, $scfg, $vmid, $format, $volname, $size, $backing_snap);
> > +    alloc_lvm_image($class, $storeid, $scfg, $vmid, $format, $volname, $size, $backing_snap,
> > +        $vtype);
> >  }
> >  
> >  my sub free_snap_image {
> > diff --git a/src/PVE/Storage/LvmThinPlugin.pm b/src/PVE/Storage/LvmThinPlugin.pm
> > index f6615d9..2071822 100644
> > --- a/src/PVE/Storage/LvmThinPlugin.pm
> > +++ b/src/PVE/Storage/LvmThinPlugin.pm
> > @@ -122,12 +122,23 @@ my $set_lv_autoactivation = sub {
> >  };
> >  
> >  sub alloc_image {
> > -    my ($class, $storeid, $scfg, $vmid, $fmt, $name, $size) = @_;
> > +    my ($class, $storeid, $scfg, $vmid, $fmt, $name, $size, $vtype) = @_;
> >  
> >      die "unsupported format '$fmt'" if $fmt ne 'raw';
> >  
> > -    die "illegal name '$name' - should be 'vm-$vmid-*'\n"
> > -        if $name && $name !~ m/^vm-$vmid-/;
> > +    if ($name) {
> > +        if (defined($vtype) && $vtype eq 'vm-vol') {
> > +            die "illegal name '$name' - should be 'vol-vm-$vmid-*'\n"
> > +                if $name !~ m/^vol-vm-$vmid-/;
> > +        } elsif (defined($vtype) && $vtype eq 'ct-vol') {
> > +            die "illegal name '$name' - should be 'vol-ct-$vmid-*'\n"
> > +                if $name !~ m/^vol-ct-$vmid-/;
> > +        } else {
> > +            die "illegal name '$name'"
> > +                . " - should be 'vm-$vmid-*', 'vol-vm-$vmid-*' or 'vol-ct-$vmid-*'\n"
> > +                if $name !~ m/^(?:vol-vm|vol-ct|vm)-$vmid-/;
> > +        }
> > +    }
>
> ^ This currently trips up when you try to make a snapshot on a VM disk
> following the new naming scheme:
>
> TASK ERROR: illegal name 'vm-200-state-foo' - should be 'vol-vm-200-*'
>
> Did some debugging and stacktrace-diving--turns out that
> `PVE::QemuConfig::__snapshot_save_vmstate()` passes the wrong name for
> the snapshot.
>
> Should we keep the old snapshot naming scheme for 'vm-$vmid-*' volumes
> or also use the new one from now on?
>
> With that being said, perhaps this could be a good opportunity to let
> `PVE::Storage::vdisk_alloc()` decide on the snapshot's name instead?
> As in, have `__snapshot_save_vmstate()` just pass on the plain name,
> that is "foo" instead of e.g. "vm-666-state-foo" since the $vmid is
> passed along anyway (and the vtype now is, too).
>
> NOTE: This also happens for directory storage too, and I'm assuming
> others as well. However, containers seem to be fine..?

I forgot to mention: VM disks with the legacy naming scheme work fine.
Just double checked for CTs--CT disks with both the legacy naming and
new naming scheme work fine (on lvm-thin).

>
> >  
> >      my $vgs = PVE::Storage::LVMPlugin::lvm_vgs();
> >  
> > @@ -135,7 +146,7 @@ sub alloc_image {
> >  
> >      die "no such volume group '$vg'\n" if !defined($vgs->{$vg});
> >  
> > -    $name = $class->find_free_diskname($storeid, $scfg, $vmid)
> > +    $name = $class->find_free_diskname($storeid, $scfg, $vmid, undef, 0, $vtype)
> >          if !$name;
> >  
> >      my $cmd = [
> > diff --git a/src/PVE/Storage/Plugin.pm b/src/PVE/Storage/Plugin.pm
> > index 660045d..adaca47 100644
> > --- a/src/PVE/Storage/Plugin.pm
> > +++ b/src/PVE/Storage/Plugin.pm
> > @@ -851,7 +851,7 @@ sub filesystem_path {
> >  
> >      my $dir = $class->get_subdir($scfg, $vtype);
> >  
> > -    $dir .= "/$vmid" if $vtype eq 'images';
> > +    $dir .= "/$vmid" if PVE::Storage::Common::is_volume_type($vtype);
> >  
> >      my $path = "$dir/$name";
> >  
> > @@ -912,30 +912,34 @@ sub create_base {
> >  }
> >  
> >  my $get_vm_disk_number = sub {
> > -    my ($disk_name, $scfg, $vmid, $suffix) = @_;
> > -
> > -    my $disk_regex = qr/(vm|base)-$vmid-disk-(\d+)$suffix/;
> > -
> > -    my $type = $scfg->{type};
> > -    my $def = { %{ $defaultData->{plugindata}->{$type} } };
> > -
> > -    my $valid = $def->{format}->[0];
> > -    if ($valid->{subvol}) {
> > -        $disk_regex = qr/(vm|base|subvol|basevol)-$vmid-disk-(\d+)/;
> > -    }
> > -
> > -    if ($disk_name =~ m/$disk_regex/) {
> > -        return $2;
> > +    my ($disk_volid, $scfg, $vmid, $suffix) = @_;
> > +
> > +    # Dir storage have a vmid/ subdir, zfs/lvm/rbd/... do not.
> > +    # Also: LVM storages don't pass the `storeid:` prefix...
> > +    if ($disk_volid =~ m!^(?:[^:]+:)? (?:\d+/)? $DISK_NAME_REGEX $!xn) {
> > +        my $label = $+{label};
> > +        # Dir storages have a format suffix, zfs/lvm/rbd/... do not.
> > +        if ($label =~ /^disk-(\d+)(?:\..*)?$/) {
> > +            return int($1);
> > +        }
> >      }
> >  
> >      return undef;
> >  };
> >  
> > +# note: disk_list is an array of *volids*
> >  sub get_next_vm_diskname {
> > -    my ($disk_list, $storeid, $vmid, $fmt, $scfg, $add_fmt_suffix) = @_;
> > +    my ($disk_list, $storeid, $vmid, $fmt, $scfg, $add_fmt_suffix, $vtype) = @_;
> >  
> >      $fmt //= '';
> > -    my $prefix = ($fmt eq 'subvol') ? 'subvol' : 'vm';
> > +    my $prefix;
> > +    if (defined($vtype) && $vtype eq 'vm-vol') {
> > +        $prefix = 'vol-vm';
> > +    } elsif (defined($vtype) && $vtype eq 'ct-vol') {
> > +        $prefix = ($fmt eq 'subvol') ? 'subvol-ct' : 'vol-ct';
> > +    } else {
> > +        $prefix = ($fmt eq 'subvol') ? 'subvol' : 'vm';
> > +    }
> >      my $suffix = $add_fmt_suffix ? ".$fmt" : '';
> >  
> >      my $disk_ids = {};
> > @@ -954,13 +958,13 @@ sub get_next_vm_diskname {
> >  }
> >  
> >  sub find_free_diskname {
> > -    my ($class, $storeid, $scfg, $vmid, $fmt, $add_fmt_suffix) = @_;
> > +    my ($class, $storeid, $scfg, $vmid, $fmt, $add_fmt_suffix, $vtype) = @_;
> >  
> > -    my $disks = $class->list_images($storeid, $scfg, $vmid);
> > +    my $disks = $class->list_images($storeid, $scfg, $vmid, undef, undef, $vtype);
> >  
> >      my $disk_list = [map { $_->{volid} } @$disks];
> >  
> > -    return get_next_vm_diskname($disk_list, $storeid, $vmid, $fmt, $scfg, $add_fmt_suffix);
> > +    return get_next_vm_diskname($disk_list, $storeid, $vmid, $fmt, $scfg, $add_fmt_suffix, $vtype);
> >  }
> >  
> >  sub clone_image {
> > @@ -1011,14 +1015,23 @@ sub clone_image {
> >  }
> >  
> >  sub alloc_image {
> > -    my ($class, $storeid, $scfg, $vmid, $fmt, $name, $size) = @_;
> > +    my ($class, $storeid, $scfg, $vmid, $fmt, $name, $size, $vtype) = @_;
> >  
> > -    my $imagedir = $class->get_subdir($scfg, 'images');
> > +    my $imagedir = $class->get_subdir($scfg, $vtype // 'images');
> >      $imagedir .= "/$vmid";
> >  
> >      mkpath $imagedir;
> >  
> > -    $name = $class->find_free_diskname($storeid, $scfg, $vmid, $fmt, 1) if !$name;
> > +    if ($name) {
> > +        if (defined($vtype)) {
> > +            die "illegal name '$name' - should be 'vol-vm-$vmid-*'\n"
> > +                if $vtype eq 'vm-vol' && $name !~ m/^vol-vm-$vmid-/;
> > +            die "illegal name '$name' - should be 'vol-ct-$vmid-*'\n"
> > +                if $vtype eq 'ct-vol' && $name !~ m/^vol-ct-$vmid-/;
> > +        }
> > +    } else {
> > +        $name = $class->find_free_diskname($storeid, $scfg, $vmid, $fmt, 1, $vtype);
> > +    }
> >  
> >      my (undef, $tmpfmt) = parse_name_dir($name);
> >  
> > diff --git a/src/PVE/Storage/RBDPlugin.pm b/src/PVE/Storage/RBDPlugin.pm
> > index 2ef1280..839ff73 100644
> > --- a/src/PVE/Storage/RBDPlugin.pm
> > +++ b/src/PVE/Storage/RBDPlugin.pm
> > @@ -620,7 +620,7 @@ sub qemu_blockdev_options {
> >  }
> >  
> >  sub find_free_diskname {
> > -    my ($class, $storeid, $scfg, $vmid, $fmt, $add_fmt_suffix) = @_;
> > +    my ($class, $storeid, $scfg, $vmid, $fmt, $add_fmt_suffix, $vtype) = @_;
> >  
> >      my $cmd = $rbd_cmd->($scfg, $storeid, 'ls');
> >  
> > @@ -640,7 +640,9 @@ sub find_free_diskname {
> >  
> >      die $err if $err && $err !~ m/doesn't contain rbd images/;
> >  
> > -    return PVE::Storage::Plugin::get_next_vm_diskname($disk_list, $storeid, $vmid, undef, $scfg);
> > +    return PVE::Storage::Plugin::get_next_vm_diskname(
> > +        $disk_list, $storeid, $vmid, undef, $scfg, 0, $vtype,
> > +    );
> >  }
> >  
> >  sub create_base {
> > @@ -730,12 +732,23 @@ sub clone_image {
> >  }
> >  
> >  sub alloc_image {
> > -    my ($class, $storeid, $scfg, $vmid, $fmt, $name, $size) = @_;
> > -
> > -    die "illegal name '$name' - should be 'vm-$vmid-*'\n"
> > -        if $name && $name !~ m/^vm-$vmid-/;
> > +    my ($class, $storeid, $scfg, $vmid, $fmt, $name, $size, $vtype) = @_;
> > +
> > +    if ($name) {
> > +        if (defined($vtype) && $vtype eq 'vm-vol') {
> > +            die "illegal name '$name' - should be 'vol-vm-$vmid-*'\n"
> > +                if $name !~ m/^vol-vm-$vmid-/;
> > +        } elsif (defined($vtype) && $vtype eq 'ct-vol') {
> > +            die "illegal name '$name' - should be 'vol-ct-$vmid-*'\n"
> > +                if $name !~ m/^vol-ct-$vmid-/;
> > +        } else {
> > +            die "illegal name '$name'"
> > +                . " - should be 'vm-$vmid-*', 'vol-vm-$vmid-*' or 'vol-ct-$vmid-*'\n"
> > +                if $name !~ m/^(?:vol-vm|vol-ct|vm)-$vmid-/;
> > +        }
> > +    }
> >  
> > -    $name = $class->find_free_diskname($storeid, $scfg, $vmid) if !$name;
> > +    $name = $class->find_free_diskname($storeid, $scfg, $vmid, undef, 0, $vtype) if !$name;
> >  
> >      my @options = (
> >          '--image-format', 2, '--size', int(($size + 1023) / 1024),
> > diff --git a/src/PVE/Storage/ZFSPlugin.pm b/src/PVE/Storage/ZFSPlugin.pm
> > index a05f521..259e468 100644
> > --- a/src/PVE/Storage/ZFSPlugin.pm
> > +++ b/src/PVE/Storage/ZFSPlugin.pm
> > @@ -355,16 +355,25 @@ sub clone_image {
> >  }
> >  
> >  sub alloc_image {
> > -    my ($class, $storeid, $scfg, $vmid, $fmt, $name, $size) = @_;
> > +    my ($class, $storeid, $scfg, $vmid, $fmt, $name, $size, $vtype) = @_;
> >  
> >      die "unsupported format '$fmt'" if $fmt ne 'raw';
> >  
> > -    die "illegal name '$name' - should be 'vm-$vmid-*'\n"
> > -        if $name && $name !~ m/^vm-$vmid-/;
> > +    if ($name) {
> > +        if (defined($vtype) && $vtype eq 'vm-vol') {
> > +            die "illegal name '$name' - should be 'vol-vm-$vmid-*'\n"
> > +                if $name !~ m/^vol-vm-$vmid-/;
> > +        } elsif (defined($vtype) && $vtype eq 'ct-vol') {
> > +            die "non-subvolumes not allowed for containers\n";
> > +        } else {
> > +            die "illegal name '$name'" . " - should be 'vm-$vmid-*', 'vol-vm-$vmid-*'\n"
> > +                if $name !~ m/^(?:vol-vm|vm)-$vmid-/;
> > +        }
> > +    }
> >  
> >      my $volname = $name;
> >  
> > -    $volname = $class->find_free_diskname($storeid, $scfg, $vmid, $fmt) if !$volname;
> > +    $volname = $class->find_free_diskname($storeid, $scfg, $vmid, $fmt, 0, $vtype) if !$volname;
> >  
> >      $class->zfs_create_zvol($scfg, $volname, $size);
> >  
> > diff --git a/src/PVE/Storage/ZFSPoolPlugin.pm b/src/PVE/Storage/ZFSPoolPlugin.pm
> > index d65af69..f972718 100644
> > --- a/src/PVE/Storage/ZFSPoolPlugin.pm
> > +++ b/src/PVE/Storage/ZFSPoolPlugin.pm
> > @@ -271,29 +271,42 @@ sub zfs_wait_for_zvol_link {
> >  }
> >  
> >  sub alloc_image {
> > -    my ($class, $storeid, $scfg, $vmid, $fmt, $name, $size) = @_;
> > +    my ($class, $storeid, $scfg, $vmid, $fmt, $name, $size, $vtype) = @_;
> >  
> >      my $volname = $name;
> >  
> >      if ($fmt eq 'raw') {
> > -
> > -        die "illegal name '$volname' - should be 'vm-$vmid-*'\n"
> > -            if $volname && $volname !~ m/^vm-$vmid-/;
> > -        $volname = $class->find_free_diskname($storeid, $scfg, $vmid, $fmt)
> > +        $volname = $class->find_free_diskname($storeid, $scfg, $vmid, $fmt, 0, $vtype)
> >              if !$volname;
> >  
> > +        if ($vtype) {
> > +            die "'raw' format not allowed for container volumes\n"
> > +                if $vtype ne 'vm-vol';
> > +
> > +            die "illegal name '$volname' - should be 'vol-vm-$vmid-*'\n"
> > +                if $volname !~ m/^vol-vm-$vmid-/;
> > +        } else {
> > +            die "illegal name '$volname' - should be 'vol-vm-$vmid-*' or 'vm-$vmid-*'\n"
> > +                if $volname !~ m/^(vol-)?vm-$vmid-/;
> > +        }
> > +
> >          $class->zfs_create_zvol($scfg, $volname, $size);
> >          $class->zfs_wait_for_zvol_link($scfg, $volname);
> >  
> >      } elsif ($fmt eq 'subvol') {
> > -
> > -        die "illegal name '$volname' - should be 'subvol-$vmid-*'\n"
> > -            if $volname && $volname !~ m/^subvol-$vmid-/;
> > -        $volname = $class->find_free_diskname($storeid, $scfg, $vmid, $fmt)
> > +        $volname = $class->find_free_diskname($storeid, $scfg, $vmid, $fmt, 0, $vtype)
> >              if !$volname;
> >  
> > -        die "illegal name '$volname' - should be 'subvol-$vmid-*'\n"
> > -            if $volname !~ m/^subvol-$vmid-/;
> > +        if ($vtype) {
> > +            die "'subvol' format not allowed for VM volumes\n"
> > +                if $vtype ne 'ct-vol';
> > +
> > +            die "illegal name '$volname' - should be 'subvol-ct-$vmid-*'\n"
> > +                if $volname !~ m/^subvol-ct-$vmid-/;
> > +        } else {
> > +            die "illegal name '$volname' - should be 'subvol-ct-$vmid-*' or 'subvol-$vmid-*'\n"
> > +                if $volname !~ m/^subvol(-ct)?-$vmid-/;
> > +        }
> >  
> >          $class->zfs_create_subvol($scfg, $volname, $size);
> >  
>
>
>
> _______________________________________________
> pve-devel mailing list
> pve-devel@lists.proxmox.com
> https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] 74+ messages in thread

* Re: [pve-devel] [PATCH storage 17/26] plugins: add vtype parameter to alloc_image
  2025-07-30 14:05     ` Max R. Carrara
@ 2025-07-30 14:26       ` Fabian Grünbichler
  2025-07-30 14:49         ` Max R. Carrara
  0 siblings, 1 reply; 74+ messages in thread
From: Fabian Grünbichler @ 2025-07-30 14:26 UTC (permalink / raw)
  To: Proxmox VE development discussion

On July 30, 2025 4:05 pm, Max R. Carrara wrote:
> On Wed Jul 30, 2025 at 4:00 PM CEST, Max R. Carrara wrote:
>> On Tue Jul 29, 2025 at 1:15 PM CEST, Wolfgang Bumiller wrote:
>> > Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
>> > --- a/src/PVE/Storage/LvmThinPlugin.pm
>> > +++ b/src/PVE/Storage/LvmThinPlugin.pm
>> > @@ -122,12 +122,23 @@ my $set_lv_autoactivation = sub {
>> >  };
>> >  
>> >  sub alloc_image {
>> > -    my ($class, $storeid, $scfg, $vmid, $fmt, $name, $size) = @_;
>> > +    my ($class, $storeid, $scfg, $vmid, $fmt, $name, $size, $vtype) = @_;
>> >  
>> >      die "unsupported format '$fmt'" if $fmt ne 'raw';
>> >  
>> > -    die "illegal name '$name' - should be 'vm-$vmid-*'\n"
>> > -        if $name && $name !~ m/^vm-$vmid-/;
>> > +    if ($name) {
>> > +        if (defined($vtype) && $vtype eq 'vm-vol') {
>> > +            die "illegal name '$name' - should be 'vol-vm-$vmid-*'\n"
>> > +                if $name !~ m/^vol-vm-$vmid-/;
>> > +        } elsif (defined($vtype) && $vtype eq 'ct-vol') {
>> > +            die "illegal name '$name' - should be 'vol-ct-$vmid-*'\n"
>> > +                if $name !~ m/^vol-ct-$vmid-/;
>> > +        } else {
>> > +            die "illegal name '$name'"
>> > +                . " - should be 'vm-$vmid-*', 'vol-vm-$vmid-*' or 'vol-ct-$vmid-*'\n"
>> > +                if $name !~ m/^(?:vol-vm|vol-ct|vm)-$vmid-/;
>> > +        }
>> > +    }
>>
>> ^ This currently trips up when you try to make a snapshot on a VM disk
>> following the new naming scheme:
>>
>> TASK ERROR: illegal name 'vm-200-state-foo' - should be 'vol-vm-200-*'
>>
>> Did some debugging and stacktrace-diving--turns out that
>> `PVE::QemuConfig::__snapshot_save_vmstate()` passes the wrong name for
>> the snapshot.
>>
>> Should we keep the old snapshot naming scheme for 'vm-$vmid-*' volumes
>> or also use the new one from now on?
>>
>> With that being said, perhaps this could be a good opportunity to let
>> `PVE::Storage::vdisk_alloc()` decide on the snapshot's name instead?
>> As in, have `__snapshot_save_vmstate()` just pass on the plain name,
>> that is "foo" instead of e.g. "vm-666-state-foo" since the $vmid is
>> passed along anyway (and the vtype now is, too).
>>
>> NOTE: This also happens for directory storage too, and I'm assuming
>> others as well. However, containers seem to be fine..?
> 
> I forgot to mention: VM disks with the legacy naming scheme work fine.
> Just double checked for CTs--CT disks with both the legacy naming and
> new naming scheme work fine (on lvm-thin).

containers don't have state volumes in the first place, so it's not
really surprising they don't break ;)

this is a bit of a conundrum - if a plugin doesn't yet support vtypes,
it will potentially only handle the old naming scheme. if it does
support vtypes, it might only handle the new naming scheme if we pass
the proper vtype..

we discussed introducing sub types for such things, but that would also
require some query or fallback mode..

> 
>>
>> >  
>> >      my $vgs = PVE::Storage::LVMPlugin::lvm_vgs();
>> >  
>> > @@ -135,7 +146,7 @@ sub alloc_image {
>> >  
>> >      die "no such volume group '$vg'\n" if !defined($vgs->{$vg});
>> >  
>> > -    $name = $class->find_free_diskname($storeid, $scfg, $vmid)
>> > +    $name = $class->find_free_diskname($storeid, $scfg, $vmid, undef, 0, $vtype)
>> >          if !$name;
>> >  
>> >      my $cmd = [


_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] 74+ messages in thread

* Re: [pve-devel] [PATCH storage 17/26] plugins: add vtype parameter to alloc_image
  2025-07-30 14:26       ` Fabian Grünbichler
@ 2025-07-30 14:49         ` Max R. Carrara
  2025-07-30 15:01           ` Fabian Grünbichler
  0 siblings, 1 reply; 74+ messages in thread
From: Max R. Carrara @ 2025-07-30 14:49 UTC (permalink / raw)
  To: Proxmox VE development discussion

On Wed Jul 30, 2025 at 4:26 PM CEST, Fabian Grünbichler wrote:
> On July 30, 2025 4:05 pm, Max R. Carrara wrote:
> > On Wed Jul 30, 2025 at 4:00 PM CEST, Max R. Carrara wrote:
> >> On Tue Jul 29, 2025 at 1:15 PM CEST, Wolfgang Bumiller wrote:
> >> > Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
> >> > --- a/src/PVE/Storage/LvmThinPlugin.pm
> >> > +++ b/src/PVE/Storage/LvmThinPlugin.pm
> >> > @@ -122,12 +122,23 @@ my $set_lv_autoactivation = sub {
> >> >  };
> >> >  
> >> >  sub alloc_image {
> >> > -    my ($class, $storeid, $scfg, $vmid, $fmt, $name, $size) = @_;
> >> > +    my ($class, $storeid, $scfg, $vmid, $fmt, $name, $size, $vtype) = @_;
> >> >  
> >> >      die "unsupported format '$fmt'" if $fmt ne 'raw';
> >> >  
> >> > -    die "illegal name '$name' - should be 'vm-$vmid-*'\n"
> >> > -        if $name && $name !~ m/^vm-$vmid-/;
> >> > +    if ($name) {
> >> > +        if (defined($vtype) && $vtype eq 'vm-vol') {
> >> > +            die "illegal name '$name' - should be 'vol-vm-$vmid-*'\n"
> >> > +                if $name !~ m/^vol-vm-$vmid-/;
> >> > +        } elsif (defined($vtype) && $vtype eq 'ct-vol') {
> >> > +            die "illegal name '$name' - should be 'vol-ct-$vmid-*'\n"
> >> > +                if $name !~ m/^vol-ct-$vmid-/;
> >> > +        } else {
> >> > +            die "illegal name '$name'"
> >> > +                . " - should be 'vm-$vmid-*', 'vol-vm-$vmid-*' or 'vol-ct-$vmid-*'\n"
> >> > +                if $name !~ m/^(?:vol-vm|vol-ct|vm)-$vmid-/;
> >> > +        }
> >> > +    }
> >>
> >> ^ This currently trips up when you try to make a snapshot on a VM disk
> >> following the new naming scheme:
> >>
> >> TASK ERROR: illegal name 'vm-200-state-foo' - should be 'vol-vm-200-*'
> >>
> >> Did some debugging and stacktrace-diving--turns out that
> >> `PVE::QemuConfig::__snapshot_save_vmstate()` passes the wrong name for
> >> the snapshot.
> >>
> >> Should we keep the old snapshot naming scheme for 'vm-$vmid-*' volumes
> >> or also use the new one from now on?
> >>
> >> With that being said, perhaps this could be a good opportunity to let
> >> `PVE::Storage::vdisk_alloc()` decide on the snapshot's name instead?
> >> As in, have `__snapshot_save_vmstate()` just pass on the plain name,
> >> that is "foo" instead of e.g. "vm-666-state-foo" since the $vmid is
> >> passed along anyway (and the vtype now is, too).
> >>
> >> NOTE: This also happens for directory storage too, and I'm assuming
> >> others as well. However, containers seem to be fine..?
> > 
> > I forgot to mention: VM disks with the legacy naming scheme work fine.
> > Just double checked for CTs--CT disks with both the legacy naming and
> > new naming scheme work fine (on lvm-thin).
>
> containers don't have state volumes in the first place, so it's not
> really surprising they don't break ;)

Yeah I realized that after I sent my response 🤦

>
> this is a bit of a conundrum - if a plugin doesn't yet support vtypes,
> it will potentially only handle the old naming scheme. if it does
> support vtypes, it might only handle the new naming scheme if we pass
> the proper vtype..
>
> we discussed introducing sub types for such things, but that would also
> require some query or fallback mode..

Yeah okay I see, that's tricky...

>
> > 
> >>
> >> >  
> >> >      my $vgs = PVE::Storage::LVMPlugin::lvm_vgs();
> >> >  
> >> > @@ -135,7 +146,7 @@ sub alloc_image {
> >> >  
> >> >      die "no such volume group '$vg'\n" if !defined($vgs->{$vg});
> >> >  
> >> > -    $name = $class->find_free_diskname($storeid, $scfg, $vmid)
> >> > +    $name = $class->find_free_diskname($storeid, $scfg, $vmid, undef, 0, $vtype)
> >> >          if !$name;
> >> >  
> >> >      my $cmd = [
>
>
> _______________________________________________
> pve-devel mailing list
> pve-devel@lists.proxmox.com
> https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

^ permalink raw reply	[flat|nested] 74+ messages in thread

* Re: [pve-devel] [PATCH storage 17/26] plugins: add vtype parameter to alloc_image
  2025-07-30 14:49         ` Max R. Carrara
@ 2025-07-30 15:01           ` Fabian Grünbichler
  0 siblings, 0 replies; 74+ messages in thread
From: Fabian Grünbichler @ 2025-07-30 15:01 UTC (permalink / raw)
  To: Proxmox VE development discussion

On July 30, 2025 4:49 pm, Max R. Carrara wrote:
> On Wed Jul 30, 2025 at 4:26 PM CEST, Fabian Grünbichler wrote:
>> On July 30, 2025 4:05 pm, Max R. Carrara wrote:
>> > On Wed Jul 30, 2025 at 4:00 PM CEST, Max R. Carrara wrote:
>> >> On Tue Jul 29, 2025 at 1:15 PM CEST, Wolfgang Bumiller wrote:
>> >> > Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
>> >> > --- a/src/PVE/Storage/LvmThinPlugin.pm
>> >> > +++ b/src/PVE/Storage/LvmThinPlugin.pm
>> >> > @@ -122,12 +122,23 @@ my $set_lv_autoactivation = sub {
>> >> >  };
>> >> >  
>> >> >  sub alloc_image {
>> >> > -    my ($class, $storeid, $scfg, $vmid, $fmt, $name, $size) = @_;
>> >> > +    my ($class, $storeid, $scfg, $vmid, $fmt, $name, $size, $vtype) = @_;
>> >> >  
>> >> >      die "unsupported format '$fmt'" if $fmt ne 'raw';
>> >> >  
>> >> > -    die "illegal name '$name' - should be 'vm-$vmid-*'\n"
>> >> > -        if $name && $name !~ m/^vm-$vmid-/;
>> >> > +    if ($name) {
>> >> > +        if (defined($vtype) && $vtype eq 'vm-vol') {
>> >> > +            die "illegal name '$name' - should be 'vol-vm-$vmid-*'\n"
>> >> > +                if $name !~ m/^vol-vm-$vmid-/;
>> >> > +        } elsif (defined($vtype) && $vtype eq 'ct-vol') {
>> >> > +            die "illegal name '$name' - should be 'vol-ct-$vmid-*'\n"
>> >> > +                if $name !~ m/^vol-ct-$vmid-/;
>> >> > +        } else {
>> >> > +            die "illegal name '$name'"
>> >> > +                . " - should be 'vm-$vmid-*', 'vol-vm-$vmid-*' or 'vol-ct-$vmid-*'\n"
>> >> > +                if $name !~ m/^(?:vol-vm|vol-ct|vm)-$vmid-/;
>> >> > +        }
>> >> > +    }
>> >>
>> >> ^ This currently trips up when you try to make a snapshot on a VM disk
>> >> following the new naming scheme:
>> >>
>> >> TASK ERROR: illegal name 'vm-200-state-foo' - should be 'vol-vm-200-*'
>> >>
>> >> Did some debugging and stacktrace-diving--turns out that
>> >> `PVE::QemuConfig::__snapshot_save_vmstate()` passes the wrong name for
>> >> the snapshot.
>> >>
>> >> Should we keep the old snapshot naming scheme for 'vm-$vmid-*' volumes
>> >> or also use the new one from now on?
>> >>
>> >> With that being said, perhaps this could be a good opportunity to let
>> >> `PVE::Storage::vdisk_alloc()` decide on the snapshot's name instead?
>> >> As in, have `__snapshot_save_vmstate()` just pass on the plain name,
>> >> that is "foo" instead of e.g. "vm-666-state-foo" since the $vmid is
>> >> passed along anyway (and the vtype now is, too).
>> >>
>> >> NOTE: This also happens for directory storage too, and I'm assuming
>> >> others as well. However, containers seem to be fine..?
>> > 
>> > I forgot to mention: VM disks with the legacy naming scheme work fine.
>> > Just double checked for CTs--CT disks with both the legacy naming and
>> > new naming scheme work fine (on lvm-thin).
>>
>> containers don't have state volumes in the first place, so it's not
>> really surprising they don't break ;)
> 
> Yeah I realized that after I sent my response 🤦
> 
>>
>> this is a bit of a conundrum - if a plugin doesn't yet support vtypes,
>> it will potentially only handle the old naming scheme. if it does
>> support vtypes, it might only handle the new naming scheme if we pass
>> the proper vtype..
>>
>> we discussed introducing sub types for such things, but that would also
>> require some query or fallback mode..
> 
> Yeah okay I see, that's tricky...

we could parse the new name and see if the plugin says it's the new
vtype -> if it does, we can use the new name. if it fails parsing, we
can fallback to the old name?


_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

^ permalink raw reply	[flat|nested] 74+ messages in thread

* Re: [pve-devel] [PATCH storage 08/26] prepare for vm-vol and ct-vol content and vtypes
  2025-07-30  8:38   ` Fabian Grünbichler
@ 2025-08-08 12:01     ` Wolfgang Bumiller
  0 siblings, 0 replies; 74+ messages in thread
From: Wolfgang Bumiller @ 2025-08-08 12:01 UTC (permalink / raw)
  To: Fabian Grünbichler; +Cc: Proxmox VE development discussion

On Wed, Jul 30, 2025 at 10:38:19AM +0200, Fabian Grünbichler wrote:
> On July 29, 2025 1:15 pm, Wolfgang Bumiller wrote:
> > Prepares the stoplevel PVE::Storage API updates as well as adding the
> > new vtype subdirs to the base plugin's vtype subdir hash.
> > 
> > The new types are "vm-vol" and "ct-vol". They represent VM and
> > container volumes, respectively. The "images" and "rootdir" types are
> > considered legacy/deprecated, as the "rootdir" type was not properly
> > used, and container volumes were technically of type "images", with
> > the "rootdir" case "hacked in" by checking the existing VMs.
> > 
> > To more easily transition, the "images" type is now also a "supertype"
> > of "vm-vol", and the "rootdir" type a "supertype" of "ct-vol".
> > 
> > - `get_images_dir()` is replaced by `get_vm_volume_dir()`
> > - `get_private_dir()` is dropped as it is an openvz leftover
> > - `get_ct_volume_dir()` is added its stead
> > 
> > We now also unify the vtypes and content types. As such,
> > `content-dirs` can now include separate dirs for `vm-vol` and
> > `ct-vol`.
> > This is now also taken into account in `path_to_volume_id()` which
> > tries to match file system paths to a storage and content type.
> > 
> > The following subs also get a $vtype parameter:
> > - `vdisk_alloc()`
> > - `vdisk_clone()`
> > - `volume_import()`
> > 
> > `volume_list()`'s `$content` parameter allows `vm-vol` and
> > `ct-vol` as type.
> > 
> > New helpers are added:
> > - is_content_type_covered($content_hash, $content_type)
> >   Check if the contents listed in the hash(set) allows the provided
> >   $content_type.
> >   Meaning the content type is in the set *or* as supertype is in the
> >   set (see above).
> > - storage_check_type_allowed($cfg, $storeid, $type [, $noerr])
> >   Access to the above in our usual public storag API signature.
> > 
> > Finally: the content type completion also gets the new content types.
> > 
> > Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
> > ---
> >  src/PVE/GuestImport.pm    |   2 +-
> >  src/PVE/Storage.pm        | 113 ++++++++++++++++++++++++++++++--------
> >  src/PVE/Storage/Plugin.pm |   4 +-
> >  3 files changed, 95 insertions(+), 24 deletions(-)
> > 
> > diff --git a/src/PVE/GuestImport.pm b/src/PVE/GuestImport.pm
> > index 3d59dcd..ec2f09d 100644
> > --- a/src/PVE/GuestImport.pm
> > +++ b/src/PVE/GuestImport.pm
> > @@ -40,7 +40,7 @@ sub extract_disk_from_import_file {
> >  
> >      my $ova_path = PVE::Storage::path($cfg, $archive_volid);
> >  
> > -    my $tmpdir = PVE::Storage::get_image_dir($cfg, $target_storeid, $vmid);
> > +    my $tmpdir = PVE::Storage::get_vm_volume_dir($cfg, $target_storeid, $vmid);
> >      my $pid = $$;
> >      $tmpdir .= "/tmp_${pid}_${vmid}";
> >      mkpath $tmpdir;
> > diff --git a/src/PVE/Storage.pm b/src/PVE/Storage.pm
> > index da53beb..91a0278 100755
> > --- a/src/PVE/Storage.pm
> > +++ b/src/PVE/Storage.pm
> > @@ -547,24 +547,24 @@ sub volume_snapshot_info {
> >      return $plugin->volume_snapshot_info($scfg, $storeid, $volname);
> >  }
> >  
> > -sub get_image_dir {
> > +sub get_vm_volume_dir {
> >      my ($cfg, $storeid, $vmid) = @_;
> >  
> >      my $scfg = storage_config($cfg, $storeid);
> >      my $plugin = PVE::Storage::Plugin->lookup($scfg->{type});
> >  
> > -    my $path = $plugin->get_subdir($scfg, 'images');
> > +    my $path = $plugin->get_subdir($scfg, 'vm-vol');
> >  
> >      return $vmid ? "$path/$vmid" : $path;
> >  }
> 
> this one is only used by GuestImport above AFAICT, should we use this
> opportunity and give it a better name to make it clear that this should
> not be used in general? we use it there to get a base path for creating
> a tmpdir inside for extracting the OVA, and might want to switch to some
> other subdir in the future..

Given that that's in the same repository and you suggested removing the
ct variant, I'll just make this a private helper inside the guest import
module.

> 
> >  
> > -sub get_private_dir {
> > +sub get_ct_volume_dir {
> >      my ($cfg, $storeid, $vmid) = @_;
> >  
> >      my $scfg = storage_config($cfg, $storeid);
> >      my $plugin = PVE::Storage::Plugin->lookup($scfg->{type});
> >  
> > -    my $path = $plugin->get_subdir($scfg, 'rootdir');
> > +    my $path = $plugin->get_subdir($scfg, 'ct-vol');
> >  
> >      return $vmid ? "$path/$vmid" : $path;
> >  }
> 
> this one is not used anywhere, should we drop it?

I'm generally not a fan of this set of functions as they're limited to
'path' based storages. I'm fine with removing this.
Given the one above is not meant for general use either...

But that probably goes for the entire set of `get_*_dir` functions, no?

> 
> > @@ -737,22 +737,26 @@ sub path_to_volume_id {
> >          next if !$scfg->{path};
> >          my $plugin = PVE::Storage::Plugin->lookup($scfg->{type});
> >          my $imagedir = $plugin->get_subdir($scfg, 'images');
> > +        my $vmdir = $plugin->get_subdir($scfg, 'vm-vol');
> > +        my $ctdir = $plugin->get_subdir($scfg, 'ct-vol');
> >          my $isodir = $plugin->get_subdir($scfg, 'iso');
> >          my $tmpldir = $plugin->get_subdir($scfg, 'vztmpl');
> >          my $backupdir = $plugin->get_subdir($scfg, 'backup');
> >          my $snippetsdir = $plugin->get_subdir($scfg, 'snippets');
> >          my $importdir = $plugin->get_subdir($scfg, 'import');
> >  
> > -        if ($path =~ m!^\Q$imagedir\E/(\d+)/([^/\s]+)$!) {
> > -            my $vmid = $1;
> > -            my $name = $2;
> > +        if ($path =~ m!^(\Q$imagedir\E|\Q$vmdir\E|\Q$ctdir\E)/(\d+)/([^/\s]+)$!) {
> > +            my $subdir = $1;
> > +            my $vmid = $2;
> > +            my $name = $3;
> >  
> >              my $vollist = $plugin->list_images($sid, $scfg, $vmid);
> >              foreach my $info (@$vollist) {
> >                  my ($storeid, $volname) = parse_volume_id($info->{volid});
> > +                my ($vtype) = parse_volname($cfg, $info->{volid});
> >                  my $volpath = $plugin->path($scfg, $volname, $storeid);
> >                  if ($volpath eq $path) {
> > -                    return ('images', $info->{volid});
> > +                    return ($vtype, $info->{volid});
> >                  }
> >              }
> >          } elsif ($path =~ m!^\Q$isodir\E/([^/]+$ISO_EXT_RE_0)$!) {
> > @@ -822,7 +826,7 @@ sub qemu_blockdev_options {
> >  
> >      my ($vtype) = $plugin->parse_volname($volname);
> >      die "cannot use volume of type '$vtype' as a QEMU blockdevice\n"
> > -        if $vtype ne 'images' && $vtype ne 'iso' && $vtype ne 'import';
> > +        if $vtype ne 'vm-vol' && $vtype ne 'images' && $vtype ne 'iso' && $vtype ne 'import';
> >  
> >      my $blockdev =
> >          $plugin->qemu_blockdev_options($scfg, $storeid, $volname, $machine_version, $options);
> > @@ -884,6 +888,7 @@ my $volume_import_prepare = sub {
> >      my $with_snapshots = $opts->{with_snapshots} ? 1 : 0;
> >      my $migration_snapshot = $opts->{migration_snapshot} ? 1 : 0;
> >      my $allow_rename = $opts->{allow_rename} ? 1 : 0;
> > +    my $vtype = $opts->{vtype};
> >  
> >      my $recv = ['pvesm', 'import', $volid, $format, $path, '-with-snapshots', $with_snapshots];
> >      if (defined($snapshot)) {
> > @@ -892,6 +897,9 @@ my $volume_import_prepare = sub {
> >      if ($migration_snapshot) {
> >          push @$recv, '-delete-snapshot', $snapshot;
> >      }
> > +    if ($vtype) {
> > +        push @$recv, '-vtype', $vtype;
> > +    }
> 
> should we skip this if `$vtype` is `images`, to improve backwards
> compat? otherwise this would break migrating back from new to old nodes,
> right?

Yeah. Probably also shouldn't pass 'rootdir'.

> 
> >      push @$recv, '-allow-rename', $allow_rename;
> >  
> >      if (defined($base_snapshot)) {
> > @@ -1099,7 +1107,7 @@ sub storage_migrate {
> >  }
> >  
> >  sub vdisk_clone {
> > -    my ($cfg, $volid, $vmid, $snap) = @_;
> > +    my ($cfg, $volid, $vmid, $snap, $vtype) = @_;
> >  
> >      my ($storeid, $volname) = parse_volume_id($volid);
> >  
> > @@ -1115,7 +1123,7 @@ sub vdisk_clone {
> >          $scfg->{shared},
> >          undef,
> >          sub {
> > -            my $volname = $plugin->clone_image($scfg, $storeid, $volname, $vmid, $snap);
> > +            my $volname = $plugin->clone_image($scfg, $storeid, $volname, $vmid, $snap, $vtype);
> >              return "$storeid:$volname";
> >          },
> >      );
> > @@ -1168,8 +1176,52 @@ sub unmap_volume {
> >      return $plugin->unmap_volume($storeid, $scfg, $volname, $snapname);
> >  }
> >  
> > +=head3 is_content_type_covered($content_hash, $content_type)
> > +
> > +Check if the C<$content_hash> allows content of type C<$content_type>.
> > +
> > +Note that the legacy types C<images> and C<rootdir> will allow content of type C<vm-vol> and
> > +C<ct-vol> respectively, but not the other way round.
> > +
> > +For anything else this just checks whether C<$content_hash->{$content_type}> is set.
> > +
> > +=cut
> > +
> > +my sub is_content_type_covered : prototype($$) {
> > +    my ($content_hash, $content_type) = @_;
> > +
> > +    return
> > +        $content_hash->{$content_type}
> > +        || ($content_type eq 'vm-vol' && $content_hash->{images})
> > +        || ($content_type eq 'ct-vol' && $content_hash->{rootdir});
> > +}
> > +
> > +=head3 storage_check_type_allowed($cfg, $storeid, $type [, $noerr])
> 
> should this be called by qemu-server? see comments there ;)

Probably.

> 
> > +
> > +Check if a storage allows content of type C<$type>.
> > +
> > +Note that the legacy types C<images> and C<rootdir> will allow content of type C<vm-vol> and
> > +C<ct-vol> respectively, but not the other way round.
> > +
> > +If C<$noerr> is true, returns true if the type is allowed, false otherwise.
> > +If C<$noerr> is false, dies if the type is not allowed, returns true otherwise.
> > +
> > +=cut
> > +
> > +sub storage_check_type_allowed : prototype($$$;$) {
> > +    my ($cfg, $storeid, $content_type, $noerr) = @_;
> > +
> > +    my $scfg = storage_config($cfg, $storeid);
> > +
> > +    return !!1 if is_content_type_covered($scfg->{content}, $content_type);
> > +    return !!0 if $noerr;
> > +    die "storage '$storeid' doees not allow content of type '$content_type'\n";
> 
> typo 'doees'

Fixed.

> 
> > +}
> > +
> >  sub vdisk_alloc {
> > -    my ($cfg, $storeid, $vmid, $fmt, $name, $size) = @_;
> > +    my ($cfg, $storeid, $vmid, $fmt, $name, $size, $vtype) = @_;
> > +
> > +    die "vdisk_alloc without vtype not allowed anymore\n" if !defined($vtype);
> >  
> >      die "no storage ID specified\n" if !$storeid;
> >  
> > @@ -1187,6 +1239,8 @@ sub vdisk_alloc {
> >  
> >      activate_storage($cfg, $storeid);
> >  
> > +    storage_check_type_allowed($cfg, $storeid, $vtype);
> > +
> >      # lock shared storage
> >      return $plugin->cluster_lock_storage(
> >          $storeid,
> > @@ -1195,7 +1249,7 @@ sub vdisk_alloc {
> >          sub {
> >              my $old_umask = umask(umask | 0037);
> >              my $volname =
> > -                eval { $plugin->alloc_image($storeid, $scfg, $vmid, $fmt, $name, $size) };
> > +                eval { $plugin->alloc_image($storeid, $scfg, $vmid, $fmt, $name, $size, $vtype) };
> >              my $err = $@;
> >              umask $old_umask;
> >              die $err if $err;
> > @@ -1263,8 +1317,10 @@ sub vdisk_list {
> >              next if $storeid && $storeid ne $sid;
> >              next if !storage_check_enabled($cfg, $sid, undef, 1);
> >              my $content = $ids->{$sid}->{content};
> > -            next if defined($ctype) && !$content->{$ctype};
> > -            next if !($content->{rootdir} || $content->{images});
> > +            next if defined($ctype) && !is_content_type_covered($content, $ctype);
> > +            next
> > +                if !(is_content_type_covered($content, 'vm-vol')
> > +                    || is_content_type_covered($content, 'ct-vol'));
> >              push @$storage_list, $sid;
> >          }
> >      }
> > @@ -1278,7 +1334,7 @@ sub vdisk_list {
> >  
> >          my $scfg = $ids->{$sid};
> >          my $plugin = PVE::Storage::Plugin->lookup($scfg->{type});
> > -        $res->{$sid} = $plugin->list_images($sid, $scfg, $vmid, $vollist, $cache);
> > +        $res->{$sid} = $plugin->list_images($sid, $scfg, $vmid, $vollist, $cache, $ctype);
> >          @{ $res->{$sid} } = sort { lc($a->{volid}) cmp lc($b->{volid}) } @{ $res->{$sid} }
> >              if $res->{$sid};
> >      }
> > @@ -1318,13 +1374,15 @@ sub template_list {
> >  sub volume_list {
> >      my ($cfg, $storeid, $vmid, $content) = @_;
> >  
> > +    # We don't need to extend this by 'vm-vol' and 'ct-vol' as they are included by 'images' and
> > +    # 'rootdir'.
> >      my @ctypes = qw(rootdir images vztmpl iso backup snippets import);
> 
> I am not sure that's a good approach - we want to sunset 'images' and
> 'rootdir' at some point, and we don't allow users to opt-into not
> allowing the legacy types if we do this?

Right, I forgot we'd be filtering them out a few lines below.


_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] 74+ messages in thread

* Re: [pve-devel] [PATCH storage 08/26] prepare for vm-vol and ct-vol content and vtypes
  2025-07-30  9:14   ` Fabian Grünbichler
@ 2025-08-08 12:05     ` Wolfgang Bumiller
  0 siblings, 0 replies; 74+ messages in thread
From: Wolfgang Bumiller @ 2025-08-08 12:05 UTC (permalink / raw)
  To: Fabian Grünbichler; +Cc: Proxmox VE development discussion

On Wed, Jul 30, 2025 at 11:14:50AM +0200, Fabian Grünbichler wrote:
> On July 29, 2025 1:15 pm, Wolfgang Bumiller wrote:
> > Prepares the stoplevel PVE::Storage API updates as well as adding the
> > new vtype subdirs to the base plugin's vtype subdir hash.
> > 
> > The new types are "vm-vol" and "ct-vol". They represent VM and
> > container volumes, respectively. The "images" and "rootdir" types are
> > considered legacy/deprecated, as the "rootdir" type was not properly
> > used, and container volumes were technically of type "images", with
> > the "rootdir" case "hacked in" by checking the existing VMs.
> > 
> > To more easily transition, the "images" type is now also a "supertype"
> > of "vm-vol", and the "rootdir" type a "supertype" of "ct-vol".
> > 
> > - `get_images_dir()` is replaced by `get_vm_volume_dir()`
> > - `get_private_dir()` is dropped as it is an openvz leftover
> > - `get_ct_volume_dir()` is added its stead
> > 
> > We now also unify the vtypes and content types. As such,
> > `content-dirs` can now include separate dirs for `vm-vol` and
> > `ct-vol`.
> > This is now also taken into account in `path_to_volume_id()` which
> > tries to match file system paths to a storage and content type.
> > 
> > The following subs also get a $vtype parameter:
> > - `vdisk_alloc()`
> 
> alloc requires it
> 
> > - `vdisk_clone()`
> > - `volume_import()`
> 
> these two don't. should we make vdisk_clone also require it? or should
> we remove it altogether and always use the vtype of the base volume?

While we'd end up with a mix of 'images' an 'vm-vol' volumes in the
linked clones, I think that's still better than sticking with 'images'
forever there.

> 
> for import we probably want to make it optional for now to support old
> nodes triggering it..

Yeah it's pretty much always optional (except for alloc)


_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] 74+ messages in thread

* Re: [pve-devel] [PATCH storage 09/26] plugins: add new content types to all plugindata
  2025-07-30  8:38   ` Fabian Grünbichler
@ 2025-08-08 12:10     ` Wolfgang Bumiller
  0 siblings, 0 replies; 74+ messages in thread
From: Wolfgang Bumiller @ 2025-08-08 12:10 UTC (permalink / raw)
  To: Fabian Grünbichler; +Cc: Proxmox VE development discussion

On Wed, Jul 30, 2025 at 10:38:10AM +0200, Fabian Grünbichler wrote:
> question - do we also want to add them to existing configs on updates?
> or on RMW cycles, always implying that as long as images is set vm-vol
> is also set, and same for rootdir ct-vol (but obviously not the other
> way round ;))?
> 
> that might allow us to get rid of some of the extra compat mapping in
> code..

I suppose if we already modify the content list at load time, then yes,
we the code could indeed be written with the assumption that images ⇒
vm-vol and rootdir ⇒ ct-vol. Not sure if it would change *much*, though.


_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

^ permalink raw reply	[flat|nested] 74+ messages in thread

* Re: [pve-devel] [PATCH storage 12/26] plugin: support new vtypes in activate_storage checks
  2025-07-30  8:36   ` Fabian Grünbichler
@ 2025-08-08 13:16     ` Wolfgang Bumiller
  0 siblings, 0 replies; 74+ messages in thread
From: Wolfgang Bumiller @ 2025-08-08 13:16 UTC (permalink / raw)
  To: Fabian Grünbichler; +Cc: Proxmox VE development discussion

On Wed, Jul 30, 2025 at 10:36:59AM +0200, Fabian Grünbichler wrote:
> On July 29, 2025 1:15 pm, Wolfgang Bumiller wrote:
> > Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
> > ---
> >  src/PVE/Storage/Plugin.pm | 20 ++++++++++++++++++--
> >  1 file changed, 18 insertions(+), 2 deletions(-)
> > 
> > diff --git a/src/PVE/Storage/Plugin.pm b/src/PVE/Storage/Plugin.pm
> > index 98788d1..047b2fc 100644
> > --- a/src/PVE/Storage/Plugin.pm
> > +++ b/src/PVE/Storage/Plugin.pm
> > @@ -1882,15 +1882,31 @@ sub activate_storage {
> >  
> >          # check that content dirs are pairwise inequal
> >          my $resolved_subdirs = {};
> > -        for my $vtype (sort keys $scfg->{content}->%*) {
> > +        my %done;
> > +        my $check = sub {
> > +            my ($vtype) = @_;
> > +
> > +            return if $done{$vtype};
> > +            $done{$vtype} = 1;
> > +
> >              my $subdir = $class->get_subdir($scfg, $vtype);
> >              my $abs_subdir = abs_path($subdir);
> > -            next if !defined($abs_subdir);
> > +            return if !defined($abs_subdir);
> >  
> >              die "storage '$storeid' uses directory $abs_subdir for multiple content types\n"
> >                  if defined($abs_subdir) && defined($resolved_subdirs->{$abs_subdir});
> >  
> >              $resolved_subdirs->{$abs_subdir} = 1;
> > +        };
> > +        for my $vtype (sort keys $scfg->{content}->%*) {
> > +            if ($vtype eq 'images') {
> 
> shouldn't we also check for 'images' as well? we don't want that to
> overlap with vm-vol or ct-vol!

Yes.

> 
> > +                $check->('vm-vol');
> > +                $check->('ct-vol');
> > +            } elsif ($vtype eq 'rootdir') {
> 
> same here, since this was actually mapped to the dir for 'images' in
> practice?

The reason this change even exists was because 'images' and 'rootdir' by
*default* are the same. But also, rootdir had no effect, so after some
thought, maybe we should just warn users when they try to modify the
'rootdir' directory?

As in:
        for my $vtype (sort keys $scfg->{content}->%*) {
            if ($vtype eq 'rootdir') {
                warn "content-dir for 'rootdir' has no effect, set dirs for 'ct-vol' instead\n";
                next;
            }

            $check->($vtype);

            if ($vtype eq 'images') {
                $check->('vm-vol');
                $check->('ct-vol');
            }
        }

> 
> > +                $check->('ct-vol');
> > +            } else {
> > +                $check->($vtype);
> > +            }
> >          }
> >      }
> >  }
> > -- 
> > 2.47.2


_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] 74+ messages in thread

end of thread, other threads:[~2025-08-08 13:15 UTC | newest]

Thread overview: 74+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-07-29 11:15 [pve-devel] [RFC storage 00/26+10+3] unify vtype and content-type and Wolfgang Bumiller
2025-07-29 11:15 ` [pve-devel] [PATCH storage 01/26] btrfs: remove unnecessary mkpath call Wolfgang Bumiller
2025-07-29 11:15 ` [pve-devel] [PATCH storage 02/26] parse_volname: remove openvz 'rootdir' case Wolfgang Bumiller
2025-07-29 11:15 ` [pve-devel] [PATCH storage 03/26] drop rootdir case in path_to_volume_id Wolfgang Bumiller
2025-07-29 11:15 ` [pve-devel] [PATCH storage 04/26] escape dirs in path_to_volume_id regexes Wolfgang Bumiller
2025-07-29 11:15 ` [pve-devel] [PATCH storage 05/26] tests: drop rootdir/ tests Wolfgang Bumiller
2025-07-29 11:15 ` [pve-devel] [PATCH storage 06/26] common: use v5.36 Wolfgang Bumiller
2025-07-29 13:59   ` Fiona Ebner
2025-07-29 14:42     ` Thomas Lamprecht
2025-07-29 11:15 ` [pve-devel] [PATCH storage 07/26] common: add pve-storage-vtype standard option with new types Wolfgang Bumiller
2025-07-29 13:50   ` Fiona Ebner
2025-07-29 11:15 ` [pve-devel] [PATCH storage 08/26] prepare for vm-vol and ct-vol content and vtypes Wolfgang Bumiller
2025-07-30  8:38   ` Fabian Grünbichler
2025-08-08 12:01     ` Wolfgang Bumiller
2025-07-30  9:14   ` Fabian Grünbichler
2025-08-08 12:05     ` Wolfgang Bumiller
2025-07-29 11:15 ` [pve-devel] [PATCH storage 09/26] plugins: add new content types to all plugindata Wolfgang Bumiller
2025-07-30  8:38   ` Fabian Grünbichler
2025-08-08 12:10     ` Wolfgang Bumiller
2025-07-29 11:15 ` [pve-devel] [PATCH storage 10/26] plugins: update volname parsing for new naming convention Wolfgang Bumiller
2025-07-30  8:37   ` Fabian Grünbichler
2025-07-30  8:53     ` Wolfgang Bumiller
2025-07-30  8:58       ` Fabian Grünbichler
2025-07-29 11:15 ` [pve-devel] [PATCH storage 11/26] plugin: add vm/ct-vol to 'local' storage default content types Wolfgang Bumiller
2025-07-29 11:15 ` [pve-devel] [PATCH storage 12/26] plugin: support new vtypes in activate_storage checks Wolfgang Bumiller
2025-07-30  8:36   ` Fabian Grünbichler
2025-08-08 13:16     ` Wolfgang Bumiller
2025-07-29 11:15 ` [pve-devel] [PATCH storage 13/26] plugin, btrfs: update list_images and list_volumes Wolfgang Bumiller
2025-07-30  8:36   ` Fabian Grünbichler
2025-07-30  8:41     ` Fiona Ebner
2025-07-29 11:15 ` [pve-devel] [PATCH storage 14/26] plugins: update image/volume listing to support new types Wolfgang Bumiller
2025-07-30  8:36   ` Fabian Grünbichler
2025-07-29 11:15 ` [pve-devel] [PATCH storage 15/26] common: add is_volume_type and is_type_change_allowed helpers Wolfgang Bumiller
2025-07-30  9:01   ` Fabian Grünbichler
2025-07-29 11:15 ` [pve-devel] [PATCH storage 16/26] common: add volume_type_from_name convenience helper Wolfgang Bumiller
2025-07-30  8:36   ` Fabian Grünbichler
2025-07-30  9:09     ` Wolfgang Bumiller
2025-07-29 11:15 ` [pve-devel] [PATCH storage 17/26] plugins: add vtype parameter to alloc_image Wolfgang Bumiller
2025-07-30  9:24   ` Fabian Grünbichler
2025-07-30 14:00   ` Max R. Carrara
2025-07-30 14:05     ` Max R. Carrara
2025-07-30 14:26       ` Fabian Grünbichler
2025-07-30 14:49         ` Max R. Carrara
2025-07-30 15:01           ` Fabian Grünbichler
2025-07-29 11:15 ` [pve-devel] [PATCH storage 18/26] plugins: update create_base methods Wolfgang Bumiller
2025-07-29 11:15 ` [pve-devel] [PATCH storage 19/26] plugins: update clone_image methods Wolfgang Bumiller
2025-07-29 11:15 ` [pve-devel] [PATCH storage 20/26] plugins: update rename_volumes methods Wolfgang Bumiller
2025-07-29 11:15 ` [pve-devel] [PATCH storage 21/26] plugins: update volume_import methods Wolfgang Bumiller
2025-07-29 11:15 ` [pve-devel] [PATCH storage 22/26] zfs: update 'path' method for new naming scheme Wolfgang Bumiller
2025-07-30  9:31   ` Fabian Grünbichler
2025-07-29 11:15 ` [pve-devel] [PATCH storage 23/26] pvesm: add vtype parameter to import command Wolfgang Bumiller
2025-07-29 11:15 ` [pve-devel] [PATCH storage 24/26] api: add vtype parameter to create call Wolfgang Bumiller
2025-07-29 11:15 ` [pve-devel] [PATCH storage 25/26] update tests Wolfgang Bumiller
2025-07-29 16:33   ` Max R. Carrara
2025-07-29 11:15 ` [pve-devel] [PATCH storage 26/26] update ApiChangeLog Wolfgang Bumiller
2025-07-29 11:15 ` [pve-devel] [PATCH container 1/3] add vtype to vdisk_alloc and vdisk_clone calls Wolfgang Bumiller
2025-07-29 11:15 ` [pve-devel] [PATCH container 2/3] expect 'vm-vol' vtype in get_replicatable_volumes Wolfgang Bumiller
2025-07-29 11:15 ` [pve-devel] [PATCH container 3/3] add vtype to rename_volume call Wolfgang Bumiller
2025-07-29 11:15 ` [pve-devel] [PATCH qemu-server 01/10] add vtype to vdisk_alloc and vdisk_clone calls Wolfgang Bumiller
2025-07-29 11:15 ` [pve-devel] [PATCH qemu-server 02/10] add vtype parameter to rename_volume call Wolfgang Bumiller
2025-07-29 11:15 ` [pve-devel] [PATCH qemu-server 03/10] expect 'vm-vol' vtype in get_replicatable_volumes Wolfgang Bumiller
2025-07-29 11:15 ` [pve-devel] [PATCH qemu-server 04/10] expect 'vm-vol' vtype wherever 'images' was expected Wolfgang Bumiller
2025-07-30  8:40   ` Fabian Grünbichler
2025-07-30  9:17   ` Fiona Ebner
2025-07-30  9:33     ` Fiona Ebner
2025-07-29 11:15 ` [pve-devel] [PATCH qemu-server 05/10] tests: update QmMock to support vtypes Wolfgang Bumiller
2025-07-29 11:15 ` [pve-devel] [PATCH qemu-server 06/10] tests: scripted: update tests to new vtypes and paths Wolfgang Bumiller
2025-07-29 14:13   ` Max R. Carrara
2025-07-29 11:15 ` [pve-devel] [PATCH qemu-server 07/10] make tidy Wolfgang Bumiller
2025-07-29 11:15 ` [pve-devel] [PATCH qemu-server 08/10] tests: fixup restore test to use new volume naming scheme Wolfgang Bumiller
2025-07-29 11:15 ` [pve-devel] [PATCH qemu-server 09/10] tests: update remaining tests to new snapshot paths Wolfgang Bumiller
2025-07-29 11:15 ` [pve-devel] [PATCH qemu-server 10/10] tests: regenerate cfg2cmd files Wolfgang Bumiller
2025-07-29 14:19   ` Max R. Carrara
2025-07-29 15:34 ` [pve-devel] partially-applied: [RFC storage 00/26+10+3] unify vtype and content-type and Fiona Ebner

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal