[virt-tools-list] [virt-manager PATCH 1/3] virtManager.create:	don't clear recommended machine if none is selected
    Pavel Hrdina 
    phrdina at redhat.com
       
    Thu Jun 16 10:23:19 UTC 2016
    
    
  
This improves loading domcapabilities to get domcapabilities for recommended
machine, not for default machine.
Signed-off-by: Pavel Hrdina <phrdina at redhat.com>
---
 virtManager/create.py | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/virtManager/create.py b/virtManager/create.py
index c7747dd..d984449 100644
--- a/virtManager/create.py
+++ b/virtManager/create.py
@@ -1640,7 +1640,11 @@ class vmmCreate(vmmGObjectUI):
 
     def _build_guest(self, variant):
         guest = self.conn.caps.build_virtinst_guest(self._capsinfo)
-        guest.os.machine = self._get_config_machine()
+
+        # If no machine was selected don't clear recommended machine
+        machine = self._get_config_machine()
+        if machine:
+            guest.os.machine = machine
 
         # Generate UUID (makes customize dialog happy)
         try:
-- 
2.9.0
    
    
More information about the virt-tools-list
mailing list