remove old move disk snapshot check

this is no longer needed, if the moved disk was referenced
by a snapshot we have already died early, and the config is
locked.
This commit is contained in:
Fabian Grünbichler 2016-07-01 14:18:32 +02:00 committed by Wolfgang Bumiller
parent 9dbf9b5417
commit a3d0bafba5

View File

@ -2572,17 +2572,11 @@ __PACKAGE__->register_method({
}
if ($param->{delete}) {
if (PVE::QemuServer::is_volume_in_use($storecfg, $conf, undef, $old_volid)) {
warn "volume $old_volid still has snapshots, can't delete it\n";
PVE::QemuConfig->add_unused_volume($conf, $old_volid);
PVE::QemuConfig->write_config($vmid, $conf);
} else {
eval {
PVE::Storage::deactivate_volumes($storecfg, [$old_volid]);
PVE::Storage::vdisk_free($storecfg, $old_volid);
};
warn $@ if $@;
}
eval {
PVE::Storage::deactivate_volumes($storecfg, [$old_volid]);
PVE::Storage::vdisk_free($storecfg, $old_volid);
};
warn $@ if $@;
}
};