Skip to content

luxiaok/kvman

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Kvm Man

Kvman = Kvm Man = Kernel-based Virtual Machine Manager

Version: v1.0.0-Dev

Kvm-Man

Dependency Components

Based environments

  • CentOS 7.8 x86_64

  • Python 2.7.xx

Install Kvm requirements

yum update -y
yum install -y centos-release-qemu-ev
yum install -y qemu-kvm-ev qemu-kvm-common-ev qemu-img-ev qemu-kvm-tools-ev libvirt libvirt-python virt-install

Python requirements

pip install tornado==5.1.1 supervisor==3.3.5 numpy==1.16.6 Pillow=6.2.2 simplejson Jinja2 redis

Deploy Redis Server

See https://redis.io/

Configure for Kvman

  • Copy config/settings-sample.py to config/settings.py

  • Change configurations for redis in settings.py, such as host port password

Run Kvman

python run.py [--port=8081]

Visit http://IP:8081

Run Console Server

python vendor/console.py --token-plugin console.Token 6080

Configure for Supervisor

[program:kvman]
command=/usr/bin/python2.7 run.py --port=8080 2>&1 >> /tmp/kvman.log
autorestart=true
autostart=true
directory=/var/www/kvman
redirect_stderr=true
stdout_logfile=/tmp/kvman.log

[program:kvman_console]
command=/usr/bin/python2.7 vendor/console.py --token-plugin console.Token 6080
autorestart=true
autostart=true
directory=/var/www/kvman
redirect_stderr=true
stdout_logfile=/tmp/kvman_console.log

FAQ

How to config for qemu+ssh?

ssh-keygen
ssh-copy-id kvm_server_hostname

Test:

virsh -c qemu+ssh://Username@KvmServerAddress:SSH_Port/system

How to save data for redis?

redis-cli -h redis_host -p redis_port save

Related Links

License

This project is under the GPLv3 License. See the LICENSE file for the full license text.