|
Today VMWare WorkStation9 installed CentOS7 virtual machine. The virtual machine and the host network connection in three ways: bridging mode, NAT mode, and Host Only mode.
Explain specific three models can be found to many on the network.
1, bridge mode settings:
I used here is bridging mode, the virtual machine Edit-> Virtual Network Editor configuration can be seen in bridge mode default Vmnet0 virtual card, here we choose bridge card. (Automatic fact, I tried it also possible)
Then install CentOS7 virtual machine, the installation process is not much to say, to configure the network card is installed, to enable it!
After installation is complete, the virtual machine right settings-> network Adapter is set to bridge mode, start the virtual machine, open the network can see the default settings "Wired" mode is enabled, DHCP mode automatically.
Then you can between the host and ping each other!
Note: If the second bridge mode is activated and needs to close, this one does not work, the virtual machine off the bottom right of the screen can be seen, "bridge" will not be turned off and the "wired" will disconnect.
For example, I can not communicate with each set as follows, according to the virtual machine and the host
Back to the "wired" connection, which modify the DHCP connection is manually set up and host a network segment, the same can communicate!
2, a copy of the virtual machine network problems CentOS7
I have to set up Hadoop, spark similar clusters, so the above virtual machine installed a copy, when activated by selecting the "I moved it". Copy over a copy of the start of the IP also changed.
But we found that: the original copy of the virtual machine and the virtual machine can not start, when both started to communicate with each other only to start the virtual machine and the host! ! !
The first start that off, then after the start and then restart the virtual machine network card, start the host can communicate with each other and the.
One does not know, I looked at the network configuration file, in addition to the two other are the same IP
Through ifconfig -a also looked at, but also in addition to other IP are the same.
You can see the configuration file a UUID, I began to wonder whether this is not the same, then delete the copy of the virtual machine priority connection, a re-created, it is not the same UUID, or not found.
I do not know why, what principles can only lead to a host network and communicate with each other when the original copy of the virtual machine and the virtual machine at the same time online? ? ? |
|
|
|