ia64/xen-unstable
changeset 15513:3196b63a7301
xend: Fix xm block/network-attach command for inactive managed domain
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
author | kfraser@localhost.localdomain |
---|---|
date | Fri Jul 06 14:41:05 2007 +0100 (2007-07-06) |
parents | f20ee5bc9d28 |
children | 05331a29f3cb |
files | tools/python/xen/xend/XendDomainInfo.py |
line diff
1.1 --- a/tools/python/xen/xend/XendDomainInfo.py Fri Jul 06 14:39:21 2007 +0100 1.2 +++ b/tools/python/xen/xend/XendDomainInfo.py Fri Jul 06 14:41:05 2007 +0100 1.3 @@ -502,9 +502,18 @@ class XendDomainInfo: 1.4 dev_uuid = self.info.device_add(dev_type, cfg_sxp = dev_config) 1.5 dev_config_dict = self.info['devices'][dev_uuid][1] 1.6 log.debug("XendDomainInfo.device_create: %s" % scrub_password(dev_config_dict)) 1.7 - dev_config_dict['devid'] = devid = \ 1.8 - self._createDevice(dev_type, dev_config_dict) 1.9 - self._waitForDevice(dev_type, devid) 1.10 + 1.11 + if self.domid is not None: 1.12 + try: 1.13 + dev_config_dict['devid'] = devid = \ 1.14 + self._createDevice(dev_type, dev_config_dict) 1.15 + self._waitForDevice(dev_type, devid) 1.16 + except VmError, ex: 1.17 + raise ex 1.18 + else: 1.19 + devid = None 1.20 + 1.21 + xen.xend.XendDomain.instance().managed_config_save(self) 1.22 return self.getDeviceController(dev_type).sxpr(devid) 1.23 1.24 def device_configure(self, dev_sxp, devid = None):