Unix & Linux Asked by Ned64 on February 11, 2021
I have a VM which is connected to a network with DHCP etc.
Whenever I boot the VM the virtual Ethernet connection is DOWN. I need to log in by console and run dhclient eth0
to enable it. Every time. I wish to enable eth0
upon boot.
This is /etc/sysconfig/network-scripts/ifcfg-eth0
:
TYPE=Ethernet
PROXY_METHOD=none
BROWSER_ONLY=no
BOOTPROTO=dhcp
DEFROUTE=yes
IPV4_FAILURE_FATAL=yes
IPV6INIT=yes
IPV6_AUTOCONF=no
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
IPV6_ADDR_GEN_MODE=stable-privacy
NAME=eth0
UUID=11111111-2222-3333-4444-5555555555555555
DEVICE=eth0
ONBOOT=yes
HOTPLUG=yes
NM_CONTROLLED=no
DHCPV6C=yes
IPV6_PRIVACY=no
USERCTL=no
GATEWAY=10.0.0.1
DNS1=9.9.9.9
DNS2=1.1.1.1
I thought that ONBOOT=yes
was the important bit here but it is ignored completely. Who reads this file? Perhaps that’s the culprit.
The HOTPLUG=yes
I only added in the hope that this would help (perhaps interface coming up late…) but it does not.
I set NM_CONTROLLED=no
because I have no NetworkManager service (server, no user-management allowed or needed).
My question is: What is wrong with my config file or what setting
would help?
What is wrong with your config file is not clear for me.
But, using CenOS 8, a suitable setting to help you could be to use NetworkManager, since network scripts are deprecated:
RHEL 8 Deprecated Network Scripts
Answered by marcio on February 11, 2021
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP