2024年4月25日星期四

[LINUX]Install CentOS on VMWare can not enable network connection

 Tested install CentOS7 on an old VMWare with ESXi 5.5.

After change VM resource memory more than 2 GB, installed CentOS7 successfully.

But anyway, I can not get the network work.

I checked any possible reason, including but not limited to VM resource, VM network, Device on CentOS, etc., everything is working fine. But CentOS will have no network.

BTW, configure on CentOS also setup properly like below: (let's suppose that you have the interface as enp0s3 with the static ip 192.168.1.11/24)

nmcli d  ## to check which interface you are using.

nmcli c modify enp0s3 ipv4.address 192.168.1.11/24  ## setup ip

nmcli c modify enp0s3 ipv4.gateway 192.168.1.1 ## setup default gateway 

nmcli c modify enp0s3 ipv4.method manual  ## static ip

It will change [BOOTPROTO=dhcp→none]

sudo systemctl restart networkmanager

Does it seem fine?

No, there is a very important thing.

You have to enable the network interface first via below:

nmcli c m enp0s3 connection.autoconnect yes 

It will change [ONBOOT=no→yes], or the interface will not work as you expected. 


You may also need below step to confirm the network to see if it can working fine.

Show network configuration.

nmcli d show enp0s3

Edit host file to obtain your host name with your ip.

192.168.1.1 your_router_name #router

192.168.1.11 your_hostname #

Confirm [/etc/resov.conf], it should show something as below:

nameserver 192.168.1.1

Then ping local and remote URL to see if the DNS can resolve the domain name and get ICMP traffic from them. 

 

没有评论:

发表评论