[libvirt-users] how to install libvirt-python

Hi, I have successfully installed libvirt-.0.10.0 from source ./configure make make install How can I check that if libvirt-python is installed? Search the folders, it seems there is no such file [root@tiger ~]# find /usr/ -name libvirt-python [root@tiger ~]# find . -name libvirt-python [root@tiger ~]# Regards, Mahmood

On 11/20/2013 09:26 AM, Mahmood Naderan wrote:
Hi, I have successfully installed libvirt-.0.10.0 from source
./configure make make install
How can I check that if libvirt-python is installed? Search the folders, it seems there is no such file
[root@tiger ~]# find /usr/ -name libvirt-python [root@tiger ~]# find . -name libvirt-python
That's because installing libvirt-python doesn't create any directory or file named exactly libvirt-python. For an example of what DOES get installed: # rpm -ql libvirt-python /usr/lib64/python2.7/site-packages/libvirt.py /usr/lib64/python2.7/site-packages/libvirt.pyc /usr/lib64/python2.7/site-packages/libvirt.pyo /usr/lib64/python2.7/site-packages/libvirt_lxc.py /usr/lib64/python2.7/site-packages/libvirt_lxc.pyc /usr/lib64/python2.7/site-packages/libvirt_lxc.pyo /usr/lib64/python2.7/site-packages/libvirt_qemu.py /usr/lib64/python2.7/site-packages/libvirt_qemu.pyc /usr/lib64/python2.7/site-packages/libvirt_qemu.pyo /usr/lib64/python2.7/site-packages/libvirtmod.so /usr/lib64/python2.7/site-packages/libvirtmod_lxc.so /usr/lib64/python2.7/site-packages/libvirtmod_qemu.so /usr/share/doc/libvirt-python-1.1.3.1 /usr/share/doc/libvirt-python-1.1.3.1/events-python /usr/share/doc/libvirt-python-1.1.3.1/events-python/event-test.py /usr/share/doc/libvirt-python-1.1.3.1/python /usr/share/doc/libvirt-python-1.1.3.1/python/Makefile.am /usr/share/doc/libvirt-python-1.1.3.1/python/README /usr/share/doc/libvirt-python-1.1.3.1/python/consolecallback.py /usr/share/doc/libvirt-python-1.1.3.1/python/dominfo.py /usr/share/doc/libvirt-python-1.1.3.1/python/domrestore.py /usr/share/doc/libvirt-python-1.1.3.1/python/domsave.py /usr/share/doc/libvirt-python-1.1.3.1/python/domstart.py /usr/share/doc/libvirt-python-1.1.3.1/python/esxlist.py /usr/share/doc/libvirt-python-1.1.3.1/python/topology.py Also, you can do: $ python
import libvirt help('libvirt')
and if that succeeds, then python found your installed libvirt bindings. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org

