Detailed explanation and construction of Hyper-V virtual server

1. What is Hyper-V?

I'm too lazy to gnaw at the book, and explain it in my own words, it is the software for opening a virtual machine , the same as Vmware.

What Vmware has, it has, what Vmware doesn't have, it still has.

For example, Vmware only supports single processors, while Hyper-V supports multi-processor virtual machines.

2. Build a Hyper-V experiment in Vmware

Purpose of the experiment: Build Hyper-V in the Vmware virtual machine and deploy the Hyper-V server, build two VMS (virtual machines)

 

Experiment preparation: a pure Vmware virtual machine (the author uses version 16.2.4), hereinafter referred to as virtual machine A, windows server 2016 CD file

Experimental steps:

1. Build a pure virtual machine of windows server 2016 in Vmware. In Server Manager, select Add Roles and Features.

2. When you want to install Hyper-V, you may get an error message like this, which is normal. This is because you have not enabled virtualization for the CPU of your external virtual machine.

 

The solution is to shut down the virtual machine A, then find the virtual machine settings, and check the two virtualization options. Whether the counter is turned on or not will not affect our experiment.

 Boot to continue the installation, this time you can successfully check.

In this step, check this to create a virtual switch for the internal virtual machine you are about to create to connect to the external virtual machine

 

 3. Then we find the hyper-v manager in the tool box 

4. Click the virtual machine switch manager on the right to create an internal switch and a dedicated switch (the first one is the external switch, just change the name)

What is the use of these three switches? This needs to be explained separately.

External network: It is equivalent to connecting the external virtual machine and the internal virtual machine to a switch, which can be used to share the network connected to the external switch. In short, it is connected to the external network.

Internal network: used for communication between external virtual machines and internal virtual machines

Private network: used for communication between two internal virtual machines

External network

internal network

 

private network

 

 

5. Before creating the internal virtual machine, we also need to drag the pre-prepared system CD file to the external virtual machine

 

5. Then we started to create the internal virtual machine. Click New on the right. We want to build two, which are called internal virtual machine A and internal virtual machine B for easy understanding.

For memory, 1G is fine. After all, our purpose is communication between virtual machines, but the bigger the virtual machine, the better.

 

It is recommended to connect the external switch first, and it can be changed after it is built anyway.

 Select the CD-ROM file you dragged in, and you can complete the creation of the first internal virtual machine A

 6. Start virtual machine A and enter the setting interface

 Choose desktop experience version

 After a long wait, it finally turned on, which means that our first virtual machine A in Hyper-V has been created

7. Next, create the internal virtual machine B, but this time we don't have to create it so tediously. We select the export function on the right side of the hyper-v manager

But as a special reminder, the export function will make the configuration of the two virtual machines exactly the same

 Then go back to the manager and select the import virtual machine on the right

Select the folder we just exported

 Select Copy Virtual Machine

Then export it (if an error is reported, it should be a problem with the file storage location, try to create a new folder for the internal virtual machine B, especially its virtual disk file, do not put it together with the internal virtual machine A, it will conflict) 

In this way, our internal virtual machine B is also created

We turn on both internal virtual machines

8. Next is the test result environment. We want to analyze the situation where two virtual machines are connected to external switches, internal switches and dedicated switches.

Remember what I just said, the external switch can be connected to the external network

We visit the website of Baidu on the internal virtual machine B, and the visit is successful

Now we change the switches of the two internal virtual machines to dedicated switches in the settings of the manager  

 But when using a dedicated switch, we need to manually configure the IP addresses for the two internal virtual machines, because connecting to an external switch is like connecting to a switch with the host, sharing the DHCP server with the host (external switch), and now To connect to a dedicated switch, it is necessary to manually reassign the IP.

Internal virtual machine A: 192.168.121.129 

Internal virtual machine B: 192.168.121.130

They can ping each other, and the experiment ends.

Afterword: The author is just a beginner, and my original intention is to share what I have learned. Welcome to enlighten me.

 

 

 

 

 

 

 

 

 

 

 

Guess you like

Origin blog.csdn.net/2301_76767077/article/details/130160204