[et-mgmt-tools] koan on RHEL-4, missing dependencies...

Michael DeHaan mdehaan at redhat.com
Fri Mar 23 16:59:05 UTC 2007


I've just noticed that koan on RHEL-4 tries to overzealously import 
virtualization features, even when not using the --virt-parameter.  This 
can result in --replace-self not working
on older systems.

If you are trying to get --replace-self in koan to work on system and 
running into trouble because of missing virtualization modules, here's a 
patch:


diff -r eaeec03f11d1 koan/app.py
--- a/koan/app.py       Wed Mar 14 16:41:44 2007 -0400
+++ b/koan/app.py       Fri Mar 23 12:55:51 2007 -0400
@@ -27,7 +27,6 @@ import shutil
 import shutil
 import errno
 import re
-import virtcreate
 
 """
 koan --virt [--profile=webserver|--system=name] --server=hostname
@@ -98,9 +97,6 @@ def main():
     except InfoException, ie:
         print str(ie)
         return 1
-    except virtcreate.VirtCreateException, xce:
-        print str(xce)
-        return 2
     except:
         traceback.print_exc()
         return 3
@@ -587,6 +583,11 @@ class Koan:
         # parser issues?  lang needs a trailing = and somehow doesn't 
have it.
         kextra = kextra.replace("lang ","lang= ")
 
+        try:
+            import virtcreate
+        except:
+            print "no virtualization support available, install 
python-virtinst?"
+
         results = virtcreate.start_paravirt_install(
             name=self.calc_virt_name(pd),
             ram=self.calc_virt_ram(pd),

This will be included in the next release of koan and will checked in 
shortly.

--Michael




More information about the et-mgmt-tools mailing list