Snapshot state files and fleecing images are currently allowed to be put
on storages, which do not support VM images. For consistency's sake,
these should also only be created on storages supporting VM images, but
this would break the API for users now, so postpone this until PVE 9.

Signed-off-by: Daniel Kral <d.k...@proxmox.com>
---
changes since v2:
  * none, except rebase

 PVE/QemuConfig.pm        | 1 +
 PVE/VZDump/QemuServer.pm | 1 +
 2 files changed, 2 insertions(+)

diff --git a/PVE/QemuConfig.pm b/PVE/QemuConfig.pm
index 19d9785e..e92bb165 100644
--- a/PVE/QemuConfig.pm
+++ b/PVE/QemuConfig.pm
@@ -229,6 +229,7 @@ sub __snapshot_save_vmstate {
     my $name = "vm-$vmid-state-$snapname";
     $name .= ".raw" if $scfg->{path}; # add filename extension for file base 
storage
 
+    # TODO PVE 9: assert for supported content type 'images' here
     my $statefile = PVE::Storage::vdisk_alloc(
        $storecfg, $target, $vmid, 'raw', 'any', $size*1024, { name => $name });
     my $runningmachine = 
PVE::QemuServer::Machine::get_current_qemu_machine($vmid);
diff --git a/PVE/VZDump/QemuServer.pm b/PVE/VZDump/QemuServer.pm
index b4bac3f9..ad83d405 100644
--- a/PVE/VZDump/QemuServer.pm
+++ b/PVE/VZDump/QemuServer.pm
@@ -592,6 +592,7 @@ my sub allocate_fleecing_images {
                    $size = PVE::Tools::convert_size($di->{'block-node-size'}, 
'b' => 'kb');
                }
 
+               # TODO PVE 9: assert for supported content type 'images' here
                $di->{'fleece-volid'} = PVE::Storage::vdisk_alloc(
                    $self->{storecfg},
                    $fleecing_storeid,
-- 
2.39.5



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

Reply via email to