Set up a CentOS network with Virtualbox on MacOS

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

Set up a CentOS network with Virtualbox on MacOS
How to set up a firewall with UFW on Ubuntu 14.04
Detailed steps to set up a Git server on CentOS
How to set up SSH keys on CentOS 8
How to set up a DNS server on Ubuntu 18.04
Centos7 set up GitBook environment
Centos6 set up GitBook environment
centos6.9 rabbitmq set up SSL
install virtualbox on centos server
Centos network settings in virtualbox
How to set up an Apache virtual host on CentOS 7
How to set up a Masterless Puppet environment on Ubuntu 14.04
How to set up a production Elasticsearch cluster on Ubuntu 14.04
How to set up password authentication with Nginx on Ubuntu 14.04
CentOS 7 set up NTP, SSH service
How to install Virtualbox on CentOS 8
How to set up the Nginx server configuration block on CentOS 8
Install WordPress with Caddy on CentOS
How to set up Gogs on Ubuntu 14.04
Protect Apache with Let's Encrypt on CentOS 8
How to set up R on Ubuntu 14.04
How to set up Shiny Server on Ubuntu 14.04
K8S: (1) A preliminary study on CentOS stand-alone deployment
CentOS 8 complete steps to set up automatic updates
How to set up time synchronization on Ubuntu 18.04
How to build a LAMP environment on centos7.2
How to install VirtualBox client extension on CentOS 8