Skip to content

Commit

Permalink
[UPC#320] the domain may already be removed
Browse files Browse the repository at this point in the history
  • Loading branch information
frankiejol committed Nov 20, 2017
1 parent e40d596 commit f1e6c0e
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions lib/Ravada/Domain/KVM.pm
Original file line number Diff line number Diff line change
Expand Up @@ -186,16 +186,20 @@ sub remove {
$self->_do_force_shutdown();
}

$self->remove_disks();

eval { $self->remove_disks(); };
die $@ if $@ && $@ !~ /libvirt error code: 42/;
# warn "WARNING: Problem removing disks for ".$self->name." : $@" if $@ && $0 !~ /\.t$/;

$self->_remove_file_image();
eval { $self->_remove_file_image() };
die $@ if $@ && $@ !~ /libvirt error code: 42/;
# warn "WARNING: Problem removing file image for ".$self->name." : $@" if $@ && $0 !~ /\.t$/;

# warn "WARNING: Problem removing ".$self->file_base_img." for ".$self->name
# ." , I will try again later : $@" if $@;

$self->domain->undefine();
eval { $self->domain->undefine() };
die $@ if $@ && $@ !~ /libvirt error code: 42/;
}


Expand Down

0 comments on commit f1e6c0e

Please sign in to comment.