howtothings.co.uk
Microsoft Hyper-V Server 2012 / 2012 R2 in a Workgroup - Printable Version

+- howtothings.co.uk (https://www.howtothings.co.uk)
+-- Forum: Computing (https://www.howtothings.co.uk/forumdisplay.php?fid=4)
+--- Forum: Operating System and Software Support (https://www.howtothings.co.uk/forumdisplay.php?fid=17)
+--- Thread: Microsoft Hyper-V Server 2012 / 2012 R2 in a Workgroup (/showthread.php?tid=2741)



Microsoft Hyper-V Server 2012 / 2012 R2 in a Workgroup - Mark - 26-12-2014

Microsoft Hyper-V Server 2012 / 2012 R2 in a Workgroup

Look at my previous thread for more information:

My experience with Microsoft Hyper-V Server 2012 or 2012 R2
http://www.howtothings.co.uk/thread-2740.html


To be honest this post if mainly talking about using HVRemote which is a great little program.


Using HVRemote (Hyper-V Remote Management Configuration Utility)

Download from here: https://code.msdn.microsoft.com/windowsdesktop/Hyper-V-Remote-Management-26d127c6
Direct link: https://code.msdn.microsoft.com/windowsdesktop/Hyper-V-Remote-Management-26d127c6/file/95510/1/hvremote.wsf

To check syntax:
cd in to the directory where you downloaded it & run:
Code:
cscript hvremote.wsf /?

Run this on your client PC if you're having problems connecting to a Hyper-V server:
Code:
cscript hvremote.wsf /target:server01 /show

This is the output and my journey!
-------------------------------------------------------------------------------
3 warnings or errors were found in the configuration. Review the
detailed output above to determine whether you need to take further action.
Summary is below.

1: Anonymous Logon does not have remote access
2: Cannot connect to root\cimv2 on server01
3: Some tests were not run due to prior failures

-------------------------------------------------------------------------------

If you scroll threw you can see the problem areas:

-------------------------------------------------------------------------------
ANONYMOUS LOGON Machine DCOM Access
-------------------------------------------------------------------------------

WARN: ANONYMOUS LOGON does not have remote access

This setting is required when the client is in a workgroup, or the
server is in an untrusted domain from the client.

Use "cscript hvremote.wsf /mode:client /anondcom:grant" to turn on


& that gives you:

Code:
cscript hvremote.wsf /mode:client /anondcom:grant
Microsoft ® Windows Script Host Version 5.8
Copyright © Microsoft Corporation. All rights reserved.

Hyper-V Remote Management Configuration & Checkup Utility
John Howard, Hyper-V Team, Microsoft Corporation.
http://blogs.technet.com/jhoward
Version 1.08 9th Sept 2013

INFO: Computername is #-###
INFO: Computer is in workgroup WORKGROUP
INFO: Current user is #-###\Mark
INFO: OS is 6.2.9200 64-bit Microsoft Windows 8 Enterprise
INFO: Hyper-V Tools are enabled

INFO: Obtaining current Machine Access Restriction...
INFO: Examining security descriptor
INFO: Granted Remote DCOM Access to Anonymous Logon
WARN: See documentation for security implications
INFO: Are running the latest version
INFO: HVRemote complete

You can also check this in a GUI:
Open DCOMCnfg.exe from CMD
Expand Component Service -> Computers -> Right click -> My Computer -> Properties -> COM Security
Access Permissions, Edit Limits ...
ANONYMOUS LOGON -> Tick -> Remote Access


Next problem:

2: - Connect to root\cimv2 WMI namespace
FAIL - Was unable to connect. Diagnosis steps:

- Have you run hvremote /add:user or hvremote /add:domain\user
on server01 to grant access?

- Are you sure the server name 'server01' is correct?

- Did you use cmdkey to set credentials to the remote machine if needed?

- Is DNS operating correctly and was server01 found?
Look at previous tests to verify that the IP address
matches the output of 'ipconfig /all' when run on
server01. If you do not have a DNS infrastructure,
edit \windows\system32\drivers\etc on #-###
to add an entry for server01.

Lets try set 3:
- Did you use cmdkey to set credentials to the remote machine if needed?

Do this on the client:
Code:
cmdkey /add:server01 /user:server01\username /pass:password
CMDKEY: Credential added successfully.

That didn't work..
Let's try step 1

- Have you run "hvremote /add:user" or hvremote /add:domain\user
on server01 to grant access?

Code:
cscript hvremote.wsf /add:username

For good measure..
Code:
cscript hvremote.wsf /add:server01\username

Output:
Adding user to Hyper-V Administrators...
INFO: username added to Hyper-V Administrators OK
INFO: Are running the latest version
INFO: HVRemote complete


To complete the configuration for remote management, restart the client computer and the Hyper-V server.


This is where connecting over a workgroup rather than a domain really sucked..

Create the same user on client PC:
Code:
net user username password /add
Code:
net localgroup administrators username /add

powershell:
Code:
Set-Item wsman:\localhost\Client\TrustedHosts server01 -Concatenate -Force

Run this on the Hyper-V server
Code:
net localgroup "Distributed COM Users" username /add
The command completed successfully.

Code:
net localgroup "Distributed COM Users"
Alias name Distributed COM Users
Comment Members are allowed to launch, activate and use Distributed COM o
bjects on this machine.

Members

-------------------------------------------------------------------------------
username
The command completed successfully.


Other stuff you might need to try if it just doesn't work ..
RPC PORTS are: 135, 2101*, 2103*, 2105*

Run this on the Hyper-V server:
Code:
reg add HKLM\Software\Policies\Microsoft\Windows\DeviceInstall\Settings /v AllowRemoteRPC /t reg_dword /d 1


Run this on the client PC:
Code:
winrm quickconfig
Code:
winrm set winrm/config/client @{TrustedHosts="server01"}
Code:
netsh advfirewall firewall set rule group="Remote Volume Management" new enable=yes

Browsing files works!
\\server01\c$