From 3c209eaeb755bd702eb34cfd49589359a21858cf Mon Sep 17 00:00:00 2001 From: Friedrich Weber Date: Thu, 31 Jul 2025 10:24:52 +0200 Subject: [PATCH] plugin: nfs, cifs: use volume qemu snapshot methods from dir plugin Taking an offline snapshot of a VM on an NFS/CIFS storage with snapshot-as-volume-chain currently creates a volume-chain snapshot as expected, but taking an online snapshot unexpectedly creates a qcow2 snapshot. This was also reported in the forum [1]. The reason is that the NFS/CIFS plugins inherit the method volume_qemu_snapshot_method from the Plugin base class, whereas they actually behave similarly to the Directory plugin. To fix this, implement the method for the NFS/CIFS plugins and let it call the Directory plugin's implementation. [1] https://forum.proxmox.com/threads/168619/post-787374 Signed-off-by: Friedrich Weber Link: https://lore.proxmox.com/20250731082538.31891-1-f.weber@proxmox.com --- src/PVE/Storage/CIFSPlugin.pm | 4 ++++ src/PVE/Storage/NFSPlugin.pm | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/src/PVE/Storage/CIFSPlugin.pm b/src/PVE/Storage/CIFSPlugin.pm index 35a1a3b..5b35daf 100644 --- a/src/PVE/Storage/CIFSPlugin.pm +++ b/src/PVE/Storage/CIFSPlugin.pm @@ -331,4 +331,8 @@ sub get_import_metadata { return PVE::Storage::DirPlugin::get_import_metadata(@_); } +sub volume_qemu_snapshot_method { + return PVE::Storage::DirPlugin::volume_qemu_snapshot_method(@_); +} + 1; diff --git a/src/PVE/Storage/NFSPlugin.pm b/src/PVE/Storage/NFSPlugin.pm index b416703..4cc02c9 100644 --- a/src/PVE/Storage/NFSPlugin.pm +++ b/src/PVE/Storage/NFSPlugin.pm @@ -241,4 +241,8 @@ sub get_import_metadata { return PVE::Storage::DirPlugin::get_import_metadata(@_); } +sub volume_qemu_snapshot_method { + return PVE::Storage::DirPlugin::volume_qemu_snapshot_method(@_); +} + 1;