A simple web interface based on libVirt and nodejs.
This project is still a Work In Progress, it might not work correctly on your side.
Please, create an issue in this case so I can track and fix it.
Thank you.
If you were looking for a PHP
version: https://github.com/Jiab77/libvirt-web.
Images will be added soon.
The installation process is pretty simple and will require only few dependencies.
The web interface should be able to run on desktops and servers.
There is only few dependencies required:
libvirt-bin
(Thevirsh
command should be provided by libVirt)virt-viewer
libguestfs
nodejs
npm
I have dropped the ImageMagick
convert
command from dependencies.
The project has been tested on Pop_OS!, a Linux distribution based on Ubuntu 18.04 LTS.
You should only need to install these packages:
# Install dependencies (desktop)
sudo apt install libvirt-bin virt-viewer libguestfs-tools nodejs npm
# Install dependencies (server)
sudo apt install libvirt-bin libguestfs-tools nodejs npm
# Install nodejs modules
git clone https://github.com/Jiab77/libvirt-web-nodejs.git
cd libvirt-web-nodejs
npm install
I still need to validate the packages list so this might change later.
You can run the web interface by using the embedded web server from nodejs
or using apache
or nginx
.
You can start the server that way:
cd libvirt-web-nodejs
node server.js
To configure the server:
- Define the
LIBVIRT_WEB_HOST
to change the listening address. - Define the
LIBVIRT_WEB_PORT
to change the listening port.
sudo
is not required to run the server. It is required only if you want to run the server on a port below 1024.You can also choose any other ports than 8001.
Then navigate to http://localhost:8001 with your internet browser.
I'm using Chromium but it should work on any other modern browser.
This setup is not tested yet and will be documented later.
Here will be listed missing features / those not working correctly.
- Remote connection on VM's using
virt-viewer
.- Works on local only...
- Connection to remote hypervisor.
- Not implemented yet / not correctly...
- ISO image upload.
- The upload is working but the uploaded file can't be moved to
/var/lib/libvirt/images
... - This is due to access restricted to
sudoers
with filesystem permissions.
- The upload is working but the uploaded file can't be moved to
- Graphics are still missing.
Thanks to the respective developers for their amazing work.
Huge thanks to @baslr for the node-ppm-bin module.
Feel free to contribute by creating pull requests or new issues.
You can reach me on Twitter by using @jiab77.