Utility to manage KVM (Kernel Virtual Machine) instances as a pool for VNC. https://devel.mephi.ru/dyokunev/kvm-pool

Dmitry Yu Okunev 7c8f92e254 Adapted for new MEPhI requirements лет назад: 8
man 7c8f92e254 Adapted for new MEPhI requirements лет назад: 8
.gitignore f36e647706 Empty project лет назад: 8
GNUmakefile 49fa7d29cd Continued initial code лет назад: 8
LICENSE f59729767a Fixed: clsync -> kvm-pool лет назад: 8
README.md 7c8f92e254 Adapted for new MEPhI requirements лет назад: 8
common.h 7c8f92e254 Adapted for new MEPhI requirements лет назад: 8
ctx.h 7c8f92e254 Adapted for new MEPhI requirements лет назад: 8
error.c f59729767a Fixed: clsync -> kvm-pool лет назад: 8
error.h f59729767a Fixed: clsync -> kvm-pool лет назад: 8
kvm-pool.c 7c8f92e254 Adapted for new MEPhI requirements лет назад: 8
kvm-pool.h 49fa7d29cd Continued initial code лет назад: 8
macros.h 4d1cafb3bf Added the vnc passthrougher лет назад: 8
main.c c99fda68f1 Added vms cleanup лет назад: 8
main.h f59729767a Fixed: clsync -> kvm-pool лет назад: 8
malloc.c f59729767a Fixed: clsync -> kvm-pool лет назад: 8
malloc.h f59729767a Fixed: clsync -> kvm-pool лет назад: 8
pthreadex.c f59729767a Fixed: clsync -> kvm-pool лет назад: 8
pthreadex.h f59729767a Fixed: clsync -> kvm-pool лет назад: 8

README.md

Main repository: https://devel.mephi.ru/dyokunev/kvm-pool

NAME
       kvm-pool - utility to manage KVM (Kernel Virtual Machine) instances as a pool for VNC.

SYNOPSIS
       kvm-pool [ ... ] -- [ kvm-arguments ]

DESCRIPTION
       kvm-pool  creates a pool of virtual machines using KVM, listens specified
       port and proxies connections to instances of the pool.

OPTIONS
       This options can be passed as arguments or to be used in the configuration file.

       To disable numeric option set to zero:
                   =0

       To disable string option (for example path to file) set to empty string:
                   =

       Also  you  can  use  previously  set  values  while  setting  new  options.   Substring
       %option_name%  will  be  substituted  with  previously set value of option option_name.
       (see CONFIGURATION FILE)

       To set kvm-arguments in config file use '--'. An example:
              -- = -net tap -boot n -m 512

       -c, --config-file path
              Sets path to the config file (see CONFIGURATION FILE).

              Default: "". Changing of this options is not implemented, yet.

       -K, --config-group string
              Sets configuration group name (see CONFIGURATION FILE).

              Default: "default". Changing of this options is not implemented, yet.

       -m, --min-vms number
              Minimal number of running virtual machines.

              Default: 0.

       -M, --max-vms number
              Maximal number of running virtual machines.

              Default: 64.

       -s, --min-spare number
              Minimal number of spare (idle) virtual machines.

              Default: 1.

       -S, --max-spare number
              Maximal number of spare (idle) virtual machines.

              Default: 8.

       -r, --kill-vm-on-disconnect [0|1]
              Kill the VM if the client disconnected. It's to prevent getting session of a one
              user by another one.

              Default: 0.

       -m, --multiple-connections [0|1]
              Permit multiple VNC connections to a VM.

              Default: 0.

       -L, --listen host:port
              Which port to listen for incoming VNC connections.

              Default: 0.0.0.0:5900. Changing of this options is not implemented, yet.

CONFIGURATION FILE
       kvm-pool supports configuration file.

       By default kvm-pool tries to read next files (in specified order):
              ~/.kvm-pool.conf
              /etc/kvm-pool/kvm-pool.conf

       This may be overrided with option --config-file.

       kvm-pool  reads only one configuration file. In other words, if option --config-file is
       not set and file ~/.kvm-pool.conf is accessible and parsable, kvm-pool will not try  to
       open  /etc/kvm-pool/kvm-pool.conf.   Command  line  options have precedence over config
       file options.

       Configuration file is parsed with glib's g_key_file_*  API.  That  means,  that  config
       should consits from groups of key-value lines as in the example:
              [default]
              max-vms   = 16
              min-spare = 2

              [laboratory]
              config-group-inherits = default
              --        = -net tap -boot n -m 512
              min-spare = 4

       In  this example there're 2 groups are set - "default" and "laboratory".  And the group
       "laboratory" inherited setup of the group "default" except options "min-spare".

       By default kvm-pool uses group with name "default". The group name can be set by option
       --config-group.

EXAMPLES
       Getting a pool of virtual machines booted using PXE with 512MB RAM:
              kvm-pool -- -net tap -boot n -m 512

AUTHOR
       Dmitry Yu Okunev <dyokunev@ut.mephi.ru> 0x8E30679C

SEE ALSO
       kvm(1)