X-Git-Url: http://git.annexia.org/?p=virt-top.git;a=blobdiff_plain;f=README;h=b5df0f59f81423d7d890c3f3bcdd938881597bd7;hp=02be231d653a1edf727a1a2ecee42e6957159a33;hb=13428961bf2c0c8cf4cf6ef8f63c26b5f68ee23b;hpb=b858ee135c0814f1781cc16802a7b538d5f047a7 diff --git a/README b/README index 02be231..b5df0f5 100644 --- a/README +++ b/README @@ -1,7 +1,7 @@ ocaml-libvirt ---------------------------------------------------------------------- -Copyright (C) 2007 Richard W.M. Jones, Red Hat Inc. +Copyright (C) 2007-2008 Richard W.M. Jones, Red Hat Inc. http://libvirt.org/ocaml/ http://libvirt.org/ @@ -39,7 +39,7 @@ To build virt-top (optional): The other packages are not required, but you will get reduced functionality]. -To build mlvirtmanager (optional): +To build virt-ctrl (optional): GTK2 (from http://gtk.org/) lablgtk2 (from http://wwwfun.kurims.kyoto-u.ac.jp/soft/lsl/lablgtk.html) @@ -76,7 +76,7 @@ Building make doc # Build HTML documentation in html/ subdirectory. -Then have a look at the programs 'mlvirsh.opt' and 'mlvirtmanager.opt'. +Then have a look at the programs 'mlvirsh.opt' and 'virt-ctrl.opt'. Note: If you want to run the programs without first installing, you may need to set your $LD_LIBRARY_PATH environment variable so it @@ -88,9 +88,9 @@ contains the build directory. eg: Windows ---------------------------------------------------------------------- -I have built libvirt (the bindings), examples, mlvirsh and -mlvirtmanager on Windows using the MinGW port of OCaml. It's quite -likely that it will also work under VC++, but I have not tested this. +I have built libvirt (the bindings), examples, mlvirsh and virt-ctrl +on Windows using the MinGW port of OCaml. It's quite likely that it +will also work under VC++, but I have not tested this. You should make sure that your $PATH (environment variable) contains the names of the directories containing all required DLLs, in @@ -103,7 +103,7 @@ particular you will require: libtasn1-*.dll libxdr.dll (from libxdr) libxml2-*.dll (from libxml2) - and, a multitude of DLLs from GTK if you want to run mlvirtmanager + and, a multitude of DLLs from GTK if you want to run virt-ctrl You can use a tool such as Dependency Walker to find/check the locations of dependent libraries. @@ -138,47 +138,20 @@ At the time of writing: % size 15% 13% -mlvirtmanager +virt-ctrl ---------------------------------------------------------------------- -'mlvirtmanager' is a demonstration implementation of virt-manager in -OCaml. It is not feature-complete by any means, but does allow you to -show the running domains and start and stop defined domains. The main -functionality _missing_ is the ability to define new virtual machines, -change the resources allocated to domains, or show the machine -console. +'virt-ctrl' (originally called 'mlvirtmanager') is a reimplementation +of virt-manager in OCaml. It is not feature-complete by any means, +but does allow you to show the running domains and start and stop +defined domains. The main functionality _missing_ is the ability to +define new virtual machines, change the resources allocated to +domains, or show the machine console. Programming ---------------------------------------------------------------------- -The interface is described in 'libvirt.mli'. The main modules are -Libvirt.Connect, Libvirt.Domain and Libvirt.Network, corresponding -respectively to the virConnect*, virDomain*, and virNetwork* -functions. For brevity I usually rename these modules like this: - - module C = Libvirt.Connect - module D = Libvirt.Domain - module N = Libvirt.Network - -To get a connection handle, do: - - let name = "xen:///" - let conn = C.connect ~name () - -To list domains, do: - - let n = C.num_of_domains conn - let ids = C.list_domains conn n - let domains = Array.map (D.lookup_by_id conn) ids - let () = - Array.iter ( - fun dom -> - printf "%5d %s\n" (D.get_id dom) (D.get_name dom) - ) domains - -(See also the program list_domains.ml). - For documentation on these bindings, read libvirt.mli and/or 'make doc' and browse the HTML documentation in the html/ subdirectory. @@ -191,5 +164,6 @@ Subdirectories libvirt/ The OCaml bindings. examples/ Some example programs using the bindings. mlvirsh/ 'mlvirsh' command line tool. -mlvirtmanager/ 'mlvirtmanager' graphical tool. +virt-ctrl/ 'virt-ctrl' graphical tool. virt-top/ 'virt-top' tool. +virt-df/ 'virt-df' tool.