易陆发现互联网技术论坛

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

ERROR nova.scheduler.utils qemu unexpectedly closed the monitor

[复制链接]
发表于 2022-10-20 13:44:30 | 显示全部楼层 |阅读模式

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

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

x
2022-10-20 10:45:08.266 37 ERROR nova.scheduler.utils [req-035fc933-de6b-448a-978e-c15ae171daeb a3cfa6f70675429985132daa6d3b906e 0c915a0d7601493cb1ecfd904b09f54c - default default] [instance: 52baa020-426b-4800-9492-0654b834ef2a] Error from last host: compute07 (node compute07): [u'Traceback (most recent call last):\n', u'  File "/usr/lib/python2.7/site-packages/nova/compute/manager.py", line 1863, in _do_build_and_run_instance\n    filter_properties, request_spec)\n', u'  File "/usr/lib/python2.7/site-packages/nova/compute/manager.py", line 2143, in _build_and_run_instance\n    instance_uuid=instance.uuid, reason=six.text_type(e))\n', u'RescheduledException: Build of instance 52baa020-426b-4800-9492-0654b834ef2a was re-scheduled: internal error: qemu unexpectedly closed the monitor: 2022-10-20 10:44:54.063891 7fded43821c0 -1 Errors while parsing config file!\n2022-10-20 10:44:54.063897 7fded43821c0 -1 parse_file: cannot open /etc/ceph/ceph.conf: (13) Permission denied\n2022-10-20T02:44:54.292119Z qemu-kvm: -drive file=rbd:hdd-8T-volumes/volume-41da2d70-d3bd-4187-9f60-8b262286f292:id=cinder:auth_supported=cephx\\;none:mon_host=192.168.0.75\\:6789\\;192.168.0.77\\:6789\\;192.168.0.79\\:6789\\;192.168.0.86\\:6789\\;192.168.0.89\\:6789,file.password-secret=virtio-disk0-secret0,format=raw,if=none,id=drive-virtio-disk0,serial=41da2d70-d3bd-4187-9f60-8b262286f292,cache=none,discard=unmap: error reading header from volume-41da2d70-d3bd-4187-9f60-8b262286f292: No such file or directory\n']$ R# r2 v6 o- s9 w( x
2 r6 z5 [5 \! a8 H) K

4 n9 v) b9 F% i( L4 T+ U) b应该是ceph中pool池的权限问题
0 ?7 X! ~) ]3 k$ L, O7 c5 y
 楼主| 发表于 2022-10-20 13:45:16 | 显示全部楼层
[root@controller1 src]# ceph auth caps client.nova mon 'allow r' osd 'allow class-read object_prefix rbd_children,allow rwx pool=images,allow rwx pool=ssd-volumes,allow rwx pool=hdd-2.4T-volumes,allow rwx pool=hdd-8T-volumes,allow rwx pool=nova-vms,allow rwx pool=backups'
& W+ D5 a" a$ {' z  r+ f4 T$ fupdated caps for client.nova
 楼主| 发表于 2022-10-20 14:13:36 | 显示全部楼层
0; ~1 S9 g8 H" I4 {* n" `4 ~& ^

+ M+ Q$ s9 Y3 ]8 f6 z/ `1 v! C% k7 b- c7 n
As noted in Openstack docs [1], rebuild is not supported for volume-based VMs.6 p3 k6 B& Q8 F
3 l5 m1 l$ u/ E: }
Assuming you are trying to rebuild the VM with a fresh image ("factory reset"), a slightly "hacky" solution is to replace the underlying volume with the fresh image while keeping the same pool/path.6 X* `) x6 z# F, K9 c2 A7 I

: S% t+ `) ?# g6 o0 D/ ]5 kFor Ceph based backend, it would be something like1 Z8 ^' x0 s0 x( T6 |: R

