[Kimchi-devel] [PATCH 1/2 V2] Disable vhost feature in Ubuntu LE

Rodrigo Trujillo rodrigo.trujillo at linux.vnet.ibm.com
Wed Jul 23 15:03:34 UTC 2014


There are know problems related to vhost feature and Ubunut LE. This
patch sets driver name='qemu', disabling the vhost feature when libvirt
starts a virtual machine.

Signed-off-by: Rodrigo Trujillo <rodrigo.trujillo at linux.vnet.ibm.com>
---
 src/kimchi/vmtemplate.py | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/src/kimchi/vmtemplate.py b/src/kimchi/vmtemplate.py
index 32d331b..88594b8 100644
--- a/src/kimchi/vmtemplate.py
+++ b/src/kimchi/vmtemplate.py
@@ -23,6 +23,9 @@ import socket
 import urlparse
 
 
+from distutils.version import LooseVersion
+
+
 from kimchi import osinfo
 from kimchi.exception import InvalidParameter, IsoFormatError
 from kimchi.isoinfo import IsoImage
@@ -263,11 +266,16 @@ class VMTemplate(object):
         return ret
 
     def _get_networks_xml(self):
+        # Hack to disable vhost feature in Ubuntu LE (PPC)
+        driver = ''
+        if (self.info['os_distro'] == 'ubuntu' and
+            LooseVersion(self.info['os_version']) <= LooseVersion('14.04')):
+            driver = "  <driver name='qemu'/>\n            "
         network = """
             <interface type='network'>
               <source network='%(network)s'/>
               <model type='%(nic_model)s'/>
-            </interface>
+            %(driver)s</interface>
         """
         networks = ""
         net_info = {"nic_model": self.info['nic_model']}
-- 
1.9.3




More information about the Kimchi-devel mailing list