- Add support set VNC password (auto or manual) when VM created
- Add support edit VM (only RAM and VCPU)
- Add upload ISO images (Work only if the panel installed on HOST SERVER)
WebVirtMgr is a libvirt-based Web interface for managing virtual machines. It allows you to create and configure new domains, and adjust a domain's resource allocation. A VNC viewer presents a full graphical console to the guest domain. KVM is currently the only hypervisor supported.
The application logic is written in Python & Django. The LIBVIRT Python bindings are used to interacting with the underlying hypervisor.
WebVirtMgr is licensed under the Apache Licence, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.html).
Run:
$ su -c 'yum -y install git python-pip python-virtinst httpd mod_python mod_wsgi python-websockify'
$ su -c 'python-pip install Django==1.4.5'
Run:
$ su -c 'yum -y install http://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm'
$ su -c 'yum -y install git python-pip python-virtinst httpd mod_python mod_wsgi python-websockify'
$ su -c 'python-pip install Django==1.4.5'
Run:
$ sudo apt-get install git python-pip virtinst apache2 libapache2-mod-python libapache2-mod-wsgi python-novnc
$ sudo pip install Django==1.4.5
Run:
$ git clone git://github.com/retspen/webvirtmgr.git
$ cd webvirtmgr
$ ./manage.py syncdb
Or install RPM (CentOS, RHEL, Fedora, Oracle Linux 6)
Enter the user information:
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 (Put: yes)
Username (Leave blank to use 'admin'): admin (Put: your username or login)
E-mail address: username@domain.local (Put: your email)
Password: xxxxxx (Put: your password)
Password (again): xxxxxx (Put: confirm password)
Superuser created successfully.
Add pre-installed flavors:
$ ./manage.py loaddata conf/flavor.json
Run app for test:
$ ./manage.py runserver 0:8000
Enter in your browser:
http://x.x.x.x:8000 (x.x.x.x - your server IP address )
###1. Virtual Host
Add file webvirtmgr.conf in conf.d directory (Ubuntu: "/etc/apache2/conf.d" or RedHat,Fedora,CentOS: "/etc/httpd/conf.d"):
<VirtualHost *:80>
ServerAdmin webmaster@dummy-host.example.com
ServerName dummy-host.example.com
SetHandler python-program
PythonHandler django.core.handlers.modpython
SetEnv DJANGO_SETTINGS_MODULE webvirtmgr.settings
PythonOption django.root /webvirtmgr
PythonDebug On
PythonPath "['/var/www/webvirtmgr'] + sys.path"
ErrorLog ${APACHE_LOG_DIR}/webvirtmgr-error_log
CustomLog ${APACHE_LOG_DIR}/webvirtmgr-access_log common
</VirtualHost>
Copy the folder and change owner (Ubuntu: "www-data:www-data", Fedora, Redhat, CentOS: "apache:apache"):
$ sudo cp -r webvirtmgr /var/www/
$ sudo chown -R www-data:www-data /var/www/webvirtmgr
Reload apache:
$ sudo service apache2 reload
###2. WSGI
Add file webvirtmgr.conf in conf.d directory (Ubuntu: "/etc/apache2/conf.d" or RedHat,Fedora,CentOS: "/etc/httpd/conf.d"):
WSGIScriptAlias / /var/www/webvirtmgr/webvirtmgr/wsgi.py
WSGIPythonPath /var/www/webvirtmgr/
Alias /static /var/www/webvirtmgr/static/
Alias /media /var/www/webvirtmgr/media/
<Directory /var/www/webvirtmgr/webvirtmgr>
<Files wsgi.py>
Order deny,allow
Allow from all
</Files>
</Directory>
Reload apache:
$ sudo service apache2 reload
Run:
$ sudo cp conf/initd/webvirtmgr-novnc-redhat /etc/init.d/webvirtmgr-novnc
$ sudo service webvirtmgr-novnc start
Run:
$ sudo cp conf/initd/webvirtmgr-novnc-ubuntu /etc/init.d/webvirtmgr-novnc
$ sudo service webvirtmgr-novnc start
Install gunicorn:
$ sudo pip install gunicorn
Add line 'gunicorn',
in file settings.py:
INSTALLED_APPS = (
...
'gunicorn',
)
Runit script for webvirtmgr (/etc/sv/webvirtmgr/run):
#!/bin/bash
GUNICORN=/usr/local/bin/gunicorn
ROOT=/var/www/webvirtmgr
PID=/var/run/gunicorn.pid
APP=webvirtmgr.wsgi:application
if [ -f $PID ]; then
rm $PID
fi
cd $ROOT
exec $GUNICORN -c $ROOT/conf/gunicorn.conf.py --pid $PID $APP
And then install and setup nginx.
$ cd /path to/webvirtmgr
$ git pull
Support: support@webvirtmgr.net or GitHub Issues