Hyper V Server 2016 setup - hpaluch/hpaluch.github.io GitHub Wiki
WARNING! My Hardware is unfortunately not supported by Hyper-V server 2016 (missing SLAT support):
Note, that last Hyper-V products working on my Opteron machine are:
- Hyper-V Server 2012 (Free, but remote Hyper-V Manager setup is really painful)
- please note that Microsoft is killing free "Hyper-V Server", becasue it is free, see https://www.theregister.com/2021/08/31/hyper_v_server_discontinued/
- Windows Server 2012R2 (requires license, but may use local Hyper-V Manager easily)
- no Desktop Windows suitable (theoretically Windows 7 Pro, but they have very outdated Hyper-V)
Here is my bare-metal PC with installed (but non-functional Hyper-V server):
systeminfo.exe
...
System Manufacturer: MSI
System Model: MS-7250
System Type: x64-based PC
Processor(s): 1 Processor(s) Installed.
[01]: AMD64 Family 15 Model 75 Stepping 2 AuthenticAMD ~2000 Mhz
BIOS Version: American Megatrends Inc. 080014 , 7/3/2006
...
Hyper-V Requirements: VM Monitor Mode Extensions: Yes
Virtualization Enabled In Firmware: Yes
Second Level Address Translation: No
Data Execution Prevention Available: Yes
So this guide is a bit incomplete (at the end of setup I can connect with Hyper-V manager and Create VM, but I can't start it).
However It was lot of fun (without AD) - so here it is for your enjoyment :-)
WARNING!
Hyper-V Manager (client) is not available on Windows Home editions. You need Professional or better. Also you need at least Windows 8 to connect to Hyper-V Server 2016. Windows 7 client is NOT supported.
Post-install instructions
Optional: To rename your Hyper-V server - in blue Window (sconfig
):
2 # Rename computer
HYPER1 # enter name
# confirm restart
To enable RDP - press on Blue window:
7 # Enable RDP
E # Enable
2 # Allow all clients to connect
Additional setup when not connected to AD
WARNING!
This is really messy and looks like joke when compared with setup of clients for other Hypervisors. But this story is true...
IMPORTANT!
You need to write ComputerName/IP address to c:\windows\system32\drivers\etc\hosts
on BOTH - server and client. In my example:
# c:\windows\system32\drivers\etc\hosts
192.168.0.101 WIN10
192.168.0.51 HYPER1
So:
- WIN10 - Hyper-V client running Hyper-V manager
- HYPER1 - Hyper-V Server 2016
Change Net connection profile on your Hyper-V server from Public to Private:
get-netconnectionprofile
Name : Network
InterfaceAlias : Ethernet
InterfaceIndex : 6 ### remember this value
NetworkCategory : Public ### Need to be Private
IPv4Connectivity : Internet
IPv6Connectivity : NoTraffic
# Now enter:
set-netconnectionprofile -interfaceindex 6 -networkcategory private
NOTE! Hyper-V requires bidirectional connection between Hyper-V server and Hyper-V Manager (so NAT etc. is not supported)
Also you need to follow instructions from: https://docs.microsoft.com/en-us/windows-server/virtualization/hyper-v/manage/remotely-manage-hyper-v-hosts
On Your Hyper-V Server run:
powershell
Enable-PSRemoting
Enable-WSManCredSSP -Role server
exit
winrm quickconfig
# answer yes to everything
On your Hyper-V Client run:
sc config WinRM start= auto
net start WinRM
WARNING! Hyper-V manager offers to start WinRM for you - but it seems to always fail (service stays in Manual mode and is Down)...
And then (still on Hyper-V client Windows):
powershell
Set-Item WSMan:\localhost\Client\TrustedHosts -Value "hyper1"
Also run ipconfig
to see IP address of your Hyper-V server
Last but not least you need to allow User Delegation (you get warning about this from Hyper-V Manager):
- run policy editor on client using
gpedit.msc
command - expand Computer Configuration -> Administrative Templates -> System -> Credentials Delegation -> Allow Delegating fresh credentials with NTLM-only server
- in dialog remember to do:
- click on Enabled radio button
- click on Add servers to list
- fill in
WSMAN/*
(yes - this weird value) - click on Apply or OK
This should fix delegation errors in your Hyper-V client
NOTES:
- you you can use
net use
command to map network disk from another PC to your Hyper-V server, for example:net use x: \\myserver\myshare
- even on Hyper-V server you can install favorite Total Commander
Tips for Hyper-V Manager (client)
- when you want to specify different Hyper-V server user you must prefix him with
computer name, for example when my Hyper-V server is
HYPER1
I useHYPER1\Administrator
as username
Configuring Hyper-V Network
Before creating VM in Hyper-V manager you need to create External network switch. Do this in Hyper-V manager:
- click on Virtual Switch Manager
- ensure that External (= physical Network card) is selected
- click on Create Virtual Switch
- fill in:
- Name:
switch1
- ensure that your Network card is selected
- ensure that Allow Management operating system to share this adapter
- Name:
- click on OK
- confirm network disruption warning
- after minute or so it should be ready
Now you can finally create your first VM in Hyper-V Manager.
NOTES:
After VM creation I needed to right-click on Hyper-V server name and select Refresh to see created VM...
Oooppsss:
get-vm
Name State CPUUsage(%) MemoryAssigned(M) Uptime Status Version
---- ----- ----------- ----------------- ------ ------ -------
CentOS74 Off 0 0 00:00:00 Operating normally 8.0
start-vm CentOS74
start-vm : 'CentOS74' failed to start.
Virtual machine 'CentOS74' could not be started because the hypervisor is not running.
'CentOS74' failed to start. (Virtual machine ID E7CC12BD-0BBB-4EB1-AFBF-4170002A7D57)
Virtual machine 'CentOS74' could not be started because the hypervisor is not running (Virtual machine ID
E7CC12BD-0BBB-4EB1-AFBF-4170002A7D57).
The following actions may help you resolve the problem:
1) Verify that the processor of the physical computer has a supported version of hardware-assisted virtualization.
2) Verify that hardware-assisted virtualization and hardware-assisted data execution protection are enabled in the
BIOS of the physical computer. (If you edit the BIOS to enable either setting, you must turn off the power to the
physical computer and then turn it back on. Resetting the physical computer is not sufficient.)
3) If you have made changes to the Boot Configuration Data store, review these changes to ensure that the hypervisor
is configured to launch automatically.
At line:1 char:1
+ start-vm CentOS74
So this guide is complete in my case. I can't go further...