virt-manager in php


Answer: 1

25 hours ago

can anybody help me to display details about the VM using PHP code. am using Ubuntu server and used KVM as hypervisor. Am trying to display cores, ram, memory alloted each VM.

i have tried all the shell commands in php using shell_exec and exec.

Without installing any tool.

Added by: Lourdes Purdy

Answer: 2

29 hours ago

You can install libvirt php extension to communicate wit libvirtd. See the instructions here.

Once installed you can tryout some sample examples like :

 print_r( libvirt_version() );

Sample Output of above code will be something like:

    [libvirt.release] => 0
    [libvirt.minor] => 0
    [libvirt.major] => 1
    [connector.version] => 0.4.5
    [connector.major] => 0
    [connector.minor] => 4
    [connector.release] => 5

Refer for more examples.

The complete API reference can be found here:

Hope this helps

Added by: Mr. Korey Boyle

Popular Search

A B C D E F G H I J K L M N O P Q R S T U V W X Y Z 1 2 3 4 5 6 7 8 9