易陆发现互联网技术论坛

 找回密码
 开始注册
查看: 6032|回复: 2
收起左侧

ERROR nova.virt.libvirt.host [req-77f4f218-4f36-4744-aa4b-6e0d0e58704a - - - - -

[复制链接]
发表于 2018-12-2 00:02:38 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?开始注册

x
2018-12-02 00:00:33.486 23735 ERROR nova.virt.libvirt.host [req-77f4f218-4f36-4744-aa4b-6e0d0e58704a - - - - -] Exception handling connection event: AttributeError: 'NoneType' object has no attribute 'rfind'/ |+ \- I+ b7 k. c, e
2018-12-02 00:00:33.486 23735 ERROR nova.virt.libvirt.host Traceback (most recent call last):! y! p5 M  o9 e) P$ \
2018-12-02 00:00:33.486 23735 ERROR nova.virt.libvirt.host   File "/usr/lib/python2.7/site-packages/nova/virt/libvirt/host.py", line 148, in _dispatch_conn_event: x6 ~( T6 ]8 q
2018-12-02 00:00:33.486 23735 ERROR nova.virt.libvirt.host     handler(); p/ f; t* C, d  Y3 d( K
2018-12-02 00:00:33.486 23735 ERROR nova.virt.libvirt.host   File "/usr/lib/python2.7/site-packages/nova/virt/libvirt/host.py", line 397, in handler3 K$ B# @0 X+ ?5 w6 G2 I
2018-12-02 00:00:33.486 23735 ERROR nova.virt.libvirt.host     return self._conn_event_handler(*args, **kwargs)
) C2 X3 r% J3 w1 U  s5 H  h2018-12-02 00:00:33.486 23735 ERROR nova.virt.libvirt.host   File "/usr/lib/python2.7/site-packages/nova/virt/libvirt/driver.py", line 486, in _handle_conn_event
. b6 D) V# }- O& x2018-12-02 00:00:33.486 23735 ERROR nova.virt.libvirt.host     self._set_host_enabled(enabled, reason)
& Z% P; J+ j& s, b7 ?2018-12-02 00:00:33.486 23735 ERROR nova.virt.libvirt.host   File "/usr/lib/python2.7/site-packages/nova/virt/libvirt/driver.py", line 3812, in _set_host_enabled
+ y- v* R9 h% \/ Z) o4 P2018-12-02 00:00:33.486 23735 ERROR nova.virt.libvirt.host     mount.get_manager().host_up(self._host)3 x% B  P9 v3 ]& A8 j( A
2018-12-02 00:00:33.486 23735 ERROR nova.virt.libvirt.host   File "/usr/lib/python2.7/site-packages/nova/virt/libvirt/volume/mount.py", line 134, in host_up: f& j" K+ x, i) P
2018-12-02 00:00:33.486 23735 ERROR nova.virt.libvirt.host     self.state = _HostMountState(host, self.generation)
, U0 }& E9 l* S9 o% O, V- d0 z1 v2018-12-02 00:00:33.486 23735 ERROR nova.virt.libvirt.host   File "/usr/lib/python2.7/site-packages/nova/virt/libvirt/volume/mount.py", line 229, in __init__  m; N" z: y# a: D  |3 \! [9 O6 r
2018-12-02 00:00:33.486 23735 ERROR nova.virt.libvirt.host     mountpoint = os.path.dirname(disk.source_path)" ^' ?9 M) {: b( H& q, C
2018-12-02 00:00:33.486 23735 ERROR nova.virt.libvirt.host   File "/usr/lib64/python2.7/posixpath.py", line 129, in dirname
3 W. v7 F; T# {2018-12-02 00:00:33.486 23735 ERROR nova.virt.libvirt.host     i = p.rfind('/') + 1  n7 S! R1 @2 O# g4 E* ]! O/ k
2018-12-02 00:00:33.486 23735 ERROR nova.virt.libvirt.host AttributeError: 'NoneType' object has no attribute 'rfind', A* {2 b: w8 b7 ]* Z6 o" T
2018-12-02 00:00:33.486 23735 ERROR nova.virt.libvirt.host ; [4 O* V) S  x; p# d- q2 B6 z
2018-12-02 00:00:33.488 23735 INFO nova.virt.libvirt.host [-] Libvirt host capabilities <capabilities>
; u3 {+ G8 ^# @9 X* {- e, _# R4 D
 楼主| 发表于 2018-12-2 00:08:24 | 显示全部楼层
2018-12-02 00:07:50.443 25041 ERROR nova.virt.libvirt.host [req-e2d53673-c705-4928-a3bb-b092e65e99eb - - - - -] Exception handling connection event: AttributeError: 'NoneType' object has no attribute 'rfind') h2 V) V  G1 l1 h9 I& W9 g" K4 P
2018-12-02 00:07:50.443 25041 ERROR nova.virt.libvirt.host Traceback (most recent call last):
$ D+ L* g$ L: Z7 n4 Z- ~+ ?2018-12-02 00:07:50.443 25041 ERROR nova.virt.libvirt.host   File "/usr/lib/python2.7/site-packages/nova/virt/libvirt/host.py", line 148, in _dispatch_conn_event
6 R  w* s$ w! o2018-12-02 00:07:50.443 25041 ERROR nova.virt.libvirt.host     handler()/ u  H* N! m6 F; d; l
2018-12-02 00:07:50.443 25041 ERROR nova.virt.libvirt.host   File "/usr/lib/python2.7/site-packages/nova/virt/libvirt/host.py", line 397, in handler+ v0 y" n6 o7 M( D4 _8 g  D
2018-12-02 00:07:50.443 25041 ERROR nova.virt.libvirt.host     return self._conn_event_handler(*args, **kwargs); ]$ L7 [& S5 r4 K! B% F- u  g5 E! W
2018-12-02 00:07:50.443 25041 ERROR nova.virt.libvirt.host   File "/usr/lib/python2.7/site-packages/nova/virt/libvirt/driver.py", line 486, in _handle_conn_event& Z3 p8 C. _1 M8 f% `4 M7 x
2018-12-02 00:07:50.443 25041 ERROR nova.virt.libvirt.host     self._set_host_enabled(enabled, reason)7 H- O% A5 u; Z) l. N
2018-12-02 00:07:50.443 25041 ERROR nova.virt.libvirt.host   File "/usr/lib/python2.7/site-packages/nova/virt/libvirt/driver.py", line 3812, in _set_host_enabled
% O" I0 m1 w( ^: E2018-12-02 00:07:50.443 25041 ERROR nova.virt.libvirt.host     mount.get_manager().host_up(self._host)
# O. j: m( \6 B8 J2018-12-02 00:07:50.443 25041 ERROR nova.virt.libvirt.host   File "/usr/lib/python2.7/site-packages/nova/virt/libvirt/volume/mount.py", line 134, in host_up
2 P2 P2 t# x* n7 }, t: D2018-12-02 00:07:50.443 25041 ERROR nova.virt.libvirt.host     self.state = _HostMountState(host, self.generation)
  [3 u! Y4 V% N2018-12-02 00:07:50.443 25041 ERROR nova.virt.libvirt.host   File "/usr/lib/python2.7/site-packages/nova/virt/libvirt/volume/mount.py", line 229, in __init__0 I0 b( m8 |$ u* W  \, O% y  S5 b
2018-12-02 00:07:50.443 25041 ERROR nova.virt.libvirt.host     mountpoint = os.path.dirname(disk.source_path)3 K  Z1 d; A5 Q) i
2018-12-02 00:07:50.443 25041 ERROR nova.virt.libvirt.host   File "/usr/lib64/python2.7/posixpath.py", line 129, in dirname- ]/ i4 E: R# C$ X& d4 [9 @
2018-12-02 00:07:50.443 25041 ERROR nova.virt.libvirt.host     i = p.rfind('/') + 1; P, F4 t/ L* i* R. j7 u
2018-12-02 00:07:50.443 25041 ERROR nova.virt.libvirt.host AttributeError: 'NoneType' object has no attribute 'rfind'
1 H7 a8 Y- v# Z) }7 ~3 e2 e2018-12-02 00:07:50.443 25041 ERROR nova.virt.libvirt.host
 楼主| 发表于 2018-12-8 17:56:58 | 显示全部楼层
virsh start vm1368544020451:3 `( ^( q. \7 J/ |, Y

+ d" O$ d- D2 W& [4 o; s/ Y  R error: Failed to start domain vm1368544020451
5 j0 A( A+ r$ L" c6 R
5 i: h" P9 X& }) F, l# z. ?error: internal error process exited while connecting to monitor: kvm: -drive file=/dev/sp1368155439693/v1368544020461,if=none,id=drive-virtio-disk0,format=qcow2: could not open disk image /dev/sp1368155439693/v1368544020461: Invalid argument6 u+ a  a; [' T2 r

/ Z, K* q0 |* E; N6 K镜像格式错误,用qemu-img info 检查镜像和xml配置文件中指定的type是否一致。' B$ h6 Q9 @- u  e% D4 V
. o9 U; [5 w; o3 l
6 H6 W& Q8 A5 y6 U
error: Failed to start domain vm0
' p6 S4 j  H- B2 a+ {8 }
. ]3 M" |! S. J  `- Rerror: internal error process exited while connecting to monitor: Could not access KVM kernel module: No such file or directory! m6 Q" d0 h: \7 g, |6 Z& g
failed to initialize KVM: No such file or directory  ^& N# ?# q# e/ G3 R, U$ @, n3 D' J' {$ }
No accelerator found!. E) {/ Z* M1 K- k' N" V6 b
上面的提示信息就是因为QEMU在初始化阶段因为无法找到kvm内核模块。3 j, P, j! K8 }2 c+ E

8 B* R3 B4 o* G: Z0 C5 M0 Vsudo modprobe kvm   #载入指定的模块  {2 G. }; i! _0 j3 a5 h
0 A1 ?; J, k/ g0 g- A0 Q
重启电脑,进入bios界面,设置advance选项里面的virtualization标签为Enabled6 w, ~* l7 O: C9 w& ?

( {( }2 H: m% h# ?1 A2 Z通过命令 lsmod | grep kvm    #显示已载入的模块8 P& x1 d4 B3 V4 J8 w% ^% I

" d" R- g# d; Y; m* p 虚拟机迁移:
& n3 j6 K- d* H5 |. [2 k2 N5 [" f/ |  H2 x
# virsh migrate --live 1 qemu+tcp://192.168.0.121 --p2p --tunnelled --unsafe * t/ n* f( T( Q3 }: v+ D% w$ a
error: operation failed: Failed to connect to remote libvirt URI qemu+tcp://192.168.0.121(在URI后面加上/system,‘system’相当于root用户的访问权限)
& u$ z! P4 M2 v: H6 ^- F
6 y- p3 I% S0 i5 q, ~7 q, y1 `#virsh migrate --live 2 qemu+tcp://192.168.0.121/system --p2p --tunnelled+ r3 n  H, C5 H4 W: h! R
 error: Unsafe migration: Migration may lead to data corruption if disks use cache != none(加上--unsafe参数)
4 I" r' F% N! I! h8 \2 x& c+ t1 z+ U6 s) E+ B. H3 p" r2 Z
#virsh migrate --live 2 qemu+tcp://192.168.0.121/system --p2p --tunnelled --unsafe 0 ^: E: E, f2 t0 w8 V/ s) k  V
error: Timed out during operation: cannot acquire state change lock (启动虚拟机有时也会遇此错误),需要重启libvirtd进程
5 T8 c9 E+ K, x, H1 m& r0 ^
. d4 v" J# `3 H  W1 _# g" a8 U' T+ gvirsh:
! Q* H# o* u1 Y9 {) q3 S' ]; b0 r9 k2 Q/ }9 K3 d- n
error: Failed to connect socket to '/var/run/libvirt/libvirt-sock': Connection refused(libvirtd 进程没有启动,libvirtd是一个监听客户端请求的进程)
6 H8 r# v( C) `* u3 p( i  G% q5 R* ]: w9 d4 u. {2 c- l, T
$ virsh -c qemu:///system list
) }7 n' J& T% uerror: Failed to connect socket to '/var/run/libvirt/libvirt-sock': Permission denied
+ {% j' t" M* Derror: failed to connect to the hypervisor+ q# O8 N9 \) ^8 ~% G& ?) o- o+ v
7 D$ a* h3 m3 A1 i! m* t
(当前用户没有权限,修改/etc/libvirt/libvirtd.conf,unix_sock_rw_perms = 0777,使所有用户都有权限读写)/ f4 H% N# e: ~8 j6 o( J

9 C2 B7 F$ u) e. i启动libvirtd进程出错:- A9 k: {; l9 H% p

* B; z: M7 V6 {; Z( L7 k# n! B /usr/local/sbin/libvirtd -d -l --config /usr/local/etc/libvirt/libvirtd.conf (编译安装的启动方式)
( z* x! H* j) ~" S  N8 i3 Derror:/usr/local/sbin/libvirtd: initialization failed
3 G$ `% x0 ]) ]0 U! r5 S2 n! S9 o* m/ ~8 Q1 O3 o1 e8 p
try to install libpcap-devel RPM and rebuild libvirt  http://comments.gmane.org/gmane.comp.emulators.libvirt/58218
; ?- T; A2 L+ {. }! c, P
( i2 |( L+ O: t% q/ F, b# Capt-get install libpcap-dev) m  Z) W/ V3 l

  G5 O/ J4 @, O. j% y. G上面的方法好像都没有效果,但是尝试了http://wiki.libvirt.org/page/The_daemon_cannot_be_started说的,把配置文件里的9 [/ D  H3 V6 C. i/ j: G  E

0 X1 B2 D5 w$ O# M8 H: vlisten_tls = 0注释取消(更奇怪的问题,在我的客户端链接不对)) W' c: \4 Z7 e
. e6 H( ?* R  Y1 T9 m( H
启动虚拟机:Connection reset by peer
! l# ]. d/ U* F7 E1 O# L, d% o/ }2 t, q0 S) i
virsh start vm1355991767186
1 w4 S( `9 h% O, z0 _, m  r* l5 _error: Failed to start domain vm1355991767186
. N% w9 Q$ C7 z7 a- s# U5 uerror: Unable to read from monitor: Connection reset by peer% n/ U' J. ^  L  }0 a2 N8 w
8 i; G/ K# X/ ~1 y+ E7 G
 还有可能是这样提示:7 Q8 E& ?9 @+ F% U& ]4 m% T

; M  e0 U( }  t' {3 }( i. _! e: p5 Gerror: internal error process exited while connecting to monitor: Failed to allocate 16332619776 B: Cannot allocate memory
, e, T" t) T( j2 r$ y
, @2 P5 m% m9 H  t8 @2 L7 W这个问题可能是因为为VM分配的内存过大(甚至超过的物理主机的内存大小)
  s" Z. d# u- ]6 f% w. t% B
$ q8 y0 |, B( ?) q9 V; X' aUnable to load library 'virt': libvirt.so: cannot open shared object file: No such file or directory
9 {, ~1 T+ d* e, g9 a, I0 J: [8 V; o/ B7 G/ @; A+ f
linux 环境:1 d5 b' `/ G5 J% r
     ln -s /usr/lib/libvirt.so.0   /usr/lib/libvirt.so
# N0 R- N2 h. `7 \windows 环境
6 Z6 J6 N$ i$ C     将libvirt-0.dll改名为virt.dll
, D) ~3 L; r4 [  1 V" [% o7 ?" N  Y1 i
# virsh undefine vm1354695894990
; m- J& v$ n! B" [/ g& Lerror: Refusing to undefine while domain managed save image exists  c  C. @  b3 }2 J' c7 z( M

% ^. c  Z* H# y" l" n* Z$ Uhttp://www.redhat.com/archives/l ... -July/msg01219.html9 \1 Z( V( d# x8 L% z: B3 u% L
/ q; {" {  i: {& c# Q$ [
 managedsave
2 z; a2 e: d6 a6 O: c2 H6 L' {+ a
- F/ s4 [3 l# W8 r( [8 K) p7 k解决办法:virsh undefine $domain  --managed-save/ b- g2 M1 U/ x
 
% f2 f  K6 l4 h# c# j7 K在centos下面Define虚拟机时,确实没有/usr/bin/kvm,加软链接) C- C9 K+ U1 {- j; g
error: Failed to define domain from xxx.xml
' @) s! c( ^# Q# @$ R. }- u$ J5 berror: Cannot find QEMU binary /usr/bin/kvm: No such file or directory
0 ]$ D* Y( L. r4 @
& N) y1 k8 a' q解决办法:ln -s /usr/libexec/qemu-kvm /usr/bin/kvm
- o* x+ U; ~* q( m* v
您需要登录后才可以回帖 登录 | 开始注册

本版积分规则

关闭

站长推荐上一条 /4 下一条

北京云银创陇科技有限公司以云计算运维,代码开发

QQ|返回首页|Archiver|小黑屋|易陆发现技术论坛 点击这里给我发消息

GMT+8, 2026-4-8 15:22 , Processed in 0.039871 second(s), 22 queries .

Powered by Discuz! X3.4 Licensed

© 2012-2025 Discuz! Team.

快速回复 返回顶部 返回列表