diff --git a/answerfile.py b/answerfile.py index 441befd4..26b46a5d 100644 --- a/answerfile.py +++ b/answerfile.py @@ -347,7 +347,7 @@ def parseDisks(self): if SR_TYPE_LARGE_BLOCK and len(large_block_disks) > 0: default_sr_type = SR_TYPE_LARGE_BLOCK else: - default_sr_type = SR_TYPE_LVM + default_sr_type = SR_TYPE_EXT sr_type = getMapAttribute(self.top_node, ['sr-type', 'srtype'], diff --git a/doc/answerfile.txt b/doc/answerfile.txt index e0e1fd7b..41fed16d 100644 --- a/doc/answerfile.txt +++ b/doc/answerfile.txt @@ -318,10 +318,14 @@ Format of 'source' and 'driver-source' Local SR type. - Default: lvm if the disks included in local SR storage all have 512 byte + Default: ext if the disks included in local SR storage all have 512 byte logical blocks, otherwise (when available) the SR type from the large-block-capable-sr-type feature + Note that while it reflects the default choice in the text UI, + this differs from XenServer and from XCP-ng releases lower than + 8.3, where the default was "lvm". + Upgrade Elements ---------------- diff --git a/tui/installer/screens.py b/tui/installer/screens.py index aa09d6e7..33149cc8 100644 --- a/tui/installer/screens.py +++ b/tui/installer/screens.py @@ -830,13 +830,14 @@ def get_sr_type(answers): for disk in guest_disks) if not need_large_block_sr_type or not constants.SR_TYPE_LARGE_BLOCK: - srtype = answers.get('sr-type', constants.SR_TYPE_LVM) - txt = "Enable thin provisioning" - if len(BRAND_VDI) > 0: - txt += " (Optimized storage for %s)" % BRAND_VDI - tb = Checkbox(txt, srtype == constants.SR_TYPE_EXT and 1 or 0) - content = tb - get_type = lambda: tb.selected() and constants.SR_TYPE_EXT or constants.SR_TYPE_LVM + srtype = answers.get('sr-type', constants.SR_TYPE_EXT) + rb = RadioBar(tui.screen, (("EXT: file based. Thin provisioning.", + constants.SR_TYPE_EXT, srtype == constants.SR_TYPE_EXT), + ("LVM: block based. Thick provisioning.", + constants.SR_TYPE_LVM, srtype == constants.SR_TYPE_LVM), + )) + content = rb + get_type = lambda: rb.getSelection() buttons = ButtonBar(tui.screen, [('Ok', 'ok'), ('Back', 'back')]) else: content = TextboxReflowed(40,