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 <f.we...@proxmox.com> --- Notes: I'm not 100% sure I've correctly grasped volume_qemu_snapshot_method, so please double-check my reasoning. 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; -- 2.47.2 _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel