Hi Guys,
I was trying to suspend a virtual machine but fail not sure why.... However i was successfully list all the vm on the host, below are my source code, can any one who have experience in this area give me some advised ?
My OUTPUT from browser
Array
(
[libvirt.release] => 3
[libvirt.minor] => 9
[libvirt.major] => 0
[connector.version] => 0.4.3
[connector.major] => 0
[connector.minor] => 4
[connector.release] => 3
)
Resource id #2Array
(
[0] => VM_6E472D93-F943-2D1E-B1EA-5896D95B9C84
[1] => VM_B090CFCA-77FE-962B-9D06-F85047324527
[2] => VM_7478E5EB-B843-225A-00FC-09D0E846FE61
[3] => winxpnew
[4] => VM_1F9BC5A1-352D-0E7D-8BAB-F46FBFE1C80D
[5] => VM_B6DA1C45-3F0D-16EF-FDF1-512935D88C37
[6] => VM_F32717EE-4AA4-A17C-8E4B-D1D5A79612A5
[7] => VM_03ABB818-D226-32FB-0A6E-458849AB7C7B
[8] => nagios
[9] => VM_6C158DB3-71BE-A0D1-3FFB-1EEE5854E45D
[10] => VM_8D560513-036A-14FD-7546-48C370F0A057
[11] => VM_AA3DC5CA-A447-E6E5-0E7A-869416869B1D
[12] => VM_C19AC7F1-AA49-92D0-336F-B8A8D7FADCD5
)
Below are my php source : -
<?php
echo "<html><body><pre>";
print_r ( libvirt_version() );
$conn = libvirt_connect('qemu+ssh://root@10.0.0.122/system', true);
echo $conn;
$doms = libvirt_list_domains($conn);
print_r($doms);
$doms = libvirt_domain_suspend('VM_7478E5EB-B843-225A-00FC-09D0E846FE61');
print_r($doms);
echo "</pre></body></html>";
?>
Thanks!!
Regards,
Peter