[gnome-boxes] vm-creator: Set autostart=true on storage pool



commit 193dc1d77c9239c3c04b4c2581d0aadd412ecf56
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date:   Mon May 18 15:12:31 2015 +0100

    vm-creator: Set autostart=true on storage pool
    
    Even though we ensure that storage pool in activated if its been
    de-activated for some reason and even create the backing directory, it
    seems that on at least some machines we fail to do that somehow.
    
    With lack of any data on why and when that happens, let's make the
    storage pool autostart in hopes it helps the situation.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=748160

 src/libvirt-broker.vala |    1 +
 src/vm-creator.vala     |    1 +
 2 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/src/libvirt-broker.vala b/src/libvirt-broker.vala
index 03f564b..6f6a203 100644
--- a/src/libvirt-broker.vala
+++ b/src/libvirt-broker.vala
@@ -95,6 +95,7 @@ private class Boxes.LibvirtBroker : Boxes.Broker {
             yield connection.fetch_storage_pools_async (null);
             var pool = Boxes.get_storage_pool (connection);
             if (pool != null) {
+                pool.set_autostart (true); // Ensure autostart is enabled
                 if (pool.get_info ().state == GVir.StoragePoolState.INACTIVE)
                     yield pool.start_async (0, null);
                 // If default storage pool exists, we should refresh it already
diff --git a/src/vm-creator.vala b/src/vm-creator.vala
index 77709de..9969196 100644
--- a/src/vm-creator.vala
+++ b/src/vm-creator.vala
@@ -218,6 +218,7 @@ private class Boxes.VMCreator {
             yield pool.start_async (0, null);
             yield pool.refresh_async (null);
         }
+        pool.set_autostart (true);
 
         return pool;
     }


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