Signed-off-by: Alexandre Derumier <aderum...@odiso.com>
---
 PVE/QemuServer.pm |   16 ++--------------
 1 file changed, 2 insertions(+), 14 deletions(-)

diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
index 033bc9e..eb3a0b7 100644
--- a/PVE/QemuServer.pm
+++ b/PVE/QemuServer.pm
@@ -3711,20 +3711,8 @@ my $snapshot_prepare = sub {
 
            return if drive_is_cdrom($drive);
            my $volid = $drive->{file};
-
-           my ($storeid, $volname) = PVE::Storage::parse_volume_id($volid, 1);
-           if ($storeid) {
-               my $scfg = PVE::Storage::storage_config($storecfg, $storeid);
-               die "can't snapshot volume '$volid'\n"          
-                   if !(($scfg->{path} && $volname =~ m/\.qcow2$/) ||
-                        ($scfg->{type} eq 'nexenta') || 
-                        ($scfg->{type} eq 'rbd') || 
-                        ($scfg->{type} eq 'sheepdog'));
-           } elsif ($volid =~ m|^(/.+)$| && -e $volid) {
-               die "snapshot device '$volid' is not possible\n";
-           } else {
-               die "can't snapshot volume '$volid'\n";
-           }
+           my $testfeature = 1;
+           PVE::Storage::volume_snapshot($storecfg, $volid, $snapname, undef, 
$testfeature);
        });
 
 
-- 
1.7.10

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

Reply via email to