do not raise exceptions in vm_stop_cleanup

This commit is contained in:
Dietmar Maurer 2011-12-16 06:34:35 +01:00
parent 4d81a1d327
commit 745fed70c0

View File

@ -2569,10 +2569,13 @@ sub get_vm_volumes {
sub vm_stop_cleanup { sub vm_stop_cleanup {
my ($storecfg, $vmid, $conf) = @_; my ($storecfg, $vmid, $conf) = @_;
fairsched_rmnod($vmid); # try to destroy group eval {
fairsched_rmnod($vmid); # try to destroy group
my $vollist = get_vm_volumes($conf); my $vollist = get_vm_volumes($conf);
PVE::Storage::deactivate_volumes($storecfg, $vollist); PVE::Storage::deactivate_volumes($storecfg, $vollist);
};
warn $@ if $@; # avoid errors - just warn
} }
# Note: use $nockeck to skip tests if VM configuration file exists. # Note: use $nockeck to skip tests if VM configuration file exists.