[Kimchi-devel] [PATCH] Fix memory add aligment to 256 in PowerPC

Rodrigo Trujillo rodrigo.trujillo at linux.vnet.ibm.com
Mon Nov 23 23:14:12 UTC 2015


This patch fixes an error in the 'if' that checks the system
architecture.

Signed-off-by: Rodrigo Trujillo <rodrigo.trujillo at linux.vnet.ibm.com>
---
 src/wok/plugins/kimchi/model/vms.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/wok/plugins/kimchi/model/vms.py b/src/wok/plugins/kimchi/model/vms.py
index 5623879..7e12b91 100644
--- a/src/wok/plugins/kimchi/model/vms.py
+++ b/src/wok/plugins/kimchi/model/vms.py
@@ -238,9 +238,9 @@ class VMModel(object):
             vm_locks[name] = lock
 
         with lock:
-            # make sure memory is alingned in 256MiB
+            # make sure memory is alingned in 256MiB in PowerPC
             distro, _, _ = platform.linux_distribution()
-            if 'memory' in params and distro != "IBM_PowerKVM":
+            if 'memory' in params and distro == "IBM_PowerKVM":
                 if params['memory'] % PPC_MEM_ALIGN != 0:
                     raise InvalidParameter('KCHVM0071E',
                                            {'mem': str(params['memory']),
-- 
2.1.0




More information about the Kimchi-devel mailing list