| ListPCI
| Trigger
| Device
+ | CDEject
+ | CDInsertFile
+ | CDInsertReal
| ReadConfig
| Help
(ListDisk, mk_desc_nb "disk_list");
(ListNic, mk_desc_nb "nic_list");
(ListPCI, mk_desc_nb "pci_list");
+
+ (CDEject, mk_desc_args "cd_eject" [ "virtpath", R, ArgString; ]);
+ (CDInsertFile,mk_desc_args "cd_insert_file" [ "virtpath", R, ArgString;
+ "physpath", R, ArgString ]);
+ (CDInsertReal,mk_desc_args "cd_insert_real" [ "virtpath", R, ArgString;
+ "physpath", R, ArgString ]);
+
+
(ReadConfig, mk_desc_args_nb "read_config" [ "path", O, ArgString ]);
(Help, mk_desc_nb "help");
(*
~protocol state.vm_domid in
()
+let cd_eject ~xs state virtpath =
+ Device.Vbd.media_eject ~xs ~virtpath state.vm_domid;
+ Xenvmlib.Ok
+
+let cd_insert_file ~xs state virtpath physpath =
+ Device.Vbd.media_insert ~xs ~virtpath ~physpath ~phystype:Device.Vbd.File state.vm_domid;
+ Xenvmlib.Ok
+
+let cd_insert_real ~xs state virtpath physpath =
+ Device.Vbd.media_insert ~xs ~virtpath ~physpath ~phystype:Device.Vbd.Phys state.vm_domid;
+ Xenvmlib.Ok
+
let add_nic_to_vm ~xs state nic =
let netty = Netman.Bridge nic.nic_bridge in
let (_: Device_common.device) =
let cmd = Tasks.args_get_string args "cmd" in
let extra = Tasks.args_get_liststring args "extra" in
with_xcs (fun xc xs -> Vmact.device_cmd xc xs state ty cmd extra)
+ | Tasks.CDEject ->
+ let virtpath = Tasks.args_get_string args "virtpath" in
+ with_xcs (fun xc xs -> Vmact.cd_eject xs state virtpath)
+ | Tasks.CDInsertReal ->
+ let virtpath = Tasks.args_get_string args "virtpath" in
+ let physpath = Tasks.args_get_string args "physpath" in
+ with_xcs (fun xc xs -> Vmact.cd_insert_real xs state virtpath physpath)
+ | Tasks.CDInsertFile ->
+ let virtpath = Tasks.args_get_string args "virtpath" in
+ let physpath = Tasks.args_get_string args "physpath" in
+ with_xcs (fun xc xs -> Vmact.cd_insert_file xs state virtpath physpath)
| Tasks.ReadConfig ->
let path =
try Some (Tasks.args_get_string args "path")