[Kimchi-devel] [PATCH] Set default storage pool to autostart and make persistent

Christy Perez christy at linux.vnet.ibm.com
Tue Apr 29 16:56:06 UTC 2014


The default storage pool wasn't set to autostart, and wasn't
persistent. If a user wants to continue to use any VMs they
have created in kimchi (maybe only for troubleshooting) but
kimchi isn't active, the default pool may not be active.

Signed-off-by: Christy Perez <christy at linux.vnet.ibm.com>
---
 src/kimchi/model/model.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/kimchi/model/model.py b/src/kimchi/model/model.py
index a7d843e..a766ca5 100644
--- a/src/kimchi/model/model.py
+++ b/src/kimchi/model/model.py
@@ -71,7 +71,8 @@ class Model(BaseModel):
             pool = conn.storagePoolLookupByName("default")
         except libvirt.libvirtError:
             try:
-                pool = conn.storagePoolCreateXML(xml, 0)
+                pool = conn.storagePoolDefineXML(xml, 0)
+                pool.setAutostart(1)
             except libvirt.libvirtError, e:
                 cherrypy.log.error("Fatal: Cannot create default pool because "
                                    "of %s, exit kimchid" % e.message,
-- 
1.9.0




More information about the Kimchi-devel mailing list