[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] [xend] Fix reboot for hvm domains with cdrom devices.



# HG changeset patch
# User chris@xxxxxxxxxxxxxxxxxxxxxxxx
# Node ID 353404fe850c40569d04972ccc8929dc9948b9d8
# Parent  ffa5b2975dfffa1c3a0b8f6fc8fee877f9bfe295
[xend] Fix reboot for hvm domains with cdrom devices.
The device-type was not added to the device details which caused
cdrom devices to appear as harddisks after a reboot.

From: Alex Brett <Alex.Brett@xxxxxxxxxxxxx>
Signed-off-by: Christian Limpach <Christian.Limpach@xxxxxxxxxxxxx>
---
 tools/python/xen/xend/server/DevController.py |    2 ++
 tools/python/xen/xend/server/blkif.py         |    3 +++
 2 files changed, 5 insertions(+)

diff -r ffa5b2975dff -r 353404fe850c 
tools/python/xen/xend/server/DevController.py
--- a/tools/python/xen/xend/server/DevController.py     Fri Aug 04 20:34:44 
2006 +0100
+++ b/tools/python/xen/xend/server/DevController.py     Mon Aug 07 11:59:31 
2006 +0100
@@ -341,6 +341,8 @@ class DevController:
         else:
             raise VmError("Device %s not connected" % devid)
 
+    def readFrontend(self, devid, *args):
+        return xstransact.Read(self.frontendPath(devid), *args)
 
     def deviceIDs(self, transaction = None):
         """@return The IDs of each of the devices currently configured for
diff -r ffa5b2975dff -r 353404fe850c tools/python/xen/xend/server/blkif.py
--- a/tools/python/xen/xend/server/blkif.py     Fri Aug 04 20:34:44 2006 +0100
+++ b/tools/python/xen/xend/server/blkif.py     Mon Aug 07 11:59:31 2006 +0100
@@ -86,6 +86,9 @@ class BlkifController(DevController):
                                                     'mode')
 
         if dev:
+            (dev_type) = self.readFrontend(devid, 'device-type')
+            if dev_type:
+                dev += ":" + dev_type
             result.append(['dev', dev])
         if typ and params:
             result.append(['uname', typ + ":" + params])

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.