dom0/core: fix race in QubesHVm.stubdom_xid

device-model-domid is written to xenstore after domaid id itself, so do not
assume the former is present when we know VM XID.
This commit is contained in:
Marek Marczykowski 2012-06-13 17:11:21 +02:00
parent 784f0f5607
commit 5504142187

View File

@ -2404,7 +2404,11 @@ class QubesHVm(QubesVm):
if self.xid < 0:
return -1
return int(xs.read('', '/local/domain/%d/image/device-model-domid' % self.xid))
stubdom_xid_str = xs.read('', '/local/domain/%d/image/device-model-domid' % self.xid)
if stubdom_xid_str is not None:
return int(stubdom_xid_str)
else:
return -1
def start_guid(self, verbose = True, notify_function = None):
if verbose: