Bridging settings and problems for CentOS7 virtual machines

Source: Internet
Author: User

Bridging settings and problems for CentOS7 virtual machines

Today, the CentOS7 virtual machine is installed in VMWare WorkStation9.

There are three ways to connect a VM to a Host: Bridging, NAT, and Host Only.

The three modes can be found on the Internet.

1. Bridging Mode settings:

Here I am using the bridging mode. in the configuration of the Virtual Machine Edit-> Virtual Network Editor, we can see that the Vmnet0 Virtual Nic is used by default in the bridging mode. Here we choose to bridge the NIC. (In fact, it's okay if I try Automatic)

VcrHxvTTw7XEo6xESENQt73Kvc6q19S2r6GjPC9wPgo8cD48aW1nIHNyYz0 = "http://www.2cto.com/uploadfile/Collfiles/20150610/2015061010112667.png" alt = "\">

In this case, you can ping the host machine!

Note: If the second bridge mode is enabled and you need to disable it, it does not work. You can see that the network in the lower-right corner of the Virtual Machine screen is disconnected. The bridge mode will not be disconnected, "Wired" will be disconnected.

For example, if I follow the settings below, the VM and the host cannot communicate with each other:

Return to the "Wired" connection method and change the DHCP address of the connection to manual. You can set a network segment with the host to communicate with each other!

2. network problems with copying CentOS7 virtual machines

In order to build a cluster similar to hadoop and spark, I copied the virtual machine that was installed above and selected "I moved it" at startup. After copying the started copy, the IP address is changed.

However, it is found that the original Virtual Machine and the copy virtual machine cannot be started at the same time. when both are started, only the first started Virtual Machine and the host machine can be interconnected !!!

Turn off the one that was started first, restart the Virtual Machine NIC that was started later, and then start the VM again to communicate with the host machine.

I don't know. I checked the network configuration file. The two are the same except for the IP Address:

Also passedIfconfig-Let's take a look at it. It's the same except for the IP address.

We can see that there is a UUID in the configuration file. I began to wonder if this cannot be the same, so I deleted the priority connection of the replica Virtual Machine and re-created it so that the UUID is different. I found that it still does not work.

I don't know why, what is the principle that only one network can communicate with the host machine when the copy Virtual Machine and the original virtual machine are online at the same time ???

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.