A Libvirt PHP wrapper library for the Laravel Framework. version 0.0.1
- PHP >= 7.0
- Libvirt PHP extension
First grab the package via composer.
composer require ryanvade/virtmanThen 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 migrateuse VirtMan\VirtMan;
$virtMan = new VirtMan();
$testInstallImage = $virtMan->createStorage("installimage.iso", "ISO", -1);
$testStorage = $virtMan->createStorage("TestStorage", "qcow2", 20480);$network = $virtMan->createNetwork("00:11:22:33:44:55", "machine_network", "e1000");$machine = $virtMan->createMachine("TestMachine", "Linux", 2048, 1, "x86_64", [
$testInstallImage,
$testStorage],
$network);- 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