找回密码
 注册
查看: 1656|回复: 1

virsh define 虚机报错:error: Failed to define domain from centos7.9.xml error: XML e

[复制链接]

1

主题

0

回帖

12

积分

管理员

积分
12
QQ
发表于 2021-11-1 11:27:34 | 显示全部楼层 |阅读模式
# virsh define centos7.9.xml % z# F2 d+ c$ }) N  R! }
error: Failed to define domain from centos7.9.xml
/ v- r2 K! _  K0 k4 V, Merror: (domain_definition):140: AttValue: " or ' expected  j! n0 N8 n8 A, {% N7 @  P
       <mac address=/>
1 \" m" w/ x" |--------------------^
# n% m8 [" h" t6 p& j# virsh define centos7.9.xml + n. b- j' u" `. [$ f% U8 }
error: Failed to define domain from centos7.9.xml
+ K( `( k7 X0 N; }error: XML error: unable to parse mac address ' '0 C$ @( \  m  e7 B" J1 }! L% S
删除报错行7 {) D% v0 G5 N2 q0 U. S" @0 V* E
(nova-libvirt)[root@compute01 images]# vi centos7.9.xml
, c+ _% g# P" t% {/ t/ I& R. r* {2 c8 Q0 \" P
    <interface type='bridge'>/ ~! Y4 z, j  p
    <mac address=''/>    ### 删除这行:3 e5 u9 x6 b6 j4 @3 x% Y1 O& ^% r, F
       <source bridge='brq039d8d36-65'/>
4 I" i! f2 @( |. w0 q(nova-libvirt)[root@compute01 images]# virsh define centos7.9.xml
% A3 E+ ~1 V9 R% _4 B" v2 ^error: Failed to define domain from centos7.9.xml
5 w) e! o* z* ^9 R" berror: XML error: unable to parse mac address ''
& Z- p! v4 J& ?. b4 L$ r3 _- u  [7 _, Q- K: }( |7 o$ Z1 d) V, R
(nova-libvirt)[root@compute01 images]# vi centos7.9.xml
8 E4 y  `9 @- S, x, q; K(nova-libvirt)[root@compute01 images]# virsh define centos7.9.xml 9 K- L. M3 `$ K% v
Domain centos7.9 defined from centos7.9.xml: c3 f1 m0 M- ]- q, t7 H9 q- X
(nova-libvirt)[root@compute01 images]# virsh list / T/ r  m8 K9 n# H4 _, O
Id    Name                           State
# y) i. N3 Q9 k4 T6 H; o----------------------------------------------------
5 F7 `6 b- z7 _ 3     instance-00000059              running
, b* _( z& O3 [- M3 n/ ~(nova-libvirt)[root@compute01 images]# virsh list  --all' e. b0 {4 F) M5 G0 n
Id    Name                           State0 D& F9 S7 N1 A& a4 P) K! E! |
----------------------------------------------------- n2 E3 d1 J; D- @+ d; W0 P1 |
3     instance-00000059              running* m. M) u- L/ P7 d4 n) M; ?3 [
-     centos7.9                      shut off
$ u# T  R# V6 q6 D8 R2 S, o; h( H* K6 O- b4 c6 J
问题解决。
' A: e, X) k9 \( T1 z
+ c0 P* \  ?3 R8 k$ j& \. `

1

主题

0

回帖

12

积分

管理员

积分
12
QQ
 楼主| 发表于 2021-11-1 11:28:01 | 显示全部楼层
http://www.bbs168x.cn/forum.php? ... 2&highlight=xml   创建步骤可以参考此出。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

返回首页|Archiver|手机版|小黑屋|易陆发现技术论坛 ( 蜀ICP备2026014127号-1 )

GMT+8, 2026-6-12 03:51 , Processed in 0.020932 second(s), 23 queries .

Powered by Discuz! X5.0

© 2001-2026 Discuz! Team.

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