PHPackages                             the-basement/libvirt - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. the-basement/libvirt

ActiveLibrary

the-basement/libvirt
====================

This package implements the domain service contract for the libvirt hypervisor.

v0.1.0(2y ago)15MITPHPPHP &gt;=8.2

Since May 13Pushed 2y ago1 watchersCompare

[ Source](https://github.com/The-Basement-Club/basement-libvirt)[ Packagist](https://packagist.org/packages/the-basement/libvirt)[ Docs](https://github.com/The-Basement-Club/basement-libvirt)[ RSS](/packages/the-basement-libvirt/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (3)Versions (2)Used By (0)

basement-libvirt
================

[](#basement-libvirt)

[![Latest Version on Packagist](https://camo.githubusercontent.com/77d33b21bb1595a1dca27cbf26dda824b4f79d17bf3103820fd5828130b9b604/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7468652d626173656d656e742f6c6962766972742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/the-basement/libvirt)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Total Downloads](https://camo.githubusercontent.com/8803e21638e1c74af83a018a197e3ba40c8016b31c019837324b876ce23cf1b0/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7468652d626173656d656e742f6c6962766972742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/the-basement/libvirt)

This package is a basic QEMU management interface using the interfaces from [the-basement/common](https://packagist.org/packages/the-basement/common).

Install
-------

[](#install)

Via Composer

```
$ composer require the-basement/libvirt
```

Basic Usage
-----------

[](#basic-usage)

Creating a VM in QEMU/KVM

```
// This assumes you have an ubuntu server image available from your KVM host
// This also assumes the default image location of the disks created by KVM.
// Both of these can be changed; disks that exist will not be overwritten
// disks that don't exist will be created.
$service = new TheBasement\Libvirt\LibvirtService();
$service->createServer([
    'name' => 'my-virtual-machine',
    'memory' => (string) (1024 * 1024), // 1G in KiB
    'cores' => 1,
    'threads' => 1,
    'iso_path' => '/var/lib/libvirt/iso/ubuntu-22.04.4-live-server-amd64.iso',
    'storage_pool' => 'default',
    'network_mac' => '',
    'video_ram' => '65536', // bytes of video ram
    'disk_path' => '/var/lib/libvirt/images/ubuntu22.04-2.qcow2',
    'disk_name' => 'ubuntu22.04-2.qcow2',
    'disk_capacity' => 10 * 1024 * 1024 * 1024, // 10 GB in bytes
]);

// Gets all servers defined for the KVM
$servers = $service->findAllServers();
```

Change log
----------

[](#change-log)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Testing
-------

[](#testing)

```
$ composer test
```

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) and [CODE\_OF\_CONDUCT](CODE_OF_CONDUCT.md) for details.

Security
--------

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Austin Kregel](https://github.com/austinkregel)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity43

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

733d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/2c5c1ee0adf552aec8a54c1760dd99c4d1b90c0360dccafeef849a14ff37f706?d=identicon)[austinkregel](/maintainers/austinkregel)

---

Top Contributors

[![austinkregel](https://avatars.githubusercontent.com/u/5355937?v=4)](https://github.com/austinkregel "austinkregel (2 commits)")

---

Tags

hypervisorVirtualizationKVMlibvirtthebasement.clubqemu

###  Code Quality

TestsPHPUnit

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/the-basement-libvirt/health.svg)

```
[![Health](https://phpackages.com/badges/the-basement-libvirt/health.svg)](https://phpackages.com/packages/the-basement-libvirt)
```

###  Alternatives

[corsinvest/cv4pve-api-php

Corsinvest Proxmox VE Client API PHP

801.4M](/packages/corsinvest-cv4pve-api-php)[zzantares/proxmoxve

A simple PHP 5.5+ Proxmox API client.

17761.8k4](/packages/zzantares-proxmoxve)[mrkampf/proxmox-ve

Proxmox VE API Client

6238.2k](/packages/mrkampf-proxmox-ve)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
