Skip to content

Commit 3802cc3

Browse files
author
Jon Ludlam
committed
Allow the CLI command vdi-create to create sharable VDIs
Signed-off-by: Jon Ludlam <[email protected]>
1 parent eab6f17 commit 3802cc3

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

ocaml/xapi/cli_frontend.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1614,7 +1614,7 @@ there are two or more empty CD devices, please use the command 'vbd-insert' and
16141614
"vdi-create",
16151615
{
16161616
reqd=["sr-uuid";"name-label";"type";"virtual-size"];
1617-
optn=["sm-config:"];
1617+
optn=["sm-config:";"sharable"];
16181618
help="Create a VDI. Type is 'system' 'user' 'suspend' or 'crashdump'.";
16191619
implementation=No_fd Cli_operations.vdi_create;
16201620
flags=[];

ocaml/xapi/cli_operations.ml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -998,11 +998,11 @@ let vdi_create printer rpc session_id params =
998998
let str_type = List.assoc "type" params in
999999
let virtual_size = Record_util.bytes_of_string "virtual-size" (List.assoc "virtual-size" params) in
10001000
let ty = vdi_type_of_string str_type in
1001-
1001+
let sharable = get_bool_param params "sharable" in
10021002
let sm_config=read_map_params "sm-config" params in
10031003

10041004
let vdi = Client.VDI.create ~rpc ~session_id ~name_label ~name_description:"" ~sR ~virtual_size ~_type:ty
1005-
~sharable:false ~read_only:false ~xenstore_data:[] ~other_config:[] ~sm_config ~tags:[] in
1005+
~sharable ~read_only:false ~xenstore_data:[] ~other_config:[] ~sm_config ~tags:[] in
10061006
let vdi_uuid = Client.VDI.get_uuid rpc session_id vdi in
10071007
printer (Cli_printer.PList [vdi_uuid])
10081008

0 commit comments

Comments
 (0)