mirror of
https://github.com/virt-manager/virt-manager.git
synced 2024-12-24 21:34:47 +03:00
diskbackend: If pool not running, start it
Nowadays we depend on the pool existing and running, so better to get an error up front if pool startup will fail
This commit is contained in:
parent
9c4c1e84aa
commit
d6f063d0b8
@ -86,9 +86,9 @@ def check_if_path_managed(conn, path):
|
||||
if not vol:
|
||||
pool = StoragePool.lookup_pool_by_path(conn, os.path.dirname(path))
|
||||
|
||||
# Is pool running?
|
||||
# Ensure pool is running
|
||||
if pool and pool.info()[0] != libvirt.VIR_STORAGE_POOL_RUNNING:
|
||||
pool = None
|
||||
pool.start()
|
||||
|
||||
# Attempt to lookup path as a storage volume
|
||||
if pool and not vol:
|
||||
|
Loading…
Reference in New Issue
Block a user