[gnome-boxes/gnome-3-14] vm-configurator: Also update 'host-model' using domains



commit 70920acf22042e2c811f4518674e742a02e59bba
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date:   Tue Sep 30 13:39:29 2014 +0100

    vm-configurator: Also update 'host-model' using domains
    
    While we are automatically changing the CPU mode from 'host-passthrough'
    to 'custom' for existing domains, we should also update it for even
    older domains that are still using 'host-model' mode. The issue with
    'host-model' was that we can't save those domains so its kinda important
    to change them.

 src/vm-configurator.vala |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/src/vm-configurator.vala b/src/vm-configurator.vala
index 11dd170..62af0ee 100644
--- a/src/vm-configurator.vala
+++ b/src/vm-configurator.vala
@@ -229,7 +229,9 @@ private class Boxes.VMConfigurator {
     public static async void update_existing_domain (Domain          domain,
                                                      GVir.Connection connection) {
         try {
-            if (domain.get_cpu ().get_mode () == DomainCpuMode.HOST_PASSTHROUGH &&
+            var mode = domain.get_cpu ().get_mode ();
+            if ((mode == DomainCpuMode.HOST_PASSTHROUGH ||
+                 mode == DomainCpuMode.HOST_MODEL) &&
                 is_boxes_installed (domain)) {
                 var capabilities = yield connection.get_capabilities_async (null);
                 set_cpu_config (domain, capabilities);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]