How to remotely manage Hyper-V 2016 standalone via Windows 10

hyper-vhyper-v-server-2016hypervisor

How do I connect to my Hyper-V 2016 standalone via my Windows 10 laptop?

Background: I'm setting this up as a home lab. I've followed a few guides, but I have not yet found a guide/Youtube tutorial that seems to work for the free edition of Hyper-V 2016. This is a "hello world" for Hyper-V standalone, and I can't find a guide that works for 2016. (Hyper-V 2012 + Windows 8 seems to have some automated scripts that solve the problem, but not for Hyper-V 2016.)

Context

  • Server: Hyper-V server 2016 (free, standalone), fqdn: server.local,
  • Client: Windows 10 Professional
  • Additional Notes
    • Client's etc/hosts file contains an entry for the server's fqdn
    • Neither client or server are on a workgroup or domain
  • My objective: remotely manage server using client's Hyper-V Manager

The error

An error occurred while attempting to connect to server "server.local". Check that the 
Virtual Machine Management service is running and that you are authorized to
connect to the server. 

Hyper-V encountered an error trying to access an object on computer 'server.local' because 
the object was not found. The object might have been deleted. Verify that the Virtual 
Machine Management service on the computer is running.

What I've done on the server

# sconfig.cmd: Enable "Configure Remote Management"
# sconfig.cmd: Add Local Administrator
# sconfig.cmd: Enabled Remote Desktop
Enable-PSRemoting
Enable-WSManCredSSP -Role server
sc start vmms                                  # Is this the "missing object"?
netsh advfirewall set currentprofile state off # Let's try disabling firewall

What I've done on the client

Set-Item WSMan:\localhost\Client\TrustedHosts -Value "server.local"
Enable-WSManCredSSP -Role client -DelegateComputer "server.local"
# Changed group policy: "Computer Configuration > Administrative Templates > System > Credentials Delegation > Allow delegating fresh credentials with NTLM-only server authentication" by doing: "Click Enable and add wsman/fqdn-of-hyper-v-host."
# Disabled firewall
# dcomcnfg > COM SECURITY > Access Permissions > Edit Limits > Anonymous Login > ALLOW Remote Access
cmdkey /add:YOURSERVERNAME /user:USERNAMEONTHESERVER /pass:THEPASSWORDOFTHATUSER

How I triggered the error

On the client:

  1. Launch "Connect to Server"
    1. Attempt one: "Set 'Another computer:' to '192.168.10.2'"
    2. Attempt two: "Set 'Another computer:' to 'server.local'"
  2. Click "OK"
  3. (error: "An error occurred while attempting to connect to server 'server.local'…)

Best Answer

Found my specific issue :) I was using an invalid hostname, and the DNS wasn't resolving properly.

  • WRONG: server-1.local
  • RIGHT: server-1-local

But on a different note, I also found that the Microsoft doc (Remotely manage Hyper-V hosts with Hyper-V Manager) didn't document all the instructions necessary for me to make things work. It was mostly correct, but was missing one step. So I've attached my manual setup instructions.

See below for my full setup instructions for remotely managing Hyper-V 2016 via Windows 10 Professional. My setup involved two separate physical machines - I install both systems from scratch.

On the Hyper-V server

  1. Install Hyper-V Server 2016 (via GUI)
  2. Set password Note: change following in the terminal gui running sconfig
  3. Set computer name (e.g. server-1); note: do NOT use periods
  4. Configure remote management (disabled => enabled)
  5. Remote Desktop (disabled => enabled)
  6. In the Powershell window, run as admin:

Powershell commands:

Enable-PSRemoting
Enable-WSManCredSSP -Role server

On the desktop/laptop you're going to manage Hyper-V remotely

  1. Install Windows 10 Professional/your drivers/your apps (GUI)
  2. Change your network adapter setting
    • If on older patches of Windows 10
      • Click Start > Search "Homegroup" > Launch "Homegroup"
      • Click on the link to change network type (public => private)
    • If on newer patches of Windows 10
      • Try this: go to "Start Menu > (type) 'Ethernet' > (click) Ethernet adapter > (click) Private"
  3. Add a DNS entry in your hostfile (run notepad as Administrator)
    • Edit "C:\Windows\System32\drivers\etc\hosts"
    • Add an entry like "192.168.100.2 server-1"
  4. In the Powershell window, run as admin:

Powershell commands:

Enable-PSRemoting
Set-Item WSMan:\localhost\Client\TrustedHosts -Value server-1
Enable-WSManCredSSP -Role client -DelegateComputer server-1
Enable-WindowsOptionalFeature -Online -FeatureName:Microsoft-Hyper-V -All
cmdkey /add:server-1 /user:Administrator /pass

Note

The official Microsoft documentation was missing the cmdkey instruction, which registers the login info necessary to get into the Hyper-V server. I found it in a separate doc.