diff --git a/qubes/vm/dispvm.py b/qubes/vm/dispvm.py index f985959f9..6ecb0493a 100644 --- a/qubes/vm/dispvm.py +++ b/qubes/vm/dispvm.py @@ -373,11 +373,13 @@ async def on_domain_started_dispvm( except asyncio.TimeoutError: raise qubes.exc.QubesException( "Timed out call to '%s' after '%d' seconds during preload " - "startup" % (service, timeout) + "startup" % (rpc, timeout) ) except (subprocess.CalledProcessError, qubes.exc.QubesException): raise qubes.exc.QubesException( - "Error on call to '%s' during preload startup" % service + "Error on call to '%s' during preload startup. To debug, run " + "the following on a new disposable of '%s': systemctl " + "--failed" % (rpc, self.template) ) if not self.preload_requested: diff --git a/qubes/vm/qubesvm.py b/qubes/vm/qubesvm.py index 4dd6c1dad..d26fded48 100644 --- a/qubes/vm/qubesvm.py +++ b/qubes/vm/qubesvm.py @@ -1548,6 +1548,10 @@ async def start( except Exception as exc: # pylint: disable=bare-except self.log.error("Start failed: %s", str(exc)) + # let anyone receiving domain-pre-start know that startup failed + await self.fire_event_async( + "domain-start-failed", reason=str(exc) + ) # This avoids losing the exception if an exception is # raised in self.kill(), because the vm is not # running or paused @@ -1555,11 +1559,6 @@ async def start( await self.kill() except qubes.exc.QubesVMNotStartedError: pass - - # let anyone receiving domain-pre-start know that startup failed - await self.fire_event_async( - "domain-start-failed", reason=str(exc) - ) raise return self