virt-manager/virtinst-fix-storage-pool-lookup.patch
2015-08-12 22:07:31 +00:00

26 lines
1003 B
Diff

References: bsc#941464
virt-convert fails when the storage pool is already present but
is not called 'default'.
If the 'default' pool has been removed but another pool uses the
default location of /var/lib/libvirt/images virt-convert will fail
to find the pool and attempt to create another one with the same
path. This causes the conversion to fail.
Index: virt-manager-1.2.1/virtinst/storage.py
===================================================================
--- virt-manager-1.2.1.orig/virtinst/storage.py
+++ virt-manager-1.2.1/virtinst/storage.py
@@ -209,10 +209,11 @@ class StoragePool(_StorageObject):
try:
pool = conn.storagePoolLookupByName(name)
except libvirt.libvirtError:
+ pool = StoragePool.lookup_pool_by_path(conn, path)
pass
if pool:
- return
+ return StoragePool(conn, parsexml=pool.XMLDesc(0))
try:
logging.debug("Attempting to build default pool with target '%s'",