]> git.proxmox.com Git - pve-container.git/commitdiff
vzdump: always check if we have a valid rootfs volid
authorDietmar Maurer <dietmar@proxmox.com>
Wed, 26 Aug 2015 06:27:51 +0000 (08:27 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Wed, 26 Aug 2015 06:27:51 +0000 (08:27 +0200)
src/PVE/VZDump/LXC.pm

index dd092b86d8241c905d600c959378a75fb4ac260a..2202a84f6c0e68143770eaf4e1a73c6bc3cfe537 100644 (file)
@@ -114,14 +114,13 @@ sub prepare {
     my $rootinfo = PVE::LXC::parse_ct_mountpoint($conf->{rootfs});
     my $volid = $rootinfo->{volume};
 
+    die "missing root volid (no volid)\n" if !$volid;
+
     # fixme: when do we deactivate ??
-    PVE::Storage::activate_volumes($self->{storecfg}, [$volid]) if $volid;
+    PVE::Storage::activate_volumes($self->{storecfg}, [$volid]);
 
     if ($mode eq 'snapshot') {
 
-       die "mode failure - storage does not support snapshots (no volid)\n" 
-           if !$volid;
-
        die "mode failure - storage does not support snapshots\n"
            if !PVE::Storage::volume_has_feature($self->{storecfg}, 'snapshot', $volid);