MacOS install Virtualbox, CentOS, how to configure the network?
Unlike on the Windows platform, Virtualbox can automatically create two virtual network cards vmnet1 and vmnet8 after installation on the Mac. If you need a virtual machine to connect to the Internet, and you can access the virtual machine network in the Mac, the simple way is to create two network cards: a NAT Network, A HOST only Adpater.
The vm interface provides a direct creation entry, just click to create it.In the virtual machine, Adpater1 and Adpater2 set up these two networks respectively.
Boot into CENTOS and see if the two network cards can be recognized. If they are recognized, confirm the network address, get directly configured with a static address, and one is automatically obtained:
/etc/sysconfig/network-scripts/
ifcfg-enp0s8 ifcfg-enp0s3
TYPE=Ethernet
PROXY_METHOD=none
BROWSER_ONLY=no
BOOTPROTO=static
IPADDR=192.168.56.100
NETMASK=255.255.255.0
NETWORK=192.168.56.0
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
IPV6_ADDR_GEN_MODE=stable-privacy
NAME=enp0s3
DEVICE=enp0s3
ONBOOT=yes
Restart the network:
systemctl restart NetworkManager
Recommended Posts