Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


PHP integration of KVM
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

PHP integration of KVM

Hello All,

I want to manage the KVM operations via PHP but I'm not able to find the way to connect KVM hypervisor to php via libvirt php apis

can anyone suggest any alternative way to do this.

I have tried everything in libvirt php but still it is not able to connect the hypervisor


require('libvirt.php');
$lv = new Libvirt('qemu:///system');
$hn = $lv->get_hostname();
if ($hn == false)
die('Cannot open connection to hypervisor');

$action = array_key_exists('action', $_GET) ? $_GET['action'] : false;

Gives error Cannot open connection to hypervisor

Comments

Sign In or Register to comment.