OK. I am trying to install virt-manager from source but found it difficult! So I decided to install from repo. # yum install virt-manager libvirt Dependencies Resolved ======================================================================================================================== Package Arch Version Repository Size ======================================================================================================================== Installing: virt-manager x86_64 0.9.0-14.el6 sl 1.0 M Installing for dependencies: libvirt-client x86_64 0.10.2-18.el6_4.14 sl-security 4.0 M libvirt-python x86_64 0.10.2-18.el6_4.14 sl-security 464 k python-virtinst noarch 0.600.0-8.el6 sl 487 k Transaction Summary ======================================================================================================================== Install 4 Package(s) Total download size: 5.9 M And I installed all of them. However when I start virt-manager, I get this error Error polling connection 'qemu:///system': internal error Cannot find suitable emulator for x86_64 Traceback (most recent call last): File "/usr/share/virt-manager/virtManager/engine.py", line 440, in _tick conn.tick() File "/usr/share/virt-manager/virtManager/connection.py", line 1422, in tick newNets, self.nets) = self._update_nets() File "/usr/share/virt-manager/virtManager/connection.py", line 1285, in _update_nets lookup_func, build_class) File "/usr/share/virt-manager/virtManager/connection.py", line 1217, in _poll_helper if not check_support(): File "/usr/share/virt-manager/virtManager/connection.py", line 509, in is_network_capable virtinst.support.SUPPORT_CONN_NETWORK) File "/usr/lib/python2.6/site-packages/virtinst/support.py", line 574, in check_conn_support return _check_support(conn, feature, conn) File "/usr/lib/python2.6/site-packages/virtinst/support.py", line 443, in _check_support actual_drv_ver = _hv_ver(conn, uri) File "/usr/lib/python2.6/site-packages/virtinst/support.py", line 376, in _hv_ver ret = cmd(*args) File "/usr/lib64/python2.6/site-packages/libvirt.py", line 3385, in getVersion if ret == -1: raise libvirtError ('virConnectGetVersion() failed', conn=self) libvirtError: internal error Cannot find suitable emulator for x86_64 However I have installed Qemu from source. For example $ /usr/local/bin/qemu-x86_64 -version qemu-x86_64 version 1.6.90, Copyright (c) 2003-2008 Fabrice Bellard So what is the problem here? Regards, Mahmood On Wednesday, November 20, 2013 8:14 PM, Eric Blake <eblake@redhat.com> wrote: On 11/20/2013 09:26 AM, Mahmood Naderan wrote:
Hi, I have successfully installed libvirt-.0.10.0 from source
./configure make make install
How can I check that if libvirt-python is installed? Search the folders, it seems there is no such file
[root@tiger ~]# find /usr/ -name libvirt-python [root@tiger ~]# find . -name libvirt-python
That's because installing libvirt-python doesn't create any directory or file named exactly libvirt-python. For an example of what DOES get installed: # rpm -ql libvirt-python /usr/lib64/python2.7/site-packages/libvirt.py /usr/lib64/python2.7/site-packages/libvirt.pyc /usr/lib64/python2.7/site-packages/libvirt.pyo /usr/lib64/python2.7/site-packages/libvirt_lxc.py /usr/lib64/python2.7/site-packages/libvirt_lxc.pyc /usr/lib64/python2.7/site-packages/libvirt_lxc.pyo /usr/lib64/python2.7/site-packages/libvirt_qemu.py /usr/lib64/python2.7/site-packages/libvirt_qemu.pyc /usr/lib64/python2.7/site-packages/libvirt_qemu.pyo /usr/lib64/python2.7/site-packages/libvirtmod.so /usr/lib64/python2.7/site-packages/libvirtmod_lxc.so /usr/lib64/python2.7/site-packages/libvirtmod_qemu.so /usr/share/doc/libvirt-python-1.1.3.1 /usr/share/doc/libvirt-python-1.1.3.1/events-python /usr/share/doc/libvirt-python-1.1.3.1/events-python/event-test.py /usr/share/doc/libvirt-python-1.1.3.1/python /usr/share/doc/libvirt-python-1.1.3.1/python/Makefile.am /usr/share/doc/libvirt-python-1.1.3.1/python/README /usr/share/doc/libvirt-python-1.1.3.1/python/consolecallback.py /usr/share/doc/libvirt-python-1.1.3.1/python/dominfo.py /usr/share/doc/libvirt-python-1.1.3.1/python/domrestore.py /usr/share/doc/libvirt-python-1.1.3.1/python/domsave.py /usr/share/doc/libvirt-python-1.1.3.1/python/domstart.py /usr/share/doc/libvirt-python-1.1.3.1/python/esxlist.py /usr/share/doc/libvirt-python-1.1.3.1/python/topology.py Also, you can do: $ python
import libvirt help('libvirt')
and if that succeeds, then python found your installed libvirt bindings. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org

