Install Hyper-V on Windows Server 2019

  • Install Hyper-V
  1. Open Server Manager, click Add roles and features.
  2.  Verification can be ignored, click Next.
  3. Role-based or feature-based installation, click Next.
  4. Select the target server, confirm that the Name and IP Address are correct, and click Next.
  5. Select the installed role --Hyper-V > Add Features, click Next.
  6. Click Next.
  7. Click Next.
  8. Create a virtual switch, do not create it at this time, do not check any network cards, and click Next directly.
  9. The default CredSSP, click Next.
  10. The Hyper-V virtual disk and configuration files are stored in the C drive by default. It is recommended to change to another drive letter and click Next.
  11. Click Install to start the installation.
  12. After the installation is complete, open Server Manager, Tool > Htper-V Manager.
  • Install Hyper-V using the Install-WindowsFeature cmdlet.

Open Windows Power Shell and run the following command

install-windowsfeature -Name Hyper-V -ComputerName <computer_Name> -IncludeManagementTools -Restart

To install on a connected remote server, replace <computer_name> with the server name, and to install on a local server, remove -ComputerName <computer_name> from the command.

 After restarting, you can use the following command to check which roles are installed.

Get-Windowsfeature -ComputerName <computer_name>
  • Create a virtual switch
  1. Open Hyper-V, click Active > Virtual Switch Manager... .  
  2. Click New virtual network switch to create a new virtual switch. There are three modes to choose from.
    External Allows virtual machines to access the physical network and communicate with external networks. Allows virtual machines on the same Hyper-V server to communicate with each other.
    Internal Allows VM-to-VM and VM-to-management host OS communication on the same Hyper-V server.
    Private Only allow communication between virtual machines on the same Hyper-V server. The private network is isolated from all external network traffic on the Hyper-V server. It is an independent test environment.
  3.  Take External as an example to create a virtual switch. First name the virtual switch, and then select the network card information of the corresponding external network. Virtual machines can communicate with this network. Click OK or Apply to complete the creation.

Guess you like

Origin blog.csdn.net/weixin_57050763/article/details/127352892