Skip to content

Commit 98413b2

Browse files
committed
xapi_globs: Add vhd_legacy_blocks_format feature flag
This allows to switch on the more efficient interval format later. (QCOW always uses the new format) Signed-off-by: Andrii Sultanov <andriy.sultanov@vates.tech>
1 parent c07b96f commit 98413b2

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

ocaml/xapi/xapi_globs.ml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1149,6 +1149,10 @@ let validate_reusable_pool_session = ref false
11491149
let vm_sysprep_enabled = ref true
11501150
(* enable VM.sysprep API *)
11511151

1152+
let vhd_legacy_blocks_format = ref true
1153+
(* If false, uses an interval-based JSON blocks format for VHD instead of the
1154+
legacy format which includes all the allocated clusters *)
1155+
11521156
let vm_sysprep_wait = ref 5.0 (* seconds *)
11531157

11541158
let test_open = ref 0
@@ -1876,6 +1880,12 @@ let other_options =
18761880
, (fun () -> string_of_float !vm_sysprep_wait)
18771881
, "Time in seconds to wait for VM to recognise inserted CD"
18781882
)
1883+
; ( "vhd-legacy-blocks-format"
1884+
, Arg.Set vhd_legacy_blocks_format
1885+
, (fun () -> string_of_bool !vhd_legacy_blocks_format)
1886+
, "Choose whether legacy/sparse block format will be used for determining \
1887+
allocated VHD clusters"
1888+
)
18791889
; ( "proxy_poll_period_timeout"
18801890
, Arg.Set_float proxy_poll_period_timeout
18811891
, (fun () -> string_of_float !proxy_poll_period_timeout)

0 commit comments

Comments
 (0)