On 11/20/2013 09:58 AM, Mahmood Naderan wrote: [please don't top-post on technical lists]
Error polling connection 'qemu:///system': internal error Cannot find suitable emulator for x86_64
Have you installed libvirt-daemon-kvm? Does running 'virt-host-validate' point out any problems? -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org

Does running 'virt-host-validate' point out any problems? Seems that everything is ok
Regards, Mahmood On Wednesday, November 20, 2013 8:37 PM, Eric Blake <eblake@redhat.com> wrote: On 11/20/2013 09:58 AM, Mahmood Naderan wrote: [please don't top-post on technical lists]
Error polling connection 'qemu:///system': internal error Cannot find suitable emulator for x86_64
Have you installed libvirt-daemon-kvm? Does running 'virt-host-validate' point out any problems? -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org

Does running 'virt-host-validate' point out any problems?
# virt-host-validate QEMU: Checking for hardware virtualization : PASS QEMU: Checking for device /dev/kvm : PASS QEMU: Checking for device /dev/vhost-net : PASS QEMU: Checking for device /dev/net/tun : PASS LXC: Checking for Linux >= 2.6.26 : PASS
Have you installed libvirt-daemon-kvm There is no such package. Instead I see
ocaml-libvirt.x86_64 : OCaml binding for libvirt ruby-libvirt.x86_64 : Ruby bindings for libvirt fence-virtd-libvirt.x86_64 : Libvirt backend for fence-virtd fence-virtd-libvirt-qpid.x86_64 : Libvirt-qmf backend for fence-virtd libvirt-cim.i686 : A CIM provider for libvirt libvirt-cim.x86_64 : A CIM provider for libvirt libvirt-client.i686 : Client side library and utilities of the libvirt library libvirt-client.x86_64 : Client side library and utilities of the libvirt library libvirt-devel.i686 : Libraries, includes, etc. to compile with the libvirt library libvirt-devel.x86_64 : Libraries, includes, etc. to compile with the libvirt library libvirt-java.noarch : Java bindings for the libvirt virtualization API libvirt-java-devel.noarch : Compressed Java source files for libvirt-java libvirt-java-javadoc.noarch : Java documentation for libvirt-java libvirt-python.x86_64 : Python bindings for the libvirt library libvirt-qmf.x86_64 : QPid QMF interface to Libvirt libvirt-snmp.x86_64 : SNMP functionality for libvirt ocaml-libvirt-devel.x86_64 : Development files for ocaml-libvirt collectd-virt.x86_64 : Libvirt plugin for collectd fence-virtd-checkpoint.x86_64 : Cluster+Libvirt backend for fence-virtd libvirt.x86_64 : Library providing a simple virtualization API libvirt-lock-sanlock.x86_64 : Sanlock lock manager plugin for QEMU driver perl-Sys-Virt.x86_64 : Represent and manage a libvirt hypervisor connection virt-manager.x86_64 : Virtual Machine Manager Which one best matches? Regards, Mahmood On Wednesday, November 20, 2013 8:37 PM, Eric Blake <eblake@redhat.com> wrote: On 11/20/2013 09:58 AM, Mahmood Naderan wrote: [please don't top-post on technical lists]
Error polling connection 'qemu:///system': internal error Cannot find suitable emulator for x86_64
Have you installed libvirt-daemon-kvm? Does running 'virt-host-validate' point out any problems? -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org

On 11/20/2013 12:01 PM, Mahmood Naderan wrote:
Have you installed libvirt-daemon-kvm There is no such package.
Oh right, RHEL 6 uses the older scheme with fewer packages. And it appears that you are using a downstream fork of RHEL, given your previous mail:
Installing for dependencies: libvirt-client x86_64 0.10.2-18.el6_4.14 sl-security 4.0 M
If you were using RHEL, I'd suggest opening a support ticket with Red Hat. But as you are using a downstream fork, I'm not sure what else to suggest that you try.
libvirt.x86_64 : Library providing a simple virtualization API
This is the package that provided libvirt with qemu support in RHEL 6, and which got split into libvirt-daemon-* for Fedora. You may be missing the distro version of qemu (that is, your self-build qemu at /usr/local/bin/qemu-x86_64 is not the same as what RHEL ships, and since you are using the RHEL libvirt, it may not know to look for a self-built alternative).
On Wednesday, November 20, 2013 8:37 PM, Eric Blake <eblake@redhat.com> wrote:
On 11/20/2013 09:58 AM, Mahmood Naderan wrote:
[please don't top-post on technical lists]
This request still applies. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org

You may be missing the distro version of qemu (that is, your self-build qemu at /usr/local/bin/qemu-x86_64 is not the same as what RHEL ships, and since you are using the RHEL libvirt, it may not know to look for a self-built alternative).
Excuse me, but it seems that there is not way to uninstall the qemu which has been built from source. There is no target for uninstall. Is it enough to run "rm -rf /usr/local/bin/qemu*" or there are some other config staffs in other system directories? Regards, Mahmood

On 11/20/2013 10:13 PM, Mahmood Naderan wrote:
You may be missing the distro version of qemu (that is, your self-build qemu at /usr/local/bin/qemu-x86_64 is not the same as what RHEL ships, and since you are using the RHEL libvirt, it may not know to look for a self-built alternative).
Excuse me, but it seems that there is not way to uninstall the qemu which has been built from source. There is no target for uninstall. Is it enough to run "rm -rf /usr/local/bin/qemu*" or there are some other config staffs in other system directories?
Unfortunately, that's probably a question better asked on the qemu list, as libvirt doesn't control how qemu gets installed. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
participants (2)
-
Eric Blake
-
Mahmood Naderan