qubes/vm: make sure to close qmemman socket after failed startup

If qmemman socket isn't closed, it will block other VM startups.
This commit is contained in:
Marek Marczykowski-Górecki 2016-12-01 03:53:34 +01:00
parent 01aedb7f18
commit bcab92ee64
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724

View File

@ -821,8 +821,12 @@ class QubesVM(qubes.vm.mix.net.NetVMMixin, qubes.vm.BaseVM):
self._update_libvirt_domain()
qmemman_client = self.request_memory(mem_required)
self.libvirt_domain.createWithFlags(libvirt.VIR_DOMAIN_START_PAUSED)
try:
self.libvirt_domain.createWithFlags(libvirt.VIR_DOMAIN_START_PAUSED)
except:
if qmemman_client:
qmemman_client.close()
raise
try:
self.fire_event('domain-spawn',