aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorKeir Fraser <keir.fraser@citrix.com>2009-07-02 11:32:49 +0100
committerKeir Fraser <keir.fraser@citrix.com>2009-07-02 11:32:49 +0100
commitadd9e579b672d4360cbe58bb1ff01aa4b28d86b2 (patch)
tree3eb4d7fae8640f482fd8b6291a2269f4b127da8a /tools
parent4e0aaab31b03124d21d3bee27f26dd7edfc17547 (diff)
downloadxen-add9e579b672d4360cbe58bb1ff01aa4b28d86b2.tar.gz
xen-add9e579b672d4360cbe58bb1ff01aa4b28d86b2.tar.bz2
xen-add9e579b672d4360cbe58bb1ff01aa4b28d86b2.zip
xend: Restore uname of blktap for managed domains
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/python/xen/xend/XendConfig.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/tools/python/xen/xend/XendConfig.py b/tools/python/xen/xend/XendConfig.py
index f3fc0db95a..fdff3adec3 100644
--- a/tools/python/xen/xend/XendConfig.py
+++ b/tools/python/xen/xend/XendConfig.py
@@ -1120,6 +1120,8 @@ class XendConfig(dict):
if sxp.child_value(config, 'bootable', None) is None:
is_bootable = dev_cfg.get('bootable', 0)
config.append(['bootable', int(is_bootable)])
+ if dev_cfg.has_key('required_uname'):
+ config.append(['required_uname', dev_cfg['required_uname']])
config.append(['VDI', dev_cfg.get('VDI', '')])
sxpr.append(['device', config])
@@ -1370,10 +1372,16 @@ class XendConfig(dict):
dev_info['driver'] = 'paravirtualised'
if dev_type == 'tap' or dev_type == 'tap2':
+ if dev_info.has_key('required_uname'):
+ # Restore uname by required_uname because uname might
+ # be replaced with 'phy:/dev/xen/blktap-2/tapdev*'.
+ dev_info['uname'] = dev_info['required_uname']
+ else:
+ # Save uname for next domain start.
+ dev_info['required_uname'] = dev_info['uname']
if dev_info['uname'].split(':')[1] not in blktap_disk_types:
raise XendConfigError("tap:%s not a valid disk type" %
dev_info['uname'].split(':')[1])
- dev_info['required_uname'] = dev_info['uname']
if dev_type == 'vif':
if not dev_info.get('mac'):