mirror of
https://github.com/virt-manager/virt-manager.git
synced 2025-01-03 01:18:00 +03:00
Support creating sparse volumes on ZFS pools
Closes #487 Signed-off-by: Iain Buclaw <ibuclaw@gdcproject.org>
This commit is contained in:
parent
6710ca6969
commit
78f7797c13
@ -7,7 +7,7 @@
|
|||||||
from gi.repository import Gtk
|
from gi.repository import Gtk
|
||||||
|
|
||||||
from virtinst import log
|
from virtinst import log
|
||||||
from virtinst import StorageVolume
|
from virtinst import StorageVolume, StoragePool
|
||||||
|
|
||||||
from .lib import uiutil
|
from .lib import uiutil
|
||||||
from .asyncjob import vmmAsyncJob
|
from .asyncjob import vmmAsyncJob
|
||||||
@ -180,7 +180,9 @@ class vmmCreateVolume(vmmGObjectUI):
|
|||||||
|
|
||||||
def _can_sparse(self):
|
def _can_sparse(self):
|
||||||
dtype = self._parent_pool.xmlobj.get_disk_type()
|
dtype = self._parent_pool.xmlobj.get_disk_type()
|
||||||
return dtype == StorageVolume.TYPE_FILE
|
ptype = self._parent_pool.xmlobj.type
|
||||||
|
return (dtype == StorageVolume.TYPE_FILE or
|
||||||
|
ptype in [StoragePool.TYPE_ZFS])
|
||||||
|
|
||||||
def _show_sparse(self):
|
def _show_sparse(self):
|
||||||
uiutil.set_grid_row_visible(
|
uiutil.set_grid_row_visible(
|
||||||
|
Loading…
Reference in New Issue
Block a user