1. Turn on Hyper-V

This tutorial is based on the problems I and my classmates have encountered while installing Hyper-V under the guidance of a teacher.

First of all should pressWin+Q, or just open the search bar at the bottom left and type inHyperThe shortcut menu bar appears.



Click to start or close Windows functions infunctionTo look forHyper-VAnd check the



Note: There is a problem with some versions of the computer where Hyper-V cannot be found. Do the following, or go directly to Step 2.

1. Copy the string code to Notepad
pushd %~dp0 dir b %SystemRoot%servicingPackagesHyper-V.mum hyper-v.txt for f %%i in ('findstr i . hyper-v.txt 2^nul') do  dism online norestart addpackage%SystemRoot%servicingPackages%%i del hyper-v.txt Dism online enable-feature featurenameMicrosoft-Hyper-V-All LimitAccess ALL
2. Change the file type of Notepad from text document (.txt) to.cmd, that is, name Notepad hyperv.cmd.

Note here that some versions of the file name do not contain TXT, and you cannot change the TXT file type to CMD.



Do the following.

Method 1: Press Win+Q or open the search bar in the lower left corner and enterThe control panel.



Open after the following screen.



Click on the top left cornertoolchooseFolder options.



Click to view, willHide extensions of known file typesChange the selected to unselected.



Click OK again and exit to see.txt appear after the file name

Making changes

Method 2: click on the top left corner of the desktop, if not, then search in the search bar to open the search. Click on the file in the upper left corner and selectChange folders and search options.



After opening, as in the first point of view, willHide extensions of known file types“To unselect, then click OK, exit to change.



The results of both approaches are shown in the figure below



Move the mouse over the icon, right click, and selectRun as an administratorThat choice is



So start installing, wait until the page stops scrolling and a screen appears, yes, typeY



After the computer is rebooted, you can press Win+Q or directly open the search bar at the bottom left, type in Hyper, and the shortcut menu bar appears.



Click on Start or Close Windows Features to look in FeaturesHyper-VAnd check the



Click on Windows in the lower left corner and find Hyper-V Manager in Windows Management Tools. If it exists, it succeeds

Download CentOS image

Enter the website of Ali Cloud Mirrorhttps://developer.aliyun.com/…And choose”OS image



The selection of system and version is as follows



I can just clickdownload(may not be successful), you can also click the download after the copy button to copy the download address to download tools (such as thunderbolt, etc.) to download, download the file name of CentOS- 7-x86_64-minimal -1908.iso

Note: Minimal here is the mini-version, DVD is the standard version

Create a virtual machine in Hyper-V

Type in the Quick Launch barhyperAnd selectThe Hyper – V managerClick toAdministrator Run



When you open the manager, you will see the following window. In the tree to the left of the window, you can see the computer with the name of the current computer



If you can not open the case, or can not be connected to the local situation, please check whether the BIOS Settings have opened the computer virtualization function, the specific operation can be opened according to their computer models for inquiry

Select in the right columnnewThe virtual machine



Name the virtual machine here. The name can be taken by yourself. The save location can be specified by yourself



Select the virtual machine as generation here



Allocate memory for the virtual machine. This memory will be recommended according to the memory size of the computer. You can adjust the memory by yourself



Configure the network. If the virtual machine needs to be connected to the network, select the following Settings. You can choose if you don’t need to be connected to the network.Not connected



Configuring a virtual machine disk is equivalent to adding a hard disk to the virtual machine and the size of the hard disk5-10GIf not enough, you can later expand the hard disk, the hard disk will be stored in the form of a file on the current computer, please make sure the selected file location has enough hard disk space.



Click on theThe next step, select from the installation optionsInstall from CD/DVD-ROM, and select the ISO file location. Download the CentOS installation file previously



Such asThe mediaThe physical CD/DVD drive in the column is gray, just as well, some laptops don’t come with CD-ROM drives



AbstractIs a summary of the above Settings, check that there is no error can be clickedcomplete

After the installation is complete, a virtual machine named by itself will appear



Click on the lower right cornerStart theThen click onThe connection

If you need to modify the virtual machine configuration, you can do so atSet up theIn the

Install CentOS

When the CD is loaded and started, the second item is selected by default. Here, we need to select the first item through the keyboard to select Install Centos7, and then press Enter. There is a time limit, so hurry up



Language optionsDefault English, changeable, clickContinue



In the Setup option, click Warninginstallation destination, click in to make sure the hard drive is selected, no need to touch the top left cornerDoneTo exit.





The other options can be left as default and can be changed if you need to connect to the networkThe NETWORK & the HOSTNAME, set the network connection status, clickTop right switchOpen it and click Done in the top left corner to exit.





Click Begin Installation in the lower right corner to start the Installation operation and enter the following interface.



Below is the progress bar performing the installation operation, and above there are two operations that need to be handled, one isChange administrator passwordThe other one isCreate a userEnter the interface of modifying root password.



Enter the set root password and confirm the password. The password has complexity requirements, cannot be too simple.

againCreate a user



After the tape is installed, click the lower right corner to restart the system

After installation, restart and enter the CentOS system. After loading, the system login interface will be displayed



You can log in with root and the newly set administrator password, or you can log in with the normal user you created earlier. You can select a virtual machine later using this virtual systemStart theCan, want normal after using endShut down the system, that is, clickThe red button in the upper left

Note: If there is a problem of entering the next step without creating a user, you can clickreductionTo reset



So that’s the whole process.