虚拟机网络设置

发布时间:2026/7/19 3:30:07
虚拟机网络设置 一、虚拟机网络调整1.每次运行虚拟机时必须使用管理员身份打开2.调整虚拟机网络在编辑中找到虚拟网络编辑器仅主机模式NAT模式二、安装Linux环境rhel9.81.编辑设置2.启动设置并安装三、调整虚拟机网卡识别1.调整内核参数[rootlocalhost ~]# grubby --update-kernel ALL --args net.ifnames02.更改网卡配置文件[rootlocalhost ~]# vim /etc/NetworkManager/system-connections/ens160.nmconnection[connection]ideth0 #链接名称typeethernetinterface-nameeth0 #设备名称[ethernet][ipv4]methodauto[ipv6]addr-gen-modeeui64methodauto[proxy]3.重启系统[rootlocalhost ~]# reboot4.验证四、关闭SElinux1.更改selinux状态配置文件及内核参数[rootlocalhost ~]# vim /etc/sysconfig/selinux[rootlocalhost ~]# grubby --update-kernel ALL --args selinux02.重启系统[rootlocalhost ~]# reboot3.验证