# HG changeset patch
# User Ewan Mellor <ewan@xxxxxxxxxxxxx>
# Date 1174864140 -3600
# Node ID eb52a7f22e72e6cd6a61c273f82a63110c8c461d
# Parent af07c7b01893c2916060f8f48716de7072a3432f
Fix the VM.is_a_template flag for domain 0.
Signed-off-by: Ewan Mellor <ewan@xxxxxxxxxxxxx>
---
tools/python/xen/xend/XendAPI.py | 4 ++--
tools/python/xen/xend/XendConfig.py | 2 ++
tools/python/xen/xend/XendDomainInfo.py | 2 ++
3 files changed, 6 insertions(+), 2 deletions(-)
diff -r af07c7b01893 -r eb52a7f22e72 tools/python/xen/xend/XendAPI.py
--- a/tools/python/xen/xend/XendAPI.py Mon Mar 26 00:08:13 2007 +0100
+++ b/tools/python/xen/xend/XendAPI.py Mon Mar 26 00:09:00 2007 +0100
@@ -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)
diff -r af07c7b01893 -r eb52a7f22e72 tools/python/xen/xend/XendConfig.py
--- a/tools/python/xen/xend/XendConfig.py Mon Mar 26 00:08:13 2007 +0100
+++ b/tools/python/xen/xend/XendConfig.py Mon Mar 26 00:09:00 2007 +0100
@@ -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': '',
diff -r af07c7b01893 -r eb52a7f22e72 tools/python/xen/xend/XendDomainInfo.py
--- a/tools/python/xen/xend/XendDomainInfo.py Mon Mar 26 00:08:13 2007 +0100
+++ b/tools/python/xen/xend/XendDomainInfo.py Mon Mar 26 00:09:00 2007 +0100
@@ -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
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|