{"id":23969675,"url":"https://github.com/jiab77/libvirt-web","last_synced_at":"2025-04-13T16:32:31.999Z","repository":{"id":46058800,"uuid":"213258923","full_name":"Jiab77/libvirt-web","owner":"Jiab77","description":"A simple web interface based on libVirt and PHP.","archived":false,"fork":false,"pushed_at":"2025-04-03T00:00:27.000Z","size":1619,"stargazers_count":33,"open_issues_count":2,"forks_count":15,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-03T01:18:41.470Z","etag":null,"topics":["kvm","libvirt","php","qemu","virsh","virt-viewer"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Jiab77.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-10-06T23:22:05.000Z","updated_at":"2025-04-03T00:00:31.000Z","dependencies_parsed_at":"2025-04-03T01:28:53.602Z","dependency_job_id":null,"html_url":"https://github.com/Jiab77/libvirt-web","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jiab77%2Flibvirt-web","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jiab77%2Flibvirt-web/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jiab77%2Flibvirt-web/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jiab77%2Flibvirt-web/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Jiab77","download_url":"https://codeload.github.com/Jiab77/libvirt-web/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248743647,"owners_count":21154712,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["kvm","libvirt","php","qemu","virsh","virt-viewer"],"created_at":"2025-01-07T01:01:12.681Z","updated_at":"2025-04-13T16:32:31.993Z","avatar_url":"https://github.com/Jiab77.png","language":"PHP","readme":"# libVirt Web\n\nA simple web interface based on [libVirt](https://libvirt.org/) and [PHP](https://www.php.net/).\n\n\u003e This project is still a **Work In Progress**; it may not work correctly on your host.\n\u003e\n\u003e Please, create an issue in this case so I can track and fix it.\n\u003e\n\u003e Thank you.\n\n_If you were looking for a `nodejs` version: \u003chttps://github.com/Jiab77/libvirt-web-nodejs\u003e._\n\n## Preview\n\n![image](https://user-images.githubusercontent.com/9881407/66279294-ed9eb480-e8b0-11e9-8382-c6fa65313ee0.png)\n![image](https://user-images.githubusercontent.com/9881407/66279362-4b330100-e8b1-11e9-9b65-b78164269978.png)\n\n## Installation\n\nThe installation process is pretty simple and will require only few dependencies.\n\nThe web interface should be able to run on almost any desktop or server.\n\n## Compatibility\n\nThe code should be compatible with the latest PHP version.\n\n\u003e Feel free to create a new issue in case you find something that is not working anymore after having updated your PHP version.\n\n## Dependencies\n\nThere is only a few dependencies required: __*__\n\n1. `libvirt-bin` (The `virsh` command should be provided by [libVirt](https://libvirt.org/))\n2. `virt-viewer`\n3. `virt-install`\n4. `libguestfs`\n5. `php-cli`\n6. `php-gd`\n7. `php-xml`\n8. `php-json`\n\n\u003e I have dropped the ImageMagick `convert` command from dependencies.\n\n_**\\*** The name of the required packages might be different between Ubuntu and Arch Linux based distribs._\n\n## Plaforms\n\nThe project has been tested on:\n\n* [Pop_OS!](https://system76.com/pop) (_Ubuntu based distrib_)\n* [CachyOS](https://cachyos.org) (_Arch Linux based distrib_)\n\nAnd should be compatible with any Ubuntu or Arch Linux based distributions.\n\n\u003e It has also been tested on FreeBSD by my friend [@Sevendogs5](https://twitter.com/Sevendogs5).\n\n### Ubuntu and derivated distribs\n\nYou should only need to install these packages:\n\n```bash\n# For desktop\nsudo apt install libvirt-bin virt-install virt-viewer virtinst libguestfs-tools php-cli php-gd php-xml php-json\n\n# For server\nsudo apt install libvirt-bin virt-install virtinst libguestfs-tools php-cli php-gd php-xml php-json\n\n# Restart\nsudo reboot\n\n# Check services status\nsystemctl status libvirt-bin.service libvirt-guests.service libvirtd.service -l\n```\n\n\u003e I still need to validate the packages list so this might change later.\n\n### Arch Linux and derivated distribs\n\nYou should only need to install these packages:\n\n```bash\n# For desktop\nparu -S libvirt virt-install virt-viewer guestfs-tools php php-gd\n\n# For server\nparu -S libvirt virt-install guestfs-tools php php-gd\n\n# Enable 'php-gd' extension\nsudo sed -e 's/;extension=gd/extension=gd/' -i /etc/php/php.ini\n\n# Restart\nsudo reboot\n\n# Check services status\nsystemctl status libvirtd.service libvirt-guests.service -l\n```\n\n\u003e You can replace `paru` by `sudo pacman` if you don't have `paru` installed.\n\n### FreeBSD\n\n_Instructions are still missing at the moment._\n\n## Run the web interface\n\nYou can run the web interface by using the embedded web server from `PHP` or using `apache` or `nginx`.\n\n### PHP Embedded Web Server\n\nYou can start the server that way:\n\n```bash\ncd libvirt-web\n./start-web-server.sh\n```\n\nIf you want to run the server on another interface / port, you can also do the following:\n\n```bash\n# Set another listen interface (it will catch the first IP address in this case)\nLISTEN_INTERFACE=`hostname -I | awk '{ print $1 }'` ./start-web-server.sh\n\n# Set another listen interface (it will catch the FQDN in this case)\nLISTEN_INTERFACE=`hostname -f` ./start-web-server.sh\n\n# Set another list port\nLISTEN_PORT=8888 ./start-web-server.sh\n\n# Set another listen interface and port\nLISTEN_INTERFACE=`hostname -f` LISTEN_PORT=8888 ./start-web-server.sh\n```\n\n\u003e `sudo` __might be required__ to run the server if you want to run the server on a port below `1024` __and/or__ to access VMs created under the `root` user.\n\u003e\n\u003e In this case, you might have to do the following:\n\u003e\n\u003e `cd libvirt-web ; sudo ./start-web-server.sh`\n\u003e\n\u003e Or:\n\u003e\n\u003e `cd libvirt-web ; sudo LISTEN_PORT=8888 ./start-web-server.sh`\n\u003e\n\u003e If you need to set a different listen port or interface.\n\nThen navigate to [http://localhost:8000](http://localhost:8000) (_or any other address you would have defined_) with your internet browser.\n\n### Apache / nginx\n\nThis setup is not tested yet and will be documented later.\n\n\u003e You may have to make a symlink named `index.php` that points to the `libvirtweb.php` file.\n\n## Breaking Changes\n\nI've changed completely the project structure and now the code is splitted into several files instead of keeping everything into a single file.\n\nThe more I was adding features and cleaner logic, the more it became difficult to maintain and keep it readable and understandable.\n\nSo the best solution that came to me was split the single file into several ones, now it's much more easier to maintain the project.\n\nA single file version still exist if you look at the file `libvirtweb.aio.php` but it will not be supported anymore.\n\n## Missing / Not Working\n\nHere will be listed missing features / those not working correctly.\n\n* Dark mode 😅\n* Remote connection on VMs using `virt-viewer`\n  * Works on local only...\n* Connection to remote hypervisor\n  * Not implemented yet / not correctly...\n* ISO image upload\n  * The upload is working but the uploaded file can't be moved to `/var/lib/libvirt/images`... (_missing super user privileges_)\n  * This is due to access restricted to `sudoers` with filesystem permissions.\n* Graphic charts are still missing\n\n## Supported Browsers\n\nI'm using Chromium but it should work on any other modern browser.\n\n## Thanks\n\nThanks to the respective developers for their amazing work.\n\nHuge thanks to [Ingmar Decker](http://www.webdecker.de) for the `PPM` Image Reader `PHP` class.\n\nAlso thanks to my friend [@Sevendogs5](https://twitter.com/Sevendogs5) for supporting the FreeBSD platform.\n\n## Contributions\n\nFeel free to contribute by creating pull requests or new issues.\n\n## Author\n\n* __Jiab77__\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjiab77%2Flibvirt-web","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjiab77%2Flibvirt-web","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjiab77%2Flibvirt-web/lists"}