使用 webvirtmgr 管理虚拟机

安装 webvirtmgr

Github 地址:https://github.com/retspen/webvirtmgr

1 配置 aliyun 仓库

curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
curl -o /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo

2 安装依赖包

yum -y install git gcc python-devel python-pip libvirt-python libxml2-python python-websockify supervisor

3 安装 python 依赖库和 Django 环境

pip install numpy -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com

PS: 这里会报错提示使用 Python >= 3.7,但是 Python3 执行后面的 manage.py 脚本时,又会报错。忽略此报错,就使用 Python2 也可以正常使用。

git clone git://github.com/retspen/webvirtmgr.git
cd webvirtmgr
pip install -r requirements.txt -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com

4 初始化数据脚本

[root@webvirtmgr webvirtmgr]# ./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: admin@admin.com
Password: 
Password (again): 
Superuser created successfully.
Installing custom SQL ...
Installing indexes ...
Installed 6 object(s) from 1 fixture(s)
评论 6
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值