Explanation of VMware virtual machine and three network models

2.1.1 Virtual Machine Concept

   Virtual Machine (Virtual Machine) is a computer system simulated by software. It has independent and complete system functions, no difference in use with real computers. Using virtual machine software, one or more virtual machine systems can be created on one PC. After the operating system is installed and started, multiple virtual machines can run simultaneously without interfering with each other. There are common application scenarios in life. For example, a macOS computer system is installed through virtual machine software on a Windows computer, so that two different operating systems can be used simultaneously according to needs. The application scenarios at work are the most abundant, mainly to build servers through virtual machine software to meet the needs of Internet and software development and testing applications.

2.1.2 Introduction to common virtual machine software

   In the market, there are many virtual machine software, common ones are Vmware Workstation, Virtual Box, Virtual PC, KVM, Xen, etc. Each software has its own characteristics and corresponding use environment. Vmware Workstation is VMware's commercial virtual machine software. It has rich functions, stable performance, simple operation, and multi-platform support (Windows/Linux/Mac). It is suitable for building a learning environment or a small-scale server environment. Virtual Box is Oracle's open source virtual machine software. It is free, small and easy to use, fast update, and active in the community. It can meet the needs of development and testing environments and is suitable for development enthusiasts. Virtual PC is Microsoft's virtualization software, it is based on windows, easy to install, easy to use, windows7 adaptation, suitable for win application developers. KVM is the open source virtualization software of Redhat. It is based on the full virtualization technology of kernel scheduling. It is managed and scheduled by the Linux system program. The technology is complex and suitable for enterprise virtualization application scenarios. Xen is an open source server-level virtualization software developed by the University of Cambridge. It has excellent performance, stability and efficiency, and high technical requirements, suitable for enterprise virtualization scenarios.

  Weak water is 3000, I only take one scoop, technology changes, I only choose the most suitable. In learning Linux operation and maintenance technology, virtual machines are indispensable. Many use scenarios of VMware products are comprehensive and rich. Although it is commercial software, it is still recommended to use the VMware Workstation virtual machine environment.

2.1.3 VMware installation and use

   1 Vmware virtual machine version selection

  According to the habits and experience of using PC systems, make the following recommendations:

  MacOS VMware-Fusion 11.5 / 12.0

  Windows7      VMware-workstation  12.5/15.5

  Windows10 VMware-workstation 15.5/16.0 (win10+VM15.5 is selected for this tutorial)

  2 Download and install Vmware Workstation

  Download the required software according to the PC system. The official website requires registration to download. The software in the cloud disk comes from the VMware official website and can be downloaded directly.

  Official website download address https://my.vmware.com/cn/web/vmware/downloads

  Baidu cloud disk address https://pan.baidu.com/s/10YlqMRu1Gb0yGoz4sT3Srg Extraction code: r9m2 

  The installation of Vmware Workstation is simple, according to the normal Windows method, the default installation, continue to press "Next" to complete. VMware-Fusion can follow the normal steps of Mac installation software. Because these VMware software are commercial products, a license key is required for long-term use. For commercial use, you can go to the official website to purchase a license key. For personal learning, Baidu is recommended to use a license key.

  3 Create virtual machine configuration details

  Using Vmware Workstation to create a virtual machine configuration is essentially selecting the basic resource configuration of the virtual machine to prepare for the virtual machine to install the operating system. This process does not involve system installation.

  The following is an explanation of the process of configuring a virtual machine:

  1) Start Vmware Workstation, double-click the desktop icon to start the software.

 image.png

  2) Ctrl+N shortcut key to open the wizard interface of creating a virtual machine, it is recommended to use a typical wizard. Typical---->Install the operating system later.

 image.png

image.png

  3) Select the operating system --->Name the virtual machine, the selected system and version must be consistent with the operating system to be installed later; naming the virtual machine, you can customize the name; location selection is to select the directory where the virtual machine is installed, the directory needs Created in advance.

 image.png

image.png

   4) Specify disk size --->Customize hardware

  The default disk size must not be less than 20G, and the installation directory disk of the host machine must not be less than 20G. Saving the disk as a single file will help improve performance.

 image.png

image.png


   5) Customize the hardware, select the appropriate configuration of the hardware, and configure the size according to the needs.

  The memory is recommended to start with 2G, the processor is equipped with 2 cores, the new CD/DVD uses iso system mirroring, the network adapter selects bridge mode or NAT network, and other defaults.

  After the configuration is selected, close the custom hardware page.

 image.png

image.png

 image.png

image.png


   6) Complete the virtual machine configuration. After the configuration is completed, there is no system to run. Click to open the virtual machine to install the operating system (see the next section for details on linux system deployment).

 image.png

image.png

   At this point, the preparation of the Vmware virtual machine is complete.

2.1.4 VMware network type analysis

   VMWare provides three network working modes, namely Bridged (bridge mode), NAT (network address translation mode) and Host-only (host mode).

  1) Bridged (bridge mode), can be understood as a virtual bridge between the host network card and the virtual machine switch Vmnet0, through this bridge to connect to the host's LAN router, and obtain the independent IP of the same network segment as the host , You can directly connect to the external network. The virtual machine in this network mode is no different from the real computer. It is simple, fast and efficient, and is especially suitable for a stable LAN environment. The disadvantage is that there is the possibility of LAN IP conflicts. After changing the network routing environment, There will be the impact of not being able to connect to the Internet.

image.png

  2) NAT (Network Address Translation Mode) can be simply understood as the virtual machine exchanges network data through the host network card. The virtual machine network card is connected to the virtual VMnet8 switch, the virtual VMnet8 switch is connected to the virtual router and the virtual DHCP server, and the virtual router is connected to the host machine network card and connected to the LAN router to realize networking. VMware NAT Service acts as a virtual router, and VMware DHCP service acts as a virtual DHCP server. The virtual VMnet8 is also connected to the VMware Network Adapter VMnet8 of the host to realize the communication between the host and the virtual machine. There is no LAN IP conflict in this network mode, and the network routing environment of the host can also be changed at any time, and the virtual machine's IP connection is not affected.

image.png

  3) Host-only (host mode), the virtual machine VMnet1 connects to the host's VMware Network Adapter VMnet1 for communication. Host-only separates the virtual machine from the external network and only communicates with the host, which can form an independent internal LAN system. In this mode, it is not possible to connect to the external network by default. If you want to connect to the external network, you can share the host network card with the VMware Network Adapter VMnet1 network card (set on the host) and set the static network of the virtual machine to achieve networking purpose.

image.png

  The operation method of connecting to the external network in host mode: open the host network card to share with VMnet1, the ip of VMnet1 will be changed from the default address to 192.168.137.1; then go to VMware to modify the virtual network editor settings and modify the configuration to the network segment of 192.168.137.0 , Configure the ip range and effective time of dhcp; then set the virtual machine to use the host-only network mode; finally start the virtual machine to configure a valid network, and restart the network to connect to the external network. The steps are as follows

image.png


image.png

image.png

 image.png

 

  The knowledge points about virtual machines in this section are the prerequisites for subsequent Linux learning. You must master how to install VMware and the choice of three network models. The theory is there, and how many skills you can master depends on your practice. As long as the principle is clear, it is difficult to make mistakes.

 

Guess you like

Origin blog.51cto.com/superleedo/2542654