virt-manager无法启动的问题

virt-manager无法启动,出现如下问题 

[root@lactsys Desktop]# virt-manager 
Traceback (most recent call last):
  File "/usr/share/virt-manager/virt-manager.py", line 383, in
    main()
  File "/usr/share/virt-manager/virt-manager.py", line 246, in main
    from virtManager import cli
  File "/usr/share/virt-manager/virtManager/cli.py", line 29, in
    import libvirt
ImportError: No module named libvirt
[root@lactsys Desktop]#  

思路:修改/etc/libvirt/libvirtd.conf中: 

vim /etc/libvirt/libvirtd.conf  

log_outputs="3:syslog:libvirtd"   #去掉注释,是日志输出到系统日志中,便于调试 

[root@lactsys libvirt]# which virt-manager
/usr/bin/virt-manager

[root@lactsys libvirt]# cat `which virt-manager`

#!/bin/sh
exec /usr/bin/python "/usr/share/virt-manager/virt-manager.py" "$@"

可以看到,virt-manager实际上执行的就是这样一个shell,那么我们可以手动来启动 

/usr/bin/python2.6 "/usr/share/virt-manager/virt-manager.py"

就可以起来了,可能是python的版本问题,修改脚本里面的文件就好了

找到/usr/bin/virt-manager文件修改里面的内容为

/usr/bin/python2.6 "/usr/share/virt-manager/virt-manager.py"   即可





你可能感兴趣的:(virt-manager无法启动的问题)