implement phase2_cleanup

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
This commit is contained in:
Alexandre Derumier 2012-08-21 12:21:50 +02:00 committed by Dietmar Maurer
parent b8d208023b
commit c04b5b04de

View File

@ -369,6 +369,23 @@ sub phase2 {
}
}
sub phase2_cleanup {
my ($self, $vmid, $err) = @_;
$self->log('info', "aborting phase 2 - cleanup resources");
my $conf = $self->{vmconf};
delete $conf->{lock};
eval { PVE::QemuServer::update_config_nolock($vmid, $conf, 1) };
if (my $err = $@) {
$self->log('err', $err);
}
## fixme : vm_stop_cleanup on target vm
}
sub phase3 {
my ($self, $vmid) = @_;