Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I am trying to install libvirt-php on my ubuntu server 11.10. Could any one tell me what are the simplest steps to install libvirt-php ??

share|improve this question

1 Answer 1

up vote 4 down vote accepted

Try the following:

sudo apt-get install libvirt-dev xsltproc libxml2-dev libxml2  
cd ~ 
git clone git://libvirt.org/libvirt-php.git libvirt-php  
cd libvirt-php  
sudo sh autogen.sh  
sudo ./configure  
sudo make  
sudo make install  
sudo service apache2 restart  

To verify it's installed run the following command

php -m | grep libvirt

You should see libvirt in the output.

share|improve this answer
    
Thank u so much. I have installed extensions. –  Alee Jun 29 '12 at 7:45
    
Could you tell me how to create a new domain? From PHP API Reference guide: (libvirt.org/php/api-reference.html) I have seen these functions: (i) libvirt_image_create($conn, $name, $size, $format) (ii) libvirt_domain_new($conn, $name, $arch, $memMB, $maxmemMB, $vcpus, $iso_image, $disks, $networks, $flags) (iii) libvirt_domain_create($res) (iv) libvirt_domain_create_xml($conn, $xml) The problem I am facing is that i dont know the steps to create a new domain. Either I have to create a new image first using libvirt_image_create .... or something else. –  Alee Jun 29 '12 at 8:17

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.