mirror of
https://github.com/virt-manager/virt-manager.git
synced 2025-03-10 12:58:27 +03:00
cli: Fix pool=default when path belongs to another pool (bz 1692489)
Using 'virt-install --disk size=X' implicitly uses pool=default. If a pool named 'default' exists we use that; if not, and a pool using the default path exists under a different name, we attempt to use that as well, and if that doesn't exist, we create pool=default The second case is broken, so if there's no pool=default and eg. pool=FOO points to /var/lib/libvirt/images, we still attempt to look up pool=default which understandably fails https://bugzilla.redhat.com/show_bug.cgi?id=1692489
This commit is contained in:
parent
3be238b03e
commit
a0ca387aad
@ -2340,7 +2340,9 @@ class ParserDisk(VirtCLIParser):
|
||||
poolobj = None
|
||||
if poolname:
|
||||
if poolname == "default":
|
||||
StoragePool.build_default_pool(self.guest.conn)
|
||||
poolxml = StoragePool.build_default_pool(self.guest.conn)
|
||||
if poolxml:
|
||||
poolname = poolxml.name
|
||||
poolobj = self.guest.conn.storagePoolLookupByName(poolname)
|
||||
|
||||
if volname:
|
||||
|
Loading…
x
Reference in New Issue
Block a user