[Pkg-escience-soc2009] [SCM] Tool for creating VM images. branch, master, updated. gsoc-2009-final-7-g59dabb2

David Wendt dcrkid at yahoo.com
Thu Feb 3 03:02:25 UTC 2011


The following commit has been merged in the master branch:
commit 59dabb237033fbfdc4dd8d3efff88d392b61ebd1
Author: David Wendt <dcrkid at yahoo.com>
Date:   Wed Feb 2 22:00:29 2011 -0500

    Fixed Euca-KVM logic. (Patch submitted by Philipp Berndt <philipp.berndt at gmx.net>)

diff --git a/VMBuilder/plugins/ec2/__init__.py b/VMBuilder/plugins/ec2/__init__.py
index d354f9c..637c1dd 100644
--- a/VMBuilder/plugins/ec2/__init__.py
+++ b/VMBuilder/plugins/ec2/__init__.py
@@ -59,10 +59,10 @@ class EC2(Plugin):
 
         #NOW, actually check if we can do EC2. Also check if we can take advantage of Euca's KVM support
         if not isinstance(self.vm.hypervisor, VMBuilder.plugins.xen.Xen):
-            if not (self.vm.ec2_is_eucalyptus and isinstance(self.vm.hypervisor, VMBuilder.plugins.kvm.vm.KVM)):
-                raise VMBuilderUserError("You must use either Xen or KVM on Eucalyptus")
-            else:
+            if not self.vm.ec2_is_eucalyptus:
                 raise VMBuilderUserError("You must use Xen on EC2")
+            elif not isinstance(self.vm.hypervisor, VMBuilder.plugins.kvm.vm.KVM):
+                raise VMBuilderUserError("You must use either Xen or KVM on Eucalyptus")
 
         if self.vm.ec2_no_amazon_tools:
             logging.info("Not using Amazon ec2-tools.")
@@ -100,9 +100,6 @@ class EC2(Plugin):
         if self.ec2_tools_prefix:
             logging.info("Using EC2 tools prefix: %s" % self.ec2_tools_prefix)
 
-        if not self.vm.hypervisor.name == 'Xen':
-            raise VMBuilderUserError('When building for EC2 you must use the xen hypervisor.')
-
         if self.vm.ec2_bundle:
             if not self.vm.ec2_name:
                 raise VMBuilderUserError('When building for EC2 you must supply the name for the image.')

-- 
Tool for creating VM images.



More information about the Pkg-escience-soc2009 mailing list