Skip to content

Commit

Permalink
fix: set internal autostart
Browse files Browse the repository at this point in the history
issue #2097
  • Loading branch information
frankiejol committed Oct 14, 2024
1 parent c8fbeed commit 9f2bfd3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
3 changes: 3 additions & 0 deletions lib/Ravada/Domain.pm
Original file line number Diff line number Diff line change
Expand Up @@ -7830,6 +7830,9 @@ sub restore_backup($self, $backup, $interactive, $rvd_back=undef) {
if($self->_data('is_base')) {
$self->_set_base_vm_db($self->_vm->id,1);
}
if($data->{autostart}) {
$self->autostart(1, Ravada::Utils::user_daemon());
}
return $self;
}

Expand Down
5 changes: 3 additions & 2 deletions t/vm/backup.t
Original file line number Diff line number Diff line change
Expand Up @@ -113,10 +113,11 @@ sub backup_auto_start($vm) {
is($domain2->autostart,1);
is($domain2->_data('autostart'),1);
if ($vm->type eq 'KVM') {
is($domain->domain->get_autostart(),1);
is($domain2->domain->get_autostart(),1);
}
is($domain2->_internal_autostart(),1);

$domain2->remove(user_admin);
exit;

}

Expand Down

0 comments on commit 9f2bfd3

Please sign in to comment.