mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 10:40:03 +01:00
Don't do device create on domain recreate.
Also don't add XendDomainInfo object to XendDomain dictionary from XendDomainInfo object but do it in XendDomain. Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
This commit is contained in:
1 parent
403d1cc0a8
commit
5d9baf7940
2 files changed
+3
-6
No files matched your search
@@ -276,6 +276,7 @@ class XendDomain:
|
||||
@return: domain
|
||||
"""
|
||||
dominfo = XendDomainInfo.create(self.dbmap, config)
|
||||
self._add_domain(dominfo)
|
||||
return dominfo
|
||||
|
||||
def domain_restart(self, dominfo):
|
||||
|
||||
@@ -538,7 +538,6 @@ class XendDomainInfo:
|
||||
self.init_image()
|
||||
self.configure_cpus(config)
|
||||
self.init_domain()
|
||||
self.register_domain()
|
||||
|
||||
# Create domain devices.
|
||||
self.configure_backends()
|
||||
@@ -554,11 +553,6 @@ class XendDomainInfo:
|
||||
self.destroy()
|
||||
raise
|
||||
|
||||
def register_domain(self):
|
||||
xd = get_component('xen.xend.XendDomain')
|
||||
xd._add_domain(self)
|
||||
self.exportToDB(save=True)
|
||||
|
||||
def configure_cpus(self, config):
|
||||
try:
|
||||
self.cpu_weight = float(sxp.child_value(config, 'cpu_weight', '1'))
|
||||
@@ -746,6 +740,8 @@ class XendDomainInfo:
|
||||
|
||||
@raise: VmError for invalid devices
|
||||
"""
|
||||
if self.recreate:
|
||||
return
|
||||
if not self.rebooting():
|
||||
self.create_configured_devices()
|
||||
self.image.createDeviceModel()
|
||||
|
||||