WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

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

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [RFC] Disallowing xm operations on HVM domains
From: Stefan Berger <stefanb@xxxxxxxxxx>
Date: Tue, 3 Oct 2006 21:18:24 -0400
Delivery-date: Tue, 03 Oct 2006 18:18:54 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx

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
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [RFC] Disallowing xm operations on HVM domains, Stefan Berger <=