[virt-tools-list] [PATCH 1/1] virtinst: Set default value of machine type as pseries on ppc64

Li Zhang zhlcindy at gmail.com
Thu Aug 23 15:27:11 UTC 2012


The default value is None on ppc64, but pseries is prefered
on ppc64. So this patch is to set the default value.

Signed-off-by: Li Zhang <zhlcindy at linux.vnet.ibm.com>
---
 virtinst/Guest.py |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/virtinst/Guest.py b/virtinst/Guest.py
index 23b4946..22eac45 100644
--- a/virtinst/Guest.py
+++ b/virtinst/Guest.py
@@ -1435,6 +1435,9 @@ class Guest(XMLBuilderDomain.XMLBuilderDomain):
         if features["pae"] is None and self._get_caps():
             features["pae"] = self._get_caps().support_pae()
 
+        if (self.installer.machine == None and
+            self._get_caps().host.arch == "ppc64"):
+            self.installer.machine = "pseries"
 
     def _set_pv_defaults(self, devlist_func, remove_func):
         # Default file backed PV guests to tap driver
-- 
1.7.7.6




More information about the virt-tools-list mailing list