New
#1
Connecting Hyper-V Manager to another PC
I just bought a new X201 laptop off ebay and wanted to use it to access my main PC (a MacBook also running Windows 10 Pro) through the Hyper-V Manager. That is to use the Hyper-V manager on the X201 to access not just the local PC but to start/stop and connect directly to the VMs on the other PC.
I'm not on a domain (in which case it would be trivial). I found a couple of links but they were not complete or didn't exactly work on Windows 10.
Hyper-V 2012 R2 and Windows 10 Incompatible? | [H]ard|Forum
Check that the Virtual Machine Management service is running and that you are authorized to connect to the server
In any case this is what you need to do...
I did all these steps on both the server (MACBOOK) and client (X201) as I wanted it to work both ways. Both are running 10 Pro in my case but they need not necessarily - you only need Hyper-V Management tools not the Hyper-V Platform on the client.
1. Enable Anonymous Login in Component Services - without this, you can't connect to your Hyper-V server if you're not in a domain. If you are on a domain it is easy - you can just pick another server in the manager.
dcomcnfg -> computers -> my computer -> properties, "COM SECURITY" tab, "ACCESS PERMISSIONS", select "edit limits", sect "ANONYMOUS LOGON", and tick "remote access" under ALLOW
2. Add your Server (MACBOOK in my case) into hosts file on your client (X201 in my case). Hyper-V looks at C:\Windows\System32\drivers\etc\hosts. It will not work if you don't add it here if you are not on a domain.
3. Open up the 3 "Remote Event Log Management" ports on the firewall.
4. Add the server as trusted host using powershell5. Add the credentials of a remote user (I think it must be Admin user)...Code:PS C:\Windows\system32> set-item WSMAN:\localhost\client\trustedhosts -value MACBOOK -concatenate WinRM Security Configuration. This command modifies the TrustedHosts list for the WinRM client. The computers in the TrustedHosts list might not be authenticated. The client might send credential information to these computers. Are you sure that you want to modify this list? [Y] Yes [N] No [S] Suspend [?] Help (default is "Y"): Y PS C:\Windows\system32>
6. Then configure WinRM:Code:PS C:\Windows\system32> cmdkey /add:MACBOOK /user:hali /pass:xxxxxxxxxxxx CMDKEY: Credential added successfully. PS C:\Windows\system32>
7. Then (and careful this is case sensitive)Code:Microsoft Windows [Version 10.0.14393] (c) 2016 Microsoft Corporation. All rights reserved. C:\Windows\system32>winrm quickconfig WinRM is not set up to receive requests on this machine. The following changes must be made: Start the WinRM service. Set the WinRM service type to delayed auto start. Make these changes [y/n]? y WinRM has been updated to receive requests. WinRM service type changed successfully. WinRM service started. WinRM is not set up to allow remote access to this machine for management. The following changes must be made: Enable the WinRM firewall exception. Configure LocalAccountTokenFilterPolicy to grant administrative rights remotely to local users. Make these changes [y/n]? y WinRM has been updated for remote management. WinRM firewall exception enabled. Configured LocalAccountTokenFilterPolicy to grant administrative rights remotely to local users. C:\Windows\system32>
And there you go - my X201 can see my MacBook :)Code:C:\Windows\system32>winrm set winrm/config/client @{TrustedHosts="MACBOOK"} Client NetworkDelayms = 5000 URLPrefix = wsman AllowUnencrypted = false Auth Basic = true Digest = true Kerberos = true Negotiate = true Certificate = true CredSSP = false DefaultPorts HTTP = 5985 HTTPS = 5986 TrustedHosts = MACBOOK C:\Windows\system32>
I can now start/stop and connect directly to VMs from anywhere. Cool huh?
Hope this is useful to someone - VMWare is much easier for this sort of thing but at least Hyper-V is free.