ryanvade / virtman
This package is abandoned and no longer maintained.
No replacement package was suggested.
A LibVirt wrapper for Laravel.
dev-master
2017-01-03 03:00 UTC
Requires
- doctrine/dbal: ^2.5
- illuminate/database: ^5.3
- illuminate/support: ^5.3
This package is auto-updated.
Last update: 2020-08-25 22:44:26 UTC
README
A Libvirt PHP wrapper library for the Laravel Framework. version 0.0.1
Requirements
- PHP >= 7.0
- Libvirt PHP extension
Installation
First grab the package via composer.
composer require ryanvade/virtman
Then add the service provider to the list of providers in config/app.php.
... /* * Package Service Providers... */ VirtMan\VirtManServiceProvider::class, ...
Finally publish the package to your laravel project and run the migrations.
php artisan vendor:publish php artisan migrate
Examples
Create a Storage Object
use VirtMan\VirtMan; $virtMan = new VirtMan(); $testInstallImage = $virtMan->createStorage("installimage.iso", "ISO", -1); $testStorage = $virtMan->createStorage("TestStorage", "qcow2", 20480);
Create a Network Object
$network = $virtMan->createNetwork("00:11:22:33:44:55", "machine_network", "e1000");
Create a Virtual Machine
$machine = $virtMan->createMachine("TestMachine", "Linux", 2048, 1, "x86_64", [ $testInstallImage, $testStorage], $network);
TODO
- Create Virtual Machines
- Create Storage Images
- Create Storage Pools
- Create Networks
- Create Machine Groups
- Delete Virtual Machines
- Delete Storage Images
- Delete Storage Pools
- Delete Networks
- Delete Machine Groups
- List Machines
- Change Machine Settings
- Change Machine Networks
- Add a Machine to a Network
- Clone a Machine
- Add Storage to a Storage Pool
- Manage Install Images