From 259d11e40936f72b458159fc81e0238c3ebfd0db Mon Sep 17 00:00:00 2001 From: gryf Date: Thu, 20 Apr 2023 17:01:57 +0200 Subject: [PATCH] Don't reset Debian Bookworm on first run. Issue/glitch with kernel panic on first run seems to be fixed on Debian Bookworm (12). Do not reset VM for that version (and hopefully upcoming). --- box.py | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/box.py b/box.py index 363ba59..a61c8b8 100755 --- a/box.py +++ b/box.py @@ -1320,11 +1320,18 @@ def vmcreate(args, conf=None): f'Check output in debug mode.') time.sleep(3) counter += 1 - if counter == 8 and conf.distro == 'debian': + + # TODO: there is something odd with debian cloud images prior + # to 12 (bookworm), as on first run system crashes. In that + # case after ~20 seconds there should already be panic, reset + # machine as a workaround. Remove this after debian 12 + # stabilization later this year. + if (counter == 8 and conf.distro == 'debian' + and conf.version != '12'): + LOG.debug('Resetting `%s`, due to the issue with kernel ' + 'panic on Debian %s the first run', conf.name, + conf.version) counter += 1 - # there is something odd with debian cloud images, as they - # segfault on first run. after ~20 seconds there should - # already be panic, reset machine should help vbox.poweroff() time.sleep(3) vbox.poweron(args.type)