index.rst 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. :py:mod:`qubes.vm` -- Different Virtual Machine types
  2. =====================================================
  3. Qubes is composed of several virtual machines that are interconnected in
  4. several ways. From now on they will be called „domains”, as they may not
  5. actually be true virtual machines -- we plan to support LXC containers for
  6. example. Because of Xen-only legacy of Qubes code, it is custom to refer to them
  7. in long/plural as ``domains`` and in short/singular as ``vm``.
  8. Domain object
  9. -------------
  10. There are couple of programming objects that refer to domain. The main is the
  11. instance of :py:class:`qubes.vm.QubesVM`. This is the main „porcelain” object,
  12. which carries other objects and supplies convenience methods like
  13. :py:meth:`qubes.vm.qubesvm.QubesVM.start`. This class is actually divided in
  14. two, the :py:class:`qubes.vm.qubesvm.QubesVM` cares about Qubes-specific
  15. actions, that are more or less directly related to security model. It is
  16. intended to be easily auditable by non-expert programmers (ie. we don't use
  17. Python's magic there). The second class is its parent,
  18. :py:class:`qubes.vm.BaseVM`, which is concerned about technicalities like XML
  19. serialising/deserialising. It is of less concern to threat model auditors, but
  20. still relevant to overall security of the Qubes OS. It is written for
  21. programmers by programmers.
  22. The second object is the XML node that refers to the domain. It can be accessed
  23. as :py:attr:`Qubes.vm.BaseVM.xml` attribute of the domain object. The third one
  24. is :py:attr:`Qubes.vm.qubesvm.QubesVM.libvirt_domain` object for directly
  25. interacting with libvirt. Those objects are intended to be used from core and/or
  26. plugins, but not directly by user or from qvm-tools. They are however public, so
  27. there are no restrictions.
  28. Domain classes
  29. --------------
  30. There are several different types of VM, because not every Qubes domain is equal
  31. -- some of them perform specific functions, like NetVM; others have different
  32. life cycle, like DisposableVM. For that, different domains have different Python
  33. classes. They are all defined in this package, generally one class per module,
  34. but some modules contain private globals that serve this particular class.
  35. Package contents
  36. ----------------
  37. Main public classes
  38. ^^^^^^^^^^^^^^^^^^^
  39. .. autoclass:: qubes.vm.BaseVM
  40. :members:
  41. :show-inheritance:
  42. Helper classes and functions
  43. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  44. .. autoclass:: qubes.features.Features
  45. :members:
  46. :show-inheritance:
  47. .. autoclass:: qubes.vm.mix.net.NetVMMixin
  48. :members:
  49. :show-inheritance:
  50. Particular VM classes
  51. ^^^^^^^^^^^^^^^^^^^^^
  52. Main types:
  53. .. toctree::
  54. :maxdepth: 1
  55. qubesvm
  56. appvm
  57. templatevm
  58. Special VM types:
  59. .. toctree::
  60. :maxdepth: 1
  61. dispvm
  62. adminvm
  63. .. standalonevm
  64. .. vim: ts=3 sw=3 et