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

ubuntu 经常出现创建kvm虚机时报错ERROR Cannot get interface MTU on 'br0': No such device

[复制链接]

1

主题

0

回帖

12

积分

管理员

积分
12
QQ
发表于 2023-9-9 15:00:01 | 显示全部楼层 |阅读模式
root@compute01:/usr/src# virt-install --name=Windows2019_x86  --ram 8192 --vcpus=4 --disk path=/usr/src/Windows2019-x86.qcow2,format=qcow2,size=15,bus=virtio --accelerate --cdrom /usr/src/cn_windows_server_2019_x64_dvd_2d80e042.iso --vnc --vncport=5906 --vnclisten=0.0.0.0 --network bridge=br0,model=virtio --noautoconsole
1 m, \7 {' _4 d) z, h' h& v1 A! t
Starting install...
0 a0 H7 e# K8 x. BERROR    Cannot get interface MTU on 'br0': No such device
6 v4 {$ Q; `% ~Domain installation does not appear to have been successful.
& {) `  z( b( C) Y, Q4 |; LIf it was, you can restart your domain by running:
6 x8 n. G- T! A# T; U& b  virsh --connect qemu:///system start Windows2019_x86
; F% p2 G" A0 [otherwise, please restart your installation.
1 w7 B) O; Q; L4 r2 }
1 F1 J" g* l! Q# U3 D, w. V创建失败:有问题,检查网卡:, Q9 [" v6 `3 e" k6 Z

" d/ W( j6 c; \- eroot@compute01:/usr/src# ip addr
( y4 O6 y. [" h9 c$ q  }3 T  O; S1 x1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000/ p5 m% }$ k0 d3 S) \, `
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
. @* k; s$ S5 K    inet 127.0.0.1/8 scope host lo
# u- k4 i* R) _& G  t- \( K5 f       valid_lft forever preferred_lft forever
2 u+ b  I  S1 e% c; O& H1 n- [" V1 {' H    inet6 ::1/128 scope host
/ S- C, `' J+ ~" k# A2 ^       valid_lft forever preferred_lft forever: r, _* o2 d0 X4 L  \
2: enp8s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 10003 p' G6 y2 ~% |4 i
    link/ether 00:e0:4c:68:10:89 brd ff:ff:ff:ff:ff:ff  p" U2 @8 ?8 R  g. q) N. B
3: enp9s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 10001 \6 B/ ]+ O% P6 j0 e) d' f. M
    link/ether d8:50:e6:4a:41:b2 brd ff:ff:ff:ff:ff:ff
. l5 g) C' l4 `    inet 198.192.168.66/24 brd 198.192.168.255 scope global enp9s0
, x6 I2 C% q6 o6 m6 {       valid_lft forever preferred_lft forever3 T: j' O2 b$ j
    inet6 fe80::da50:e6ff:fe4a:41b2/64 scope link
- ?9 i8 D# @+ P0 [9 V       valid_lft forever preferred_lft forever% h' e. u: ~9 J
4: enp2s0f0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
( I; A' f) E) q7 H0 X    link/ether 04:25:c5:2a:57:13 brd ff:ff:ff:ff:ff:ff
) g: J* ?* D' |$ v7 c+ l3 j    inet 192.168.8.66/24 brd 192.168.8.255 scope global enp2s0f0
) S1 N0 t9 M& j0 {- v- E* Q7 X       valid_lft forever preferred_lft forever$ z  M  q  B( @8 a: _& [
    inet6 fe80::625:c5ff:fe2a:5713/64 scope link , h" i; [$ c, K
       valid_lft forever preferred_lft forever
! f5 n: z- G! d0 N: h: r" E# j5: enp2s0f1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN group default qlen 1000" Q$ H1 a. ]2 y2 H' a( R
    link/ether 04:25:c5:2a:57:14 brd ff:ff:ff:ff:ff:ff6 P& \5 B, Z1 |. w% y8 P
11: vnet2: <BROADCAST,MULTICAST> mtu 1500 qdisc fq_codel state DOWN group default qlen 1000
* M  S3 S0 _  O+ V    link/ether fe:54:00:90:65:d2 brd ff:ff:ff:ff:ff:ff: z( s! \8 E6 y+ V' p" y2 r

1 d* N* ]$ m9 Z) {% k2 T重新配置网络:
" g9 Q$ N% v$ J7 y6 l1 _3 p, i3 f
! ~2 K: C% G- Z$ @/ v7 Sroot@compute01:/usr/src# netplan apply
3 H5 V% v$ c( U& L. I; r
9 ~# ?; H9 Z2 j. O+ Z* E7 i. D** (generate:6407): WARNING **: 13:00:50.842: `gateway4` has been deprecated, use default routes instead.( ]) a/ x' L/ G! B8 E
See the 'Default routes' section of the documentation for more details.
" O2 D) g) J5 V" z) z0 t- d9 Q* l* ^& `. i! h' a
** (process:6405): WARNING **: 13:00:51.287: `gateway4` has been deprecated, use default routes instead.7 L" x; S# z6 c1 N+ j4 P+ t
See the 'Default routes' section of the documentation for more details.
) B# w* U. \; c" d
9 W/ o! q+ _: x( R7 z' c+ H6 ^** (process:6405): WARNING **: 13:00:51.298: `gateway4` has been deprecated, use default routes instead.
2 \' w0 r  V9 P3 FSee the 'Default routes' section of the documentation for more details.. b7 w0 h+ G0 e0 h, ]' H

( l) o! q2 [9 g8 a8 R5 ]' X** (process:6405): WARNING **: 13:00:51.684: `gateway4` has been deprecated, use default routes instead.
' Q6 g' N8 _( w0 v" E, O2 ^7 w4 lSee the 'Default routes' section of the documentation for more details.
0 j$ ~  u/ B& ?: v; y0 n7 R$ `1 n7 n$ S8 u8 P
** (process:6405): WARNING **: 13:00:51.685: `gateway4` has been deprecated, use default routes instead./ \( k. [8 G  p) Y4 T! t
See the 'Default routes' section of the documentation for more details.0 ~  ^! z: S) d% {

) A7 H$ W# d" d- z8 x% V$ i2 O# C$ L' x/ z
再重试,问题解决。% h$ K+ h2 e8 R6 b7 ^, j
root@compute01:/usr/src# virt-install --name=Windows2019_x86  --ram 8192 --vcpus=4 --disk path=/usr/src/Windows2019-x86.qcow2,format=qcow2,size=15,bus=virtio --accelerate --cdrom /usr/src/cn_windows_server_2019_x64_dvd_2d80e042.iso --vnc --vncport=5906 --vnclisten=0.0.0.0 --network bridge=br0,model=virtio --noautoconsole
( o0 E8 x2 ^' V6 n7 t( b+ V3 z5 [' J* G
Starting install...
! H- U: f; Q  Q! u( lCreating domain...                                                                                                                                         |    0 B  00:00:00     
) J2 }( @4 d' i& e" Y$ J( \: S
  k9 E4 P1 {/ z1 b( q7 G- NDomain is still running. Installation may be in progress.0 F- i& w4 B* b9 x6 S
You can reconnect to the console to complete the installation process.
6 u/ }0 ~! v+ ^, E) I8 D* }3 g  F  G: g* p2 s/ q1 h1 F- V5 O& y
% L# ~. r  ]+ W: Z( ^# k" g" Q# E

1

主题

0

回帖

12

积分

管理员

积分
12
QQ
 楼主| 发表于 2023-9-9 15:00:02 | 显示全部楼层
ubuntu server 版本经常出现这样的问题。: K6 A7 S! T0 E: H6 p  M

, K! I" Q# L# r+ x' ?) q- ^# lsb_release -a1 y. `0 B& @$ y$ I
No LSB modules are available.+ w5 y0 k! K$ ~% C& j
Distributor ID:        Ubuntu
( ]  ~. W7 S, z4 aDescription:        Ubuntu 22.04.2 LTS0 D' q8 D+ y$ a- \1 l0 e- X
Release:        22.04
! _3 s/ y7 B) F; Z2 W: X7 ICodename:        jammy  `: u. t; Z& M
! I/ }! K8 @8 Z$ v3 b, E1 F
不太成熟的版本。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-6-12 02:52 , Processed in 0.016932 second(s), 22 queries .

Powered by Discuz! X5.0

© 2001-2026 Discuz! Team.

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