Bug 2502 - [Anolis OS 23 Preview][qemu][kvm][x86-64] 安装后,网络配置失败
Summary: [Anolis OS 23 Preview][qemu][kvm][x86-64] 安装后,网络配置失败
Status: RESOLVED BYDESIGN
Alias: None
Product: Anolis OS 23
Classification: Anolis OS
Component: Images&Installations (show other bugs) Images&Installations
Version: 23.0
Hardware: All Linux
: P3-Medium S3-normal
Target Milestone: ---
Assignee: xuchunmei
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-10-21 18:22 UTC by wanqian
Modified: 2022-10-24 15:52 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description wanqian alibaba_cloud_group 2022-10-21 18:22:27 UTC
Description of problem:

物理机信息: 机型:F52  
使用的qemu-kvm & virsh 创建 虚拟机 启动iso镜像后.
网络模式:桥接模式

创建虚拟机后,未发现 /etc/sysconfig/network-scripts 这个文件目录.
临时配置ip失败.
ipadd <ip>/24 dev ens3  配置ip
ip route add default <gateway> 配置路由,报错:
Error: Nexthop has invalid gateway



Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:
网络不通

Expected results:
网络可用

Additional info:
Comment 1 xuchunmei alibaba_cloud_group 2022-10-21 18:36:47 UTC
23上面网络服务都是NetworkManager,不再有/etc/sysconfig/network-scripts 。
另外网络服务默认应该是开启并且网卡默认是up的。检查看下NetworkManager服务状态。
Comment 2 wanqian alibaba_cloud_group 2022-10-21 19:02:07 UTC
(In reply to xuchunmei from comment #1)
> 23上面网络服务都是NetworkManager,不再有/etc/sysconfig/network-scripts 。
> 另外网络服务默认应该是开启并且网卡默认是up的。检查看下NetworkManager服务状态。
这个服务是启动状态的.
NetworkManager不是也是通过这下面的网络配置来创建配置和连接的么. 现在的需求是需要配置一个静态的指定的ip. 
上面临时的配置不生效
Comment 3 xuchunmei alibaba_cloud_group 2022-10-21 19:04:40 UTC
/etc/NetworkManager/system-connections/目录下的网卡配置文件中配置。
Comment 4 wanqian alibaba_cloud_group 2022-10-24 10:25:17 UTC
(In reply to xuchunmei from comment #3)
> /etc/NetworkManager/system-connections/目录下的网卡配置文件中配置。

好的. 
这个临时配置的问题,还是存在的. 
arm上正常,没有这个问题.
临时配置ip失败.
ipadd <ip>/24 dev ens3  配置ip
ip route add default <gateway> 配置路由,报错:
Error: Nexthop has invalid gateway
Comment 5 wanqian alibaba_cloud_group 2022-10-24 15:51:01 UTC
在另外的一个环境里,网络配置未出现此问题. 那么,这个先关闭了吧.
Comment 6 xuchunmei alibaba_cloud_group 2022-10-24 15:52:46 UTC
Anolis OS 23上面网络服务通过NetworkManager,修改配置需要修改/etc/NetworkManager/system-connections/目录下的配置