dom0: fix removing "special" VM (eg ClockVM)

Unset collection pointer to some special VMs, when it is removed: ClockVM,
default NetVM, default TemplateVM, UpdateVM
This commit is contained in:
Marek Marczykowski 2011-12-23 17:08:14 +01:00
parent 2d6428e703
commit 4d128dd020

View File

@ -2530,6 +2530,20 @@ class QubesVmCollection(dict):
self[self.clockvm_qid].services['ntpd'] = True
return True
def pop(self, qid):
if self.default_netvm_qid == qid:
self.default_netvm_qid = None
if self.default_fw_netvm_qid == qid:
self.default_fw_netvm_qid = None
if self.clockvm_qid == qid:
self.clockvm_qid = None
if self.updatevm_qid == qid:
self.updatevm_qid = None
if self.default_template_qid == qid:
self.default_template_qid = None
return super(QubesVmCollection, self).pop(qid)
class QubesDaemonPidfile(object):
def __init__(self, name):
self.name = name