找回密码
 注册
查看: 1655|回复: 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
9 w* r0 Y+ z9 ^4 \2 Y; }( Xerror: Failed to define domain from centos7.9.xml
7 A7 w$ ~: A3 W( c: t. r0 Z; S3 Cerror: (domain_definition):140: AttValue: " or ' expected
# q1 H! P, R5 {% ^" y# X" q       <mac address=/>' t/ Z% A* q' L8 v. r# H, q) v
--------------------^
0 D& W% c0 Q0 m2 e+ D6 ~, g# virsh define centos7.9.xml 9 E5 [& D& [$ d* u3 G& ^
error: Failed to define domain from centos7.9.xml; h( n% p) Z  _9 d2 p
error: XML error: unable to parse mac address ' '
$ b4 A* E. i8 v; k9 u! p% n" w删除报错行
  A- P/ q% j; M+ M- e5 T(nova-libvirt)[root@compute01 images]# vi centos7.9.xml
: R3 t3 H  }, v# n& }2 j% d- m9 L5 a( |  H+ r0 L( K+ J
    <interface type='bridge'>: p% g* _; Q, q' y
    <mac address=''/>    ### 删除这行:# r& R$ q1 j+ }9 s9 S
       <source bridge='brq039d8d36-65'/>
. @: m. }7 l! c. F2 H# o7 F(nova-libvirt)[root@compute01 images]# virsh define centos7.9.xml
* H# }- f: j& g7 G$ y1 P5 \5 Lerror: Failed to define domain from centos7.9.xml9 U( R3 _; A5 g( A
error: XML error: unable to parse mac address ''& ~0 N* |9 K' c3 i4 V

! d- Z; W. W9 A6 \(nova-libvirt)[root@compute01 images]# vi centos7.9.xml
* F" c4 _3 U6 c# u5 t. T(nova-libvirt)[root@compute01 images]# virsh define centos7.9.xml 8 F" M! _; [' q- {0 b% Z$ C
Domain centos7.9 defined from centos7.9.xml3 `' X* @1 m% V% Q3 P
(nova-libvirt)[root@compute01 images]# virsh list
* _4 N$ S9 \9 Z3 L! U6 t8 V# D, ` Id    Name                           State
) P+ J7 Q8 X; V0 f----------------------------------------------------
! v5 ?3 ]8 |3 Q 3     instance-00000059              running
9 A7 I) o* F; u5 O% r2 ~/ \(nova-libvirt)[root@compute01 images]# virsh list  --all
  B0 b3 s6 I$ w Id    Name                           State
* V  h5 s  L6 K4 m: p3 g( {----------------------------------------------------7 a1 O# I' W) H) p
3     instance-00000059              running+ s6 w% s6 p4 S! v4 \( q# c
-     centos7.9                      shut off
8 ?, u& O/ ]( r6 u% \' O
6 z; S, B% L& r9 W- B3 s问题解决。. J' f0 F$ Y# E" G6 E

* I( U4 n( i/ Y/ M/ L1 C- X

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 02:48 , Processed in 0.016300 second(s), 23 queries .

Powered by Discuz! X5.0

© 2001-2026 Discuz! Team.

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