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:
- Launch "Connect to Server"
- Attempt one: "Set 'Another computer:' to '192.168.10.2'"
- Attempt two: "Set 'Another computer:' to 'server.local'"
- Click "OK"
- (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.
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
sconfig
Powershell commands:
On the desktop/laptop you're going to manage Hyper-V remotely
Powershell commands:
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.