: i8 a. w, U0 {% uopenstack volume show <...> => Get pool/path from rbd backend" m$ x( h0 n" h( Y( p( u, V
openstack image show <...> => Get pool/path from rbd backend
: N, w3 W$ k+ V2 I, T. iopenstack server stop <VM> => Stop the VM
' {0 d5 _0 K5 R& j2 m' x" k8 _4 M- I/ D" }
rbd -p <POOL NAME> mv <VM VOLUME UUID>  <VM VOLUME UUID>.old
/ d) F0 z4 Y- @: r: G, frbd -p <POOL NAME> cp <IMAGE VOLUME UUID> <VM VOLUME UUID> 2 H* n& w5 N$ K' }9 i
Once the copy finishes, start the VM
5 k* P( i' }' U$ e6 n6 G
" |- }. O8 j6 G0 u9 z- V- mopenstack server start <VM>
 楼主| 发表于 2022-10-20 14:57:20 | 显示全部楼层
Nova:
1 h( F- E3 `6 [7 S1 yList of instances
% f& e/ J9 y5 I1$ ?" ~$ I5 ^$ ?( ^
openstack server list8 N) [* y# w6 L7 @0 _
2
: m. b0 E$ U7 C4 e/ S  T/ `nova list  V( C& W# \/ z: r
Details on a specific instance
) A; j( y$ v3 b4 y- ~+ C1
# k( q! d0 ^9 F) H* {# popenstack server show <server id>
4 Y! v2 L1 p( I: P# V7 P; [2! ]' J' x; c2 E6 W7 N
nova show <server id>3 S* H4 K! l8 X
Rebuild an instance
  t; K0 R$ e* n1 ?9 O" }1+ }/ Q2 P1 J; Z. {2 x/ Q( e3 j* y
openstack server rebuild --image <image-id> <server-id>
7 Y& B( V: q" G3 b  f2
7 r! Q( Q  y  p6 Rnova rebuild <server-id> <image-id>
8 h" ^0 ^8 Z# Y& U: mRebuild an instance with metadata
' ~( A( [& ]' s! M1
% o9 O' a$ C) D/ W+ v- Z' X: m0 }openstack server set --property <meta> <server-id>
& h! @  {1 L  k2 I2+ k# }2 N  O0 c/ d8 Y- D! l: u1 A
nova meta <server-id> set <meta>
% A  b) \+ w0 `1 J2 b39 {& {5 ]3 U8 P! m* q
nova rebuild --meta <meta> <server-id> <image-id>
+ ]1 t! O( i+ A  yAttach a port to an instance) R  c3 u2 ]( Y2 O: A$ T7 k
1
$ q' O* W/ q  D% a$ Snova interface-attach --port-id <port id> <instance id>+ p/ t- M! [* {) w& Q0 q* t
Create a instance from a availability zone& D; y2 n2 F# B6 y- t4 X
1
+ K# g% n& b& v" ^; @  bnova boot --availability-zone nova:metal01:<ironic-id> --flavor <flavor-id> --image <img-id> --nic net-id=<network id>,v4-fixed-ip=<ip-address> <name>3 h& X  z2 j! W+ ?
2
# u0 [: u# D, o- G9 }openstack server create --availability-zone nova:metal01:<ironic-id> --flavor <flavor-id> --image <img-id> --nic net-id=<network id>,v4-fixed-ip=<ip-address> <name>) }8 O. W& `# o; @: F# w5 K
Create a instance with meta property, sec group, fixed ip, ssh-key
, P8 q" J' M" x1  ], d5 B; N6 H& P
openstack server create --image <image id> --flavor <flavor id> --nic net-id=<network id>,v4-fixed-ip=<ip-address> --property <meta-data> --security-group <security group id> --key-name <keypair name> vmname
2 @! T, q( K- d  E5 k: {: aCreate a instance
$ F  q3 U' E1 G7 c. _) I+ L, j6 g15 |, N! C5 l3 O7 ?
openstack server create --image <image id> --flavor <flavor id> vmname& m9 T+ n4 s5 o4 O* t
Remove error state from instance - _1 x- p' w: B
17 Y3 j* ]1 `0 l7 Z- M/ a( d
nova reset-state --active <server-id>
( i8 W9 c: W! W/ h. v! s; zChange the flavour (resize)$ r  Q9 O/ l! S& e/ r, ~7 X; o
1
+ {2 m7 }, u) ?; p% e  h& Y  u) Fopenstack server resize --flavor <flavor> <ID>
1 b9 }3 F5 E' M7 }Neutron:  Y: y5 l$ e9 D5 E
List of subnets and network ID
. j+ O$ S  ^" A. A8 \  w1/ J8 V  _% ~7 O' P. g; V- }
openstack network list: C% b, Z+ @8 C4 @) T
2
- J$ H8 _1 A; s1 e0 N8 R/ tneutron net-list3 w+ _/ ~6 i2 L) l4 J
List of subnets, their IDs and allocation pools:0 N5 p& E* o! L  {
1
9 q7 J% ^5 t+ Topenstack subnet list1 j, v  r2 m+ V, S
2
0 \4 S' g5 A! H5 l9 r9 B8 M2 bneutron subnet-list  P: t' Z  f! H; t  h
List ports
0 \6 G( E( x1 y8 ]3 W1 Y$ b& z1
/ z' a7 b% ], ?# |& qopenstack port list
' h9 V: k" G  l, c4 f2
% m" o! e  E% g; @neutron port-list  Q1 S# ^" H1 G0 n% Z$ ~/ W
Create port3 G! N) q0 s( ]0 V# j0 B. R
10 B/ I- X9 r$ ]/ x$ `
openstack port create --network <network id> --fixed-ip subnet=<subnet id>,ip-address=<ip-address>6 v# e2 W3 ^6 M; j" \; Z
2
2 u) @* i2 x. B. L! bneutron port-create --fixed-ip subnet_id=<subnet id>,ip_address=<X.X.X.X> <network id> <name>5 f; V$ J" G8 |$ k. c* ]8 ^
Update or Set/Unset port) P: g; G( ]1 r" O1 B# |
1
# ~0 e) c( y! o) Qneutron port-update --fixed-ip subnet_id=<subnet id>,ip_address=<ip-address> --fixed-ip subnet_id=<subnet id>,ip_address=<X.X.X.X> <port id>
5 X: p% i& Q6 Y. R4 n2: [6 z1 }: L. M& o" V" ]
openstack port set --fixed-ip subnet=<subnet>,ip-address=<ip-address> <port id>
; h" q. m0 X! s! b4 f; h3" X) x' l3 O, [0 O: ?2 r$ g. M' v
openstack port unset --fixed-ip subnet=<subnet>,ip-address=<ip-address> <port id>
% r& I2 G6 S" D4 E- e1 _Get details on a port
- g. {3 e( b7 C2 d+ }" a7 G1' D' P7 G3 `, s& o& d
openstack port show <port id>$ p" }& k' R- ?1 l3 H( O
2% K9 v8 V  e  E. ^% @
neutron port-show <port id>
' R+ v3 D  ]  s. y3 `3 c( t6 b% }( _Allowed address pairs - (Allows one port to add additional IP/MAC address pairs on that port to allow traffic that matches those specified values.)% R  j5 e9 ^/ G  ]% I- n/ y
15 f- o2 U; i$ T1 b) G1 l# t) x7 u
neutron port-update <port-uuid> --allowed-address-pairs type=dict list=true ip_address='0.0.0.0/0': L5 J! ?$ b4 @8 ^/ R( ^! O0 d
Glance:" g+ ^) }9 p. {& j5 J, F9 ^
List images" ?1 u3 X6 u. z; b. @$ O7 w  c9 Q# M
1
& u/ [- s6 h* g$ {  P8 popenstack image list! M8 S5 O# D8 O& }
2; U2 M4 p7 ]8 ?' X0 A( F
glance image-list* ^4 u# K8 r, K6 l$ l/ f. D& [
Get details on an image
1 Z$ I) b6 w3 O4 G+ l% w1! E$ s: A7 l  V, [0 V: s. Z; J
glance image-show <image id>  [' r7 q' O$ f! @* {& u& k! u
Upload a image9 M: R8 o. n/ s* \1 |3 {4 I" R
1
2 u5 {* L( p' Z, i, G, [$ X/ Dopenstack image create --disk-format qcow2 --container-format bare --public --file ./centos7.qcow2 centos7-image2 m. b2 l1 Y! r4 P8 b9 B' x3 p
Delete
1 B7 h; D8 G4 R12 z) W/ B9 Z" X! d! A3 m) V+ q
openstack image delete <ID>) Z% m& n6 z/ q# X) d4 D
Download a image6 W% B: y  I7 d
13 T( r" B( o5 s  D( s$ }8 |, |
glance image-download <img-id> --file img.qcow2
9 Y7 `2 \  e6 s  sChange state
2 K' y6 F3 \. s$ H1 x  P1 M14 b* M# w' ]% d) d) m; t) K! @
cinder reset-state --state in-use <id>% f+ \# ?3 Z- I4 _$ Y! \
Other:* Z' D' j! K3 X, x  `" V
List flavors
* R) R9 M9 Y: z' r* y  n5 v  N$ ]12 b$ m+ |4 ^+ {3 p) B7 C
openstack flavor list1 i/ z: g! I  A9 n
List keypairs, b0 @/ a8 ?2 K$ n: b( N
1
  n' {. S" I& E% Kopenstack keypair list
1 j0 W$ e! C; o/ E' R$ e8 eList Security groups
' C9 w/ T) ^1 a1 f" E' A1
- k, F; k$ N3 Copenstack security group list
& m# |& T! ^+ C: z4 cCinder% |0 ?5 n: H4 Q+ k2 t( m6 S- H
1
1 N9 r- }; g3 _; hopenstack volume set --state error <id># b5 R+ L  z* v8 \! i5 L3 c
Stop a migraion  i( u: y# D! J
6 q! [* u1 P( p  a
Remove the active volume from the migration state  _) X' S/ J( l, \
2 k% P+ Z" H' i$ {( _7 a
1
: I# A) F# G9 ~* }: Hcinder reset-state <id> --reset-migration-status
( }3 w; w5 u( D# R& Ufind the volume in the attaching state and remove it7 W0 t7 \" I- J# K% k8 t/ W

0 s4 {7 k. h' i9 a# \# P1
! e, b* \2 @- l, t! Uopenstack volume list
" Y8 l  F0 p& N, w1! C6 z4 i3 ~. L  t+ M* @! r' I
cinder reset-state <id> --state error9 S* q+ B( L# f! S6 g5 n2 a
1
4 V+ T& Z$ x5 h" g4 Ucinder reset-state <id> --reset-migration-status
) l8 n  _" {* N. e) @' {openstack volume delete <id>
* c& k) B  w* T8 \1 ~5 Y1
  G& d6 l1 c' Y( q+ w/ K( Zopenstack volume delete <id>
您需要登录后才可以回帖 登录 | 开始注册

本版积分规则

关闭

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

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

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

GMT+8, 2026-4-8 20:57 , Processed in 0.047026 second(s), 23 queries .

Powered by Discuz! X3.4 Licensed

© 2012-2025 Discuz! Team.

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