ia64/xen-unstable

changeset 2989:6a8849c4b647

bitkeeper revision 1.1159.170.28 (4199f979RH9YDYvR9XUZksaNnSlnLQ)

Fixes to xend for backends in domains other than dom0.
author akw27@labyrinth.cl.cam.ac.uk
date Tue Nov 16 12:58:33 2004 +0000 (2004-11-16)
parents 0cf9476c362d
children 6a8961902567
files tools/python/xen/xend/XendDomainInfo.py tools/python/xen/xend/server/blkif.py tools/python/xen/xend/server/netif.py
line diff
     1.1 --- a/tools/python/xen/xend/XendDomainInfo.py	Tue Nov 16 11:56:51 2004 +0000
     1.2 +++ b/tools/python/xen/xend/XendDomainInfo.py	Tue Nov 16 12:58:33 2004 +0000
     1.3 @@ -971,8 +971,8 @@ class XendDomainInfo:
     1.4  
     1.5          @return: deferred - calls callback with vm
     1.6          """
     1.7 -        d = self.create_blkif()
     1.8 -        d.addCallback(lambda x: self.create_devices())
     1.9 +        d = self.create_devices()
    1.10 +        d.addCallback(lambda x: self.create_blkif())
    1.11          d.addCallback(self._configure)
    1.12          return d
    1.13  
    1.14 @@ -994,9 +994,12 @@ class XendDomainInfo:
    1.15  
    1.16          @return: deferred
    1.17          """
    1.18 -        ctrl = xend.blkif_create(self.dom, recreate=self.recreate)
    1.19 -        back = ctrl.getBackendInterface(0)
    1.20 -        return back.connect(recreate=self.recreate)
    1.21 +        if (self.get_devices("vbd") == None):
    1.22 +            ctrl = xend.blkif_create(self.dom, recreate=self.recreate)
    1.23 +            back = ctrl.getBackendInterface(0)
    1.24 +            return back.connect(recreate=self.recreate)
    1.25 +        else:
    1.26 +            return None
    1.27      
    1.28      def dom_construct(self, dom, config):
    1.29          """Construct a vm for an existing domain.
     2.1 --- a/tools/python/xen/xend/server/blkif.py	Tue Nov 16 11:56:51 2004 +0000
     2.2 +++ b/tools/python/xen/xend/server/blkif.py	Tue Nov 16 12:58:33 2004 +0000
     2.3 @@ -187,7 +187,7 @@ class BlkifBackendInterface(controller.B
     2.4          self.writeRequest(msg, response=response)
     2.5  
     2.6      def connectInterface(self, val):
     2.7 -        self.evtchn = channel.eventChannel(0, self.controller.dom)
     2.8 +        self.evtchn = channel.eventChannel(self.dom, self.controller.dom)
     2.9          log.debug("Connecting blkif to event channel %s ports=%d:%d",
    2.10                    str(self), self.evtchn['port1'], self.evtchn['port2'])
    2.11          msg = packMsg('blkif_be_connect_t',
     3.1 --- a/tools/python/xen/xend/server/netif.py	Tue Nov 16 11:56:51 2004 +0000
     3.2 +++ b/tools/python/xen/xend/server/netif.py	Tue Nov 16 12:58:33 2004 +0000
     3.3 @@ -307,7 +307,7 @@ class NetDev(controller.SplitDev):
     3.4      
     3.5      def recv_fe_interface_connect(self, val, req):
     3.6          if not req: return
     3.7 -        self.evtchn = channel.eventChannel(0, self.controller.dom)
     3.8 +        self.evtchn = channel.eventChannel(self.dom, self.controller.dom)
     3.9          msg = packMsg('netif_be_connect_t',
    3.10                        { 'domid'          : self.controller.dom,
    3.11                          'netif_handle'   : self.vif,