I recently acquired an HP 800G2 PC from my company for just 200 RMB. I decided to utilize it to host VMs for my tech experiments, as running VMs on my home LAN provides me with advantages over remote connections to Azure datacenters, which I typically use.
After installing Hyper-V Server 2019 on the machine, I deployed an Ubuntu Server VM and a Windows 10 VM. In this post, I will share the process and tips for setting up this kind of environment.
Hyper-V Server, Windows Server with Hyper-V Role, or VMWare Esxi
Type 1 or Type 2 Hypervisor
I spent some time studying and making the choice among the host OS. First, there are two types of hypervisors. Type 1 and Type 2. All three products, Hyper-V Server, Windows Server with Hyper-V Role, and Esxi are Type 1 hypervisor. VMWare workstation on the other hand, is Type 2 hypervisor.
Type 1 hypervisor runs directly on the host machine's hardware, while type 2 hypervisor runs on top of an operating system. Type 1 hypervisors are often referred to as bare-metal hypervisors because they operate directly on the host machine's underlying hardware. They are typically used in enterprise-level virtualization environments because of their speed and security. Type 2 hypervisors, on the other hand, are installed on top of an existing operating system and are primarily used for desktop virtualization. They are slower than type 1 hypervisors and less secure but easier to use and install.
There is no difference between VMs running on Hyper-V Server vs Windows Server with Hyper-V Role. Hyper-V Server is a Windows Server Core with Hyper-V Role pre-installed. They are both type 1 hypervisors. The only diffrence is that Hyper-V Server has some other roles removed from the OS, Windows Server has a full list of roles, which in this case, you won't need them.
As stated in the book "Windows Internals", when you install Hyper-V for a Windows Server, or even in Windows 10/11, the host OS itself will also be running on hypervisor just like a VM. So, for anyone that is concerned if Hyper-V Server has better performance than Windows Server with Hyper-V Role, this is false. THEY ARE SAME! VM all runs as Type 1 hypervisor.
Free or Paid
Hyper-V Server 2019: Free
Windows Server 2022 with Hyper-V Role: Paid
VMWare Esxi: Can be free
Last version of Hyper-V Server
Hyper-V Server 2019 is the last version of Hyper-V Server and continues to be supported until 2029. There won't be a Hyper-V Server 2022 or later. Microsoft recommends using Azure Stack HCI, which is also a commercial product. As my goal is not to pay a cent for OS on a 200RMB low end machine, I won't use Azure Stack HCI.
If you really like Hyper-V Server and hate Azure. You can choose Windows Server Core and install Hyper-V Role (but you must pay for it). As described above, there is no diffrence for VMs.
Install Hyper-V Server 2019
Installing Hyper-V Server 2019 is no diffrence from a typical installation of Windows Server Core. I use Rufus (https://rufus.ie/en/)to burn ISO file into a USB drive and install on the machine.
Computer Name: This is for remote managing your machine in later step. IP address can't be used for today's Windows management tools. So, you must give the server a name.
Network: Required for remote management
Remote Desktop: Required for remote management
Configure Remote Management: Required for Windows Admin Center and Hyper-V Manager to access remotely
Date and Time: Required for OS to work properly
Download and Install Updates: Make sure your hardware drivers got installed and your OS got latest patch
Enable Remote Management on Client Machine
This is the most important setup in the entire process. If blow up, please watch https://www.youtube.com/watch?v=ZPjtiXB5k5s
On your laptop, or other machine that you will use to manage this server. Run these commands in PowerShell with Admin. Replace the host name, IP, network name, and password for your own values.
Set-Item WSMan:\localhost\Client\TrustedHosts -Value "EDI-800G2HVS" # Add server IP to host file Add-Content -Path "C:\Windows\System32\drivers\etc\hosts" -Value "192.168.0.102 EDI-800G2HVS" # Get current network profile name for next command Get-NetConnectionProfile # Set as Private to allow connection Set-NetConnectionProfile -InterfaceAlias "Wi-Fi" -NetworkCategory Private Enable-PSRemoting Get-WSManCredSSP Enable-WSManCredSSP -Role Client -DelegateComputer "EDI-800G2HVS" cmdkey /add:EDI-800G2HVS /user: Administrator /pass:*******
optionalfeatures and Install only the Hyper-V Management Tools on your client machine.
You will now be able to add your server and run VMs on it.
Windows Admin Center
For a complete remote management capability, install Windows Admin Center (https://www.microsoft.com/en-us/windows-server/windows-admin-center) on your client machine, then connect to your server.
For example, you can easily make file shares to transfer VM OS install ISO files.