virt-clone报错解决

 

操作:
命令行运行virt-clone

报错信息:

Traceback (most recent call last):
  File "/usr/bin/virt-clone", line 25, in ?
    import virtinst
  File "/usr/lib/python2.4/site-packages/virtinst/__init__.py", line 27, in ?
    import util
  File "/usr/lib/python2.4/site-packages/virtinst/util.py", line 39, in ?
    import libvirt
  File "/usr/lib64/python2.4/site-packages/libvirt.py", line 25, in ?
    raise lib_e
ImportError: No module named libvirtmod

预期输出:
ERROR    An original machine name or xml file is required. (use --prompt to run interactively)
这是virt-clone正常时没有加参数的输出

解决办法:
/usr/local/lib64/python2.4/site-packages/libvirtmod.la
/usr/local/lib64/python2.4/site-packages/libvirtmod.so
/usr/local/lib64/python2.4/site-packages/libvirt.py
复制到
/usr/lib64/python2.4/site-packages/下

前提:
/usr/lib64/python2.4/site-packages/中没有复制的三个文件

你可能感兴趣的:(libvirt)