dom0/core: do not write netvm_domid for halted VMs

This commit is contained in:
Marek Marczykowski 2012-04-19 14:43:05 +02:00
parent 5bfe1f7c60
commit 85609a764f

View File

@ -1896,11 +1896,17 @@ class QubesProxyVm(QubesNetVm):
self.write_iptables_xenstore_entry()
def write_netvm_domid_entry(self, xid = -1):
if not self.is_running():
return
if xid < 0:
xid = self.get_xid()
xs.write('', "/local/domain/{0}/qubes_netvm_domid".format(xid),
"{0}".format(self.netvm.get_xid()))
if self.netvm is None:
xs.write('', "/local/domain/{0}/qubes_netvm_domid".format(xid), '')
else:
xs.write('', "/local/domain/{0}/qubes_netvm_domid".format(xid),
"{0}".format(self.netvm.get_xid()))
def write_iptables_xenstore_entry(self):
xs.rm('', "/local/domain/{0}/qubes_iptables_domainrules".format(self.get_xid()))