remove running from Storage and check it in QemuServer

It is better to check if a VM is running in QemuServer then in Storage.
for the Storage there is no difference if it is running or not.

Signed-off-by: Wolfgang Link <w.link@proxmox.com>
This commit is contained in:
Wolfgang Link
2015-05-06 09:57:35 +02:00
committed by Dietmar Maurer
parent 1ccae4490e
commit f5640e7d3b
7 changed files with 8 additions and 14 deletions

View File

@ -162,13 +162,13 @@ sub volume_rollback_is_possible {
}
sub volume_snapshot {
my ($cfg, $volid, $snap, $running) = @_;
my ($cfg, $volid, $snap) = @_;
my ($storeid, $volname) = parse_volume_id($volid, 1);
if ($storeid) {
my $scfg = storage_config($cfg, $storeid);
my $plugin = PVE::Storage::Plugin->lookup($scfg->{type});
return $plugin->volume_snapshot($scfg, $storeid, $volname, $snap, $running);
return $plugin->volume_snapshot($scfg, $storeid, $volname, $snap);
} elsif ($volid =~ m|^(/.+)$| && -e $volid) {
die "snapshot file/device '$volid' is not possible\n";
} else {