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

[Xen-devel] [RFC] Disallowing xm operations on HVM domains




Certain operations, such as for example 'xm block-attach' don't work on HVM domains and should be intercepted in xend. The following patch shows an example of how this could be done. When run, unfortunately the usage of block-detach is still shown.

  Stefan

diff -r 38f9bd7a4ce6 tools/python/xen/xend/XendDomainInfo.py
--- a/tools/python/xen/xend/XendDomainInfo.py                 Tue Oct  3 10:39:22 2006
+++ b/tools/python/xen/xend/XendDomainInfo.py                 Tue Oct  3 21:05:11 2006
@@ -1081,8 +1081,14 @@


    ## private:
+    
+    def disallowHVM(self):
+        if self.info['image'][0] == "hvm":
+           raise XendError("Operation not allow on HVM-type domain.")
+            

    def createDevice(self, deviceClass, devconfig):
+        self.disallowHVM()
        return self.getDeviceController(deviceClass).createDevice(devconfig)

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

 


Rackspace

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