kimchi-project / kimchi

An HTML5 management interface for KVM guests
https://github.com/kimchi-project/kimchi/releases/latest
Other
3.09k stars 365 forks source link

Libvirt module import issues #470

Closed phobot closed 9 years ago

phobot commented 9 years ago

Kimchid returns this on startup: Traceback (most recent call last): File "/usr/bin/kimchid", line 95, in sys.exit(main(sys.argv[1:])) File "/usr/bin/kimchid", line 92, in main kimchi.server.main(options) File "/usr/lib/python2.7/dist-packages/kimchi/server.py", line 183, in main srv = Server(options) File "/usr/lib/python2.7/dist-packages/kimchi/server.py", line 132, in init model_instance = model.Model() File "/usr/lib/python2.7/dist-packages/kimchi/model/model.py", line 64, in init models.append(instance(kargs)) File "/usr/lib/python2.7/dist-packages/kimchi/model/host.py", line 285, in init** {'net': libvirt.VIR_CONNECT_LIST_NODE_DEVICES_CAP_NET, AttributeError: 'module' object has no attribute 'VIR_CONNECT_LIST_NODE_DEVICES_CAP_NET'

when VIR_CONNECT_LIST_NODE_DEVICES_CAP_NET is commented out the next

Traceback (most recent call last): File "/usr/bin/kimchid", line 95, in sys.exit(main(sys.argv[1:])) File "/usr/bin/kimchid", line 92, in main kimchi.server.main(options) File "/usr/lib/python2.7/dist-packages/kimchi/server.py", line 183, in main srv = Server(options) File "/usr/lib/python2.7/dist-packages/kimchi/server.py", line 132, in init model_instance = model.Model() File "/usr/lib/python2.7/dist-packages/kimchi/model/model.py", line 64, in init models.append(instance(kargs)) File "/usr/lib/python2.7/dist-packages/kimchi/model/host.py", line 285, in init** {'pci': libvirt.VIR_CONNECT_LIST_NODE_DEVICES_CAP_PCI_DEV, AttributeError: 'module' object has no attribute 'VIR_CONNECT_LIST_NODE_DEVICES_CAP_PCI_DEV'

root@eurasum:~# dpkg --list | grep libvirt ii libsys-virt-perl 0.9.12-2 amd64 Perl module providing an extension for the libvirt library ii libvirt-bin 0.9.12.3-1+deb7u1 amd64 programs for the libvirt library ii libvirt0 0.9.12.3-1+deb7u1 amd64 library for interfacing with different virtualization systems ii python-libvirt 0.9.12.3-1+deb7u1 amd64 libvirt Python bindings root@eurasum:~#

alinefm commented 9 years ago

@phobot Please, provide more information on how to reproduce it. OS, OS version, Kimchi version, libvirt version, etc.

phobot commented 9 years ago

OS: Debian OS Version: 7.7 Kimchi Version: 1.4.0-rc1 Installed Package list: http://pastebin.com/r4ZfL4Rz I just verified that it still exists by doing this: 507 wget https://github.com/kimchi-project/kimchi/archive/master.zip 508 unzip master.zip 509 ls 510 cd kimchi-master/ 511 ls 512 ./autogen.sh --system 513 make 514 make install 515 kimchid --host=0.0.0.0

alinefm commented 9 years ago

@phobot Debian 7 is not a offical distro supported by Kimchi. Would you like to investigate it and provide a patch to the community? https://github.com/kimchi-project/kimchi/wiki/How-to-Contribute

cd1 commented 9 years ago

The macro VIR_CONNECT_LIST_NODE_DEVICES_CAP_PCI_DEV was created on libvirt 0.10.2, Debian still uses libvirt 0.9.12.

We need to find a way to disable the feature related to that macro on Debian (and other possibly old systems).

EDIT: Debian 7 is not supported anyway.