Skip to content

Commit

Permalink
fix(backend): start hibernated crashed KVM domains
Browse files Browse the repository at this point in the history
Remove the saved image file and start a fresh clone

issue UPC#587
  • Loading branch information
frankiejol committed Nov 12, 2018
1 parent 8527ea9 commit f97ee4a
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion lib/Ravada/Domain/KVM.pm
Original file line number Diff line number Diff line change
Expand Up @@ -612,7 +612,16 @@ sub start {
}
$self->_set_spice_ip($set_password);
eval { $self->domain->create() };
die $@ if $@ && $@ !~ /libvirt error code: 55,/;
if ( $@ && $@ !~ /already running/i ) {
if ( $self->domain->has_managed_save_image ) {
$request->status("removing saved image") if $request;
$self->domain->managed_save_remove();
$self->domain->create();
} elsif ( $request ) {
$request->error($@);
die $@ if $@;
}
}
}

sub _pre_shutdown_domain {
Expand Down

0 comments on commit f97ee4a

Please sign in to comment.