vm: always log startup fail

This commit is contained in:
Marek Marczykowski-Górecki 2017-11-06 01:19:19 +01:00
parent 73c33525a0
commit b5e07238a0
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724

View File

@ -830,6 +830,7 @@ class QubesVM(qubes.vm.mix.net.NetVMMixin, qubes.vm.BaseVM):
libvirt.VIR_DOMAIN_START_PAUSED)
except Exception as exc:
self.log.error('Start failed: %s', str(exc))
# let anyone receiving domain-pre-start know that startup failed
yield from self.fire_event_async('domain-start-failed',
reason=str(exc))
@ -857,6 +858,7 @@ class QubesVM(qubes.vm.mix.net.NetVMMixin, qubes.vm.BaseVM):
start_guid=start_guid)
except Exception as exc: # pylint: disable=bare-except
self.log.error('Start failed: %s', str(exc))
if self.is_running() or self.is_paused():
# This avoids losing the exception if an exception is
# raised in self.force_shutdown(), because the vm is not