Skip to content

Commit

Permalink
DEBUG: log list of VMs when startup failed
Browse files Browse the repository at this point in the history
And also basic xen info (including free memory)
  • Loading branch information
marmarek committed Oct 14, 2024
1 parent 7b755c7 commit 529d85f
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions qubes/vm/qubesvm.py
Original file line number Diff line number Diff line change
Expand Up @@ -1222,8 +1222,12 @@ async def start(self, start_guid=True, notify_function=None,

self._update_libvirt_domain()

free_mem = subprocess.check_output(["xl", "info", "free_memory"]).decode()
self.log.debug("free mem before start: %s", free_mem)
self.libvirt_domain.createWithFlags(
libvirt.VIR_DOMAIN_START_PAUSED)
free_mem = subprocess.check_output(["xl", "info", "free_memory"]).decode()
self.log.debug("free mem after start: %s", free_mem)

# the above allocates xid, lets announce that
self.fire_event('property-reset:xid', name='xid')
Expand All @@ -1239,6 +1243,10 @@ async def start(self, start_guid=True, notify_function=None,
exc = qubes.exc.QubesException(
'Failed to start an HVM qube with PCI devices assigned '
'- hardware does not support IOMMU/VT-d/AMD-Vi')
free_mem = subprocess.check_output(["xl", "info", "free_memory"]).decode()
self.log.debug("free mem after failed start: %s", free_mem)
subprocess.run(["xl", "list"])
subprocess.run(["xl", "info"])
self.log.error('Start failed: %s', str(exc))
await self.fire_event_async('domain-start-failed',
reason=str(exc))
Expand Down

0 comments on commit 529d85f

Please sign in to comment.