mirror of
https://github.com/virt-manager/virt-manager.git
synced 2025-02-25 18:55:27 -06:00
createvol: Don't default to sparse LVM
Sparse LVM volumes don't autogrow, which makes them not as useful for virt-manager target users. Don't do it by default
This commit is contained in:
parent
46a3d2c57f
commit
507640ea85
@ -135,9 +135,14 @@ class vmmCreateVolume(vmmGObjectUI):
|
|||||||
else:
|
else:
|
||||||
self.widget("vol-format").set_sensitive(False)
|
self.widget("vol-format").set_sensitive(False)
|
||||||
|
|
||||||
|
alloc = DEFAULT_ALLOC
|
||||||
|
if self.parent_pool.get_type() == "logical":
|
||||||
|
# Sparse LVM volumes don't auto grow, so alloc=0 is useless
|
||||||
|
alloc = DEFAULT_CAP
|
||||||
|
|
||||||
self.widget("vol-allocation").set_range(0,
|
self.widget("vol-allocation").set_range(0,
|
||||||
int(self.parent_pool.get_available() / 1024 / 1024))
|
int(self.parent_pool.get_available() / 1024 / 1024))
|
||||||
self.widget("vol-allocation").set_value(DEFAULT_ALLOC)
|
self.widget("vol-allocation").set_value(alloc)
|
||||||
self.widget("vol-capacity").set_range(1,
|
self.widget("vol-capacity").set_range(1,
|
||||||
int(self.parent_pool.get_available() / 1024 / 1024))
|
int(self.parent_pool.get_available() / 1024 / 1024))
|
||||||
self.widget("vol-capacity").set_value(DEFAULT_CAP)
|
self.widget("vol-capacity").set_value(DEFAULT_CAP)
|
||||||
|
Loading…
Reference in New Issue
Block a user