WIN10 + vmware-centos7 file sharing, network connectivity

Source: Internet
Author: User

First, the goal

Environment:

    • Host-Windows Ten, 64-bit (Build 10586) 10.0.10586 (physical machine);

    • Client-centos7,centos-7-x86_64-dvd-1511 (virtual machine);

    • Virtual machine Software-VMware Pro 12.0.0 build-2985596 (software that hosts the client);

Goal:

    1. File sharing

      Create a shared folder so that the host can share files with the client .

    2. Network connection

      The host and client are joined to a local area network, so that the client can access the Internet and also can communicate with the host network .

Second, file sharing
    1. First click on the virtual machine (M) option on the menu bar, select Settings (S) ...

    2. Then, in the window that appears, press action

      i.e. (1. Folder sharing is turned on, and then (2. A folder on a host was selected.

    3. It's not over yet, it's usually inaccessible, and you'll need to reinstall VMware Tools (T) ...

    4. "Click" After a moment, CentOS7 will show A (analog) disc was found, which is placed in the VMware Tools installation package.

    5. Next, unzip and install, extract vmwaretools-10.0.0-2977863.tar.gz to any directory (I unzipped it into the/usr/local next new directory)

    6. To the extracted directory, find the vmware-install.pl, run it. I used to run it in Terminal ./vmware-install.pl , then follow the installation and ask for a return.

    7. Once this is done, you can /mnt/hgfs find the host shared folder you previously set up, such as my name Sharefile. (If you don't have to try to restart CentOS then check it again)

Third, the VMware Network

We know that the host is connected to the LAN and the Internet through a physical network card. For a virtual machine, it must also have a virtual network card, but this virtual network card must not be directly connected to the network, but with the help of physical network card.

    1. Network connection Mode
      VMware provides the following three ways to connect a virtual NIC to a physical network card:

      • Bridge-Bridging
      • NAT (network address)-transformation
      • Host only-Master mode

    2. Virtual Network
      The above is just the way that you can use it in VMware to build: virtual Networks .

      By default, there are two virtual networks (VMnet1, VMnet8). Click Edit (E) in the menu bar, and then select Virtual Network Editor (N) ..., which you can edit.

      (By default, a VMNET8 network with NAT mode is selected after a new virtual client is created; Of course, the network can also customize new)

      Here you can see an important message: The subnet address of both networks.
      What's the use of it?
      For example, if a virtual client uses a VMNET8 network, its IP is automatically set to one of the 192.168.190.0-192.168.190.255. (Of course, you can also customize the IP, in addition, 192.168.190.1 was VMnet8 itself, 192.168.190.255 should be the broadcast address;)

    3. Virtual network card

      With the network, virtual machine virtual network card only need to select a network and join on the OK.

      It also says that the virtual machine uses the NAT network by default, which is VMnet8. You can use ifconfig -a the command to view the network card status of the current virtual machine (eno16777736):

      You can see that the IP of my virtual machine is 192.168.190.129;

Iv. network communication, LAN
  1. Default condition

    In fact, if you are the default to install a virtual machine without doing a custom network operation, the virtual machine client will default to:

    Nat mode connection, select VMnet8 Network, virtual one NIC connection VMnet8 network.

    No setup is required at this time, the client can surf the Internet, and the LAN communication can be made between multiple clients, between the client and the host.

  2. Manually set

    However, sometimes something strange happens that causes the inability to communicate. At this point we can manually set up the network to solve, the following is a way- NAT.

    1. First, the Client NIC settings select NAT:

    2. Second, open the network settings in the host, change the adapter settings, then "right-click" The physical machine has an Internet connection network card (Ethernet or wireless network) and then select the Sharing tab, do the following settings, to share the Internet network to VMNET8:

    3. At this point, open the properties of the VMnet8 NIC in the host, select Tcp/ipv4 to see that its IP is set to 192.168.137.1. Use it to set the line, or you can change it yourself:

    4. Finally, set up the virtual client, select Virtual Network editor (N) ...


      Set the subnet IP for VMNET8 to: 192.168.137.0

      Modify the start IP and end IP of the DHCP settings:

      The gateway IP that modifies NAT settings is: 192.168.137.1

    5. There is one final setting that ensures that /etc/sysconfig/network-scripts/ifcfg-eno16777736 the

      BOOTPROTO=dhcpONBOOT=yes
      • 1
      • 2

      If the original is not changed, and then restart the service network restart network, here should be no problem.

      • 20160618 Update
        It turns out that as soon as you turn the VMware software off, all the virtual machine network settings expire ...
        Workaround: No time to study, a temporary solution is that each time you open VMware, the virtual Machine Network editor to restore the default settings, although the virtual machine inside each time the IP address will change, but! No time! Get in the car!

WIN10 + vmware-centos7 file sharing, network connectivity

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.