WebVirtMgr采用几乎纯Python开发,其前端是基于Python的Django,后端是基于Libvirt的Python接口,将日常kvm的管理操作变的更加的可视化。
WebVirtMgr特点:
操作简单,易于使用
通过libvirt的API接口对kvm进行管理
提供对虚拟机生命周期管理
WebVirtMgr 功能
宿主机管理支持以下功能
CPU利用率
内存利用率
网络资源池管理
存储资源池管理
虚拟机镜像
虚拟机克隆
快照管理
日志管理
虚机迁移
虚拟机管理支持以下功能
CPU利用率
内存利用率
光盘管理
关/开/暂停虚拟机
安装虚拟机
VNC console连接
创建快照
系统环境:
CentOS Linux release 7.2.1511 (Core)
1、yum源的配置及安装所需软件包
yum -y install Fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-8.noarch.rpm
yum -y install Git Python-pip libvirt-python libxml2-python python-websockify supervisor nginx
yum -y install gcc python-devel
pip install numpy
2、下载webvirtmgr.git软件
mkdir /application/
cd /application/
git clone git://github.com/retspen/webvirtmgr.git
git clone https://github.com/retspen/webvirtmgr.git
3、数据库安装
cd /application/
wget
cd sqlite-3.5.6/
./configure --disable-tcl
make
make install
4、webvirtmgr安装
cd /application/webvirtmgr
pip install -r requirements.txt
-----------------------------------------------------------------------------------------------------
./manage.py syncdb
WARNING:root:No local_settings file found.
Creating tables ...
Creating table auth_permission
Creating table auth_group_permissions
Creating table auth_group
Creating table auth_user_groups
Creating table auth_user_user_permissions
Creating table auth_user
Creating table django_content_type
Creating table django_session
Creating table django_site
Creating table servers_compute
Creating table instance_instance
Creating table create_flavor
You just installed Django's auth system, which means you don't have any superusers defined.
Would you like to create one now? (yes/no): yes
Username (leave blank to use 'root'): admin
Email address: 10880347@qq.com
Password: 123456
Password (again): 123456
Superuser created successfully.
Installing custom SQL ...
Installing indexes ...
Installed 6 object(s) from 1 fixture(s)
--------------------------------------------------------------------------------------------------------
./manage.py collectstatic
WARNING:root:No local_settings file found.
You have requested to collect static files at the destination
location as specified in your settings.
This will overwrite existing files!
Are you sure you want to do this?
Type 'yes' to continue, or 'no' to cancel: yes
Copying '/application/webvirtmgr/webvirtmgr/static/css/bootstrap-multiselect.css'
Copying '/application/webvirtmgr/webvirtmgr/static/css/bootstrap.min.css'
Copying '/application/webvirtmgr/webvirtmgr/static/css/signin.css'
Copying '/application/webvirtmgr/webvirtmgr/static/css/table-sort.css'
Copying '/application/webvirtmgr/webvirtmgr/static/css/webvirtmgr.css'
Copying '/application/webvirtmgr/webvirtmgr/static/fonts/glyphicons-halflings-regular.eot'
Copying '/application/webvirtmgr/webvirtmgr/static/fonts/glyphicons-halflings-regular.svg'
Copying '/application/webvirtmgr/webvirtmgr/static/fonts/glyphicons-halflings-regular.ttf'
Copying '/application/webvirtmgr/webvirtmgr/static/fonts/glyphicons-halflings-regular.woff'
Copying '/application/webvirtmgr/webvirtmgr/static/img/asc.gif'
Copying '/application/webvirtmgr/webvirtmgr/static/img/bg.gif'
Copying '/application/webvirtmgr/webvirtmgr/static/img/desc.gif'
Copying '/application/webvirtmgr/webvirtmgr/static/img/favicon.ico'
Copying '/application/webvirtmgr/webvirtmgr/static/js/Chart.min.js'
Copying '/application/webvirtmgr/webvirtmgr/static/js/bootstrap-multiselect.js'
Copying '/application/webvirtmgr/webvirtmgr/static/js/bootstrap.min.js'
Copying '/application/webvirtmgr/webvirtmgr/static/js/infrastructure.js'
Copying '/application/webvirtmgr/webvirtmgr/static/js/jQuery-1.10.2.js'
Copying '/application/webvirtmgr/webvirtmgr/static/js/jquery-migrate-1.2.1.js'
Copying '/application/webvirtmgr/webvirtmgr/static/js/jquery.tablesorter.js'
Copying '/application/webvirtmgr/webvirtmgr/static/js/novnc/Orbitron700.ttf'
Copying '/application/webvirtmgr/webvirtmgr/static/js/novnc/Orbitron700.woff'
Copying '/application/webvirtmgr/webvirtmgr/static/js/novnc/base.css'
Copying '/application/webvirtmgr/webvirtmgr/static/js/novnc/base64.js'
Copying '/application/webvirtmgr/webvirtmgr/static/js/novnc/black.css'
Copying '/application/webvirtmgr/webvirtmgr/static/js/novnc/blue.css'
Copying '/application/webvirtmgr/webvirtmgr/static/js/novnc/des.js'
Copying '/application/webvirtmgr/webvirtmgr/static/js/novnc/display.js'
Copying '/application/webvirtmgr/webvirtmgr/static/js/novnc/input.js'
Copying '/application/webvirtmgr/webvirtmgr/static/js/novnc/jsunzip.js'
Copying '/application/webvirtmgr/webvirtmgr/static/js/novnc/logo.js'
Copying '/application/webvirtmgr/webvirtmgr/static/js/novnc/playback.js'
Copying '/application/webvirtmgr/webvirtmgr/static/js/novnc/rfb.js'
Copying '/application/webvirtmgr/webvirtmgr/static/js/novnc/ui.js'
Copying '/application/webvirtmgr/webvirtmgr/static/js/novnc/util.js'
Copying '/application/webvirtmgr/webvirtmgr/static/js/novnc/websock.js'
Copying '/application/webvirtmgr/webvirtmgr/static/js/novnc/webutil.js'
Copying '/application/webvirtmgr/webvirtmgr/static/js/novnc/chrome-app/tcp-client.js'
Copying '/application/webvirtmgr/webvirtmgr/static/js/novnc/web-socket-js/README.txt'
Copying '/application/webvirtmgr/webvirtmgr/static/js/novnc/web-socket-js/WebSocketMain.swf'
Copying '/application/webvirtmgr/webvirtmgr/static/js/novnc/web-socket-js/swfobject.js'
Copying '/application/webvirtmgr/webvirtmgr/static/js/novnc/web-socket-js/web_socket.js'
Copying '/application/webvirtmgr/webvirtmgr/static/js/spice-HTML5/atKeynames.js'
Copying '/application/webvirtmgr/webvirtmgr/static/js/spice-Html5/bitmap.js'
Copying '/application/webvirtmgr/webvirtmgr/static/js/spice-html5/cursor.js'
Copying '/application/webvirtmgr/webvirtmgr/static/js/spice-html5/display.js'
Copying '/application/webvirtmgr/webvirtmgr/static/js/spice-html5/enums.js'
Copying '/application/webvirtmgr/webvirtmgr/static/js/spice-html5/filexfer.js'
Copying '/application/webvirtmgr/webvirtmgr/static/js/spice-html5/inputs.js'
Copying '/application/webvirtmgr/webvirtmgr/static/js/spice-html5/jsbn.js'
Copying '/application/webvirtmgr/webvirtmgr/static/js/spice-html5/lz.js'
Copying '/application/webvirtmgr/webvirtmgr/static/js/spice-html5/main.js'
Copying '/application/webvirtmgr/webvirtmgr/static/js/spice-html5/playback.js'
Copying '/application/webvirtmgr/webvirtmgr/static/js/spice-html5/png.js'
Copying '/application/webvirtmgr/webvirtmgr/static/js/spice-html5/prng4.js'
Copying '/application/webvirtmgr/webvirtmgr/static/js/spice-html5/quic.js'
Copying '/application/webvirtmgr/webvirtmgr/static/js/spice-html5/resize.js'
Copying '/application/webvirtmgr/webvirtmgr/static/js/spice-html5/rng.js'
Copying '/application/webvirtmgr/webvirtmgr/static/js/spice-html5/rsa.js'
Copying '/application/webvirtmgr/webvirtmgr/static/js/spice-html5/sha1.js'
Copying '/application/webvirtmgr/webvirtmgr/static/js/spice-html5/simulatecursor.js'
Copying '/application/webvirtmgr/webvirtmgr/static/js/spice-html5/spicearraybuffer.js'
Copying '/application/webvirtmgr/webvirtmgr/static/js/spice-html5/spiceconn.js'
Copying '/application/webvirtmgr/webvirtmgr/static/js/spice-html5/spicedataview.js'
Copying '/application/webvirtmgr/webvirtmgr/static/js/spice-html5/spicemsg.js'
Copying '/application/webvirtmgr/webvirtmgr/static/js/spice-html5/spicetype.js'
Copying '/application/webvirtmgr/webvirtmgr/static/js/spice-html5/ticket.js'
Copying '/application/webvirtmgr/webvirtmgr/static/js/spice-html5/utils.js'
Copying '/application/webvirtmgr/webvirtmgr/static/js/spice-html5/webm.js'
Copying '/application/webvirtmgr/webvirtmgr/static/js/spice-html5/wire.js'
Copying '/application/webvirtmgr/webvirtmgr/static/js/spice-html5/thirdparty/jsbn.js'
Copying '/application/webvirtmgr/webvirtmgr/static/js/spice-html5/thirdparty/prng4.js'
Copying '/application/webvirtmgr/webvirtmgr/static/js/spice-html5/thirdparty/rng.js'
Copying '/application/webvirtmgr/webvirtmgr/static/js/spice-html5/thirdparty/rsa.js'
Copying '/application/webvirtmgr/webvirtmgr/static/js/spice-html5/thirdparty/sha1.js'