虚拟机bridge模式下每次启动都需要重新激活网卡

来源:互联网 发布:linux usb声卡驱动 编辑:程序博客网 时间:2024/05/14 08:49

[root@localhost ~]# more /etc/rc.local //我在网上搜到的,把那个ifup命令加了进去
#!/bin/sh
#
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style init stuff.

touch /var/lock/subsys/local
ifup eth0

重启后就网卡就自动激活了

我在下面的配置界面中,勾选了那两个选项,然后保存,再重启后就好了