Hi All,
Im trying to figure how to use libvirt_domain_is_active but I'm unable to find what I am doing wrong. I tested it with php-libvirt-0.4.4 an with 0.4.3 but i have the same problem Im using libvirt-0.9.6-2.fc16.x86_64 with the following code Can someone point me in the right direction with the use of libvirt_domain_is_active ? Thanks ------8<------CODE --------8<------------------------------------ print_r ( libvirt_version() ); $domains=libvirt_list_domains($conn); print_r ($domains); foreach ( $domains as $domain ) { print "$domain\n"; print libvirt_domain_is_active($domain); } ---------8<------- OUTPUT ----------------8<------------------- Array ( [libvirt.release] => 6 [libvirt.minor] => 9 [libvirt.major] => 0 [connector.version] => 0.4.3 [connector.major] => 0 [connector.minor] => 4 [connector.release] => 3 ) Array ( [0] => Domain-0 [1] => vm1 [2] => vm2 [3] => vm3 ) Domain-0 PHP Warning: libvirt_domain_is_active() expects parameter 1 to be resource, integer given in /var/www/html/libvirt/index.php on line 20 PHP Warning: libvirt_domain_is_active(): Invalid arguments in /var/www/html/libvirt/index.php on line 20 vm1 PHP Warning: libvirt_domain_is_active() expects parameter 1 to be resource, integer given in /var/www/html/libvirt/index.php on line 20 PHP Warning: libvirt_domain_is_active(): Invalid arguments in /var/www/html/libvirt/index.php on line 20 vm2 PHP Warning: libvirt_domain_is_active() expects parameter 1 to be resource, integer given in /var/www/html/libvirt/index.php on line 20 PHP Warning: libvirt_domain_is_active(): Invalid arguments in /var/www/html/libvirt/index.php on line 20 vm3 PHP Warning: libvirt_domain_is_active() expects parameter 1 to be resource, integer given in /var/www/html/libvirt/index.php on line 20 PHP Warning: libvirt_domain_is_active(): Invalid arguments in /var/www/html/libvirt/index.php on line 20 |
-- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list