Fix the VM.is_a_template flag for domain 0.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
This commit is contained in:
Ewan Mellor committed 2007-03-26 00:09:00 +01:00
1 parent 9c052c30d6
commit d4eac439d5
3 files changed
+6 -2

No files matched your search

+2 -2
View File
@@ -1546,7 +1546,7 @@ class XendAPI(object):
'name_label': xeninfo.getName(),
'name_description': xeninfo.getName(),
'user_version': 1,
'is_a_template': xeninfo.info.get('is_a_template'),
'is_a_template': xeninfo.info['is_a_template'],
'auto_power_on': False,
'resident_on': XendNode.instance().uuid,
'memory_static_min': xeninfo.get_memory_static_min(),
@@ -1576,7 +1576,7 @@ class XendAPI(object):
'tools_version': xeninfo.get_tools_version(),
'other_config': xeninfo.info.get('other_config', {}),
'domid': domid is None and -1 or domid,
'is_control_domain': xeninfo == xendom.privilegedDomain(),
'is_control_domain': xeninfo.info['is_control_domain'],
'metrics': xeninfo.get_metrics()
}
return xen_api_success(record)
+2
View File
@@ -298,6 +298,8 @@ class XendConfig(dict):
'actions_after_reboot': 'restart',
'actions_after_crash': 'restart',
'actions_after_suspend': '',
'is_template': False,
'is_control_domain': False,
'features': '',
'PV_bootloader': '',
'PV_kernel': '',
+2
View File
@@ -127,6 +127,8 @@ def recreate(info, priv):
assert not info['dying']
xeninfo = XendConfig.XendConfig(dominfo = info)
xeninfo['is_control_domain'] = priv
xeninfo['is_a_template'] = False
domid = xeninfo['domid']
uuid1 = uuid.fromString(xeninfo['uuid'])
needs_reinitialising = False
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.