`sig
type 'rw t
type state =
InfoNoState
| InfoRunning
| InfoBlocked
| InfoPaused
| InfoShutdown
| InfoShutoff
| InfoCrashed
type info = {
state : Libvirt.Domain.state;
max_mem : int64;
memory : int64;
nr_virt_cpu : int;
cpu_time : int64;
}
type vcpu_state = VcpuOffline | VcpuRunning | VcpuBlocked
type vcpu_info = {
number : int;
vcpu_state : Libvirt.Domain.vcpu_state;
vcpu_time : int64;
cpu : int;
}
type sched_param = string * Libvirt.Domain.sched_param_value
and sched_param_value =
SchedFieldInt32 of int32
| SchedFieldUInt32 of int32
| SchedFieldInt64 of int64
| SchedFieldUInt64 of int64
| SchedFieldFloat of float
| SchedFieldBool of bool
type typed_param = string * Libvirt.Domain.typed_param_value
and typed_param_value =
TypedFieldInt32 of int32
| TypedFieldUInt32 of int32
| TypedFieldInt64 of int64
| TypedFieldUInt64 of int64
| TypedFieldFloat of float
| TypedFieldBool of bool
| TypedFieldString of string
type migrate_flag = Live
type memory_flag = Virtual
type list_flag = ListActive | ListInactive | ListAll
type block_stats = {
rd_req : int64;
rd_bytes : int64;
wr_req : int64;
wr_bytes : int64;
errs : int64;
}
type interface_stats = {
rx_bytes : int64;
rx_packets : int64;
rx_errs : int64;
rx_drop : int64;
tx_bytes : int64;
tx_packets : int64;
tx_errs : int64;
tx_drop : int64;
}
val max_peek : [> `R ] Libvirt.Domain.t -> int
val create_linux :
[> `W ] Libvirt.Connect.t -> Libvirt.xml -> Libvirt.rw Libvirt.Domain.t
val lookup_by_id : 'a Libvirt.Connect.t -> int -> 'a Libvirt.Domain.t
val lookup_by_uuid :
'a Libvirt.Connect.t -> Libvirt.uuid -> 'a Libvirt.Domain.t
val lookup_by_uuid_string :
'a Libvirt.Connect.t -> string -> 'a Libvirt.Domain.t
val lookup_by_name : 'a Libvirt.Connect.t -> string -> 'a Libvirt.Domain.t
val destroy : [> `W ] Libvirt.Domain.t -> unit
val free : [> `R ] Libvirt.Domain.t -> unit
val suspend : [> `W ] Libvirt.Domain.t -> unit
val resume : [> `W ] Libvirt.Domain.t -> unit
val save : [> `W ] Libvirt.Domain.t -> Libvirt.filename -> unit
val restore : [> `W ] Libvirt.Connect.t -> Libvirt.filename -> unit
val core_dump : [> `W ] Libvirt.Domain.t -> Libvirt.filename -> unit
val shutdown : [> `W ] Libvirt.Domain.t -> unit
val reboot : [> `W ] Libvirt.Domain.t -> unit
val get_name : [> `R ] Libvirt.Domain.t -> string
val get_uuid : [> `R ] Libvirt.Domain.t -> Libvirt.uuid
val get_uuid_string : [> `R ] Libvirt.Domain.t -> string
val get_id : [> `R ] Libvirt.Domain.t -> int
val get_os_type : [> `R ] Libvirt.Domain.t -> string
val get_max_memory : [> `R ] Libvirt.Domain.t -> int64
val set_max_memory : [> `W ] Libvirt.Domain.t -> int64 -> unit
val set_memory : [> `W ] Libvirt.Domain.t -> int64 -> unit
val get_info : [> `R ] Libvirt.Domain.t -> Libvirt.Domain.info
val get_xml_desc : [> `R ] Libvirt.Domain.t -> Libvirt.xml
val get_scheduler_type : [> `R ] Libvirt.Domain.t -> string * int
val get_scheduler_parameters :
[> `R ] Libvirt.Domain.t -> int -> Libvirt.Domain.sched_param array
val set_scheduler_parameters :
[> `W ] Libvirt.Domain.t -> Libvirt.Domain.sched_param array -> unit
val define_xml :
[> `W ] Libvirt.Connect.t -> Libvirt.xml -> Libvirt.rw Libvirt.Domain.t
val undefine : [> `W ] Libvirt.Domain.t -> unit
val create : [> `W ] Libvirt.Domain.t -> unit
val get_autostart : [> `R ] Libvirt.Domain.t -> bool
val set_autostart : [> `W ] Libvirt.Domain.t -> bool -> unit
val set_vcpus : [> `W ] Libvirt.Domain.t -> int -> unit
val pin_vcpu : [> `W ] Libvirt.Domain.t -> int -> string -> unit
val get_vcpus :
[> `R ] Libvirt.Domain.t ->
int -> int -> int * Libvirt.Domain.vcpu_info array * string
val get_cpu_stats :
[> `R ] Libvirt.Domain.t -> Libvirt.Domain.typed_param list array
val get_max_vcpus : [> `R ] Libvirt.Domain.t -> int
val attach_device : [> `W ] Libvirt.Domain.t -> Libvirt.xml -> unit
val detach_device : [> `W ] Libvirt.Domain.t -> Libvirt.xml -> unit
val migrate :
[> `W ] Libvirt.Domain.t ->
[> `W ] Libvirt.Connect.t ->
Libvirt.Domain.migrate_flag list ->
?dname:string ->
?uri:string -> ?bandwidth:int -> unit -> Libvirt.rw Libvirt.Domain.t
val block_stats :
[> `R ] Libvirt.Domain.t -> string -> Libvirt.Domain.block_stats
val interface_stats :
[> `R ] Libvirt.Domain.t -> string -> Libvirt.Domain.interface_stats
val block_peek :
[> `W ] Libvirt.Domain.t ->
string -> int64 -> int -> string -> int -> unit
val memory_peek :
[> `W ] Libvirt.Domain.t ->
Libvirt.Domain.memory_flag list -> int64 -> int -> string -> int -> unit
external const : [> `R ] Libvirt.Domain.t -> Libvirt.ro Libvirt.Domain.t
= "%identity"
val get_domains :
([> `R ] as 'a) Libvirt.Connect.t ->
Libvirt.Domain.list_flag list -> 'a Libvirt.Domain.t list
val get_domains_and_infos :
([> `R ] as 'a) Libvirt.Connect.t ->
Libvirt.Domain.list_flag list ->
('a Libvirt.Domain.t * Libvirt.Domain.info) list
end`