Saturday, February 9, 2013

Enabling Remote Management for a Windows Server 2012 Core Hyper-V instance

I have a small virtual lab running inside hyper-v hosted on a Windows Server 2012 standard instance.  The host is running AD and DNS and has a GUI interface.  The virtual lab machines all run Windows Server 2012 Core.

Connect to the Hyper-V Instances

There is an array of ways to manage or execute operations on Windows Server 2012 core instances.

  • Use the Server Manager -> All Servers tool.  Highlight the server and right-mouse to see the following options
    • Computer Management:  This provides remote access to the Computer Management console. This will not work out of the box due to firewall rules.
    • Remote Desktop Connection: This does not work because core instances do not have any GUI installed
    • Windows Powershell:  This essentially runs a remote Powershell command. I've had inconsistent results with commands typed in this window

  • Use the Hyper-V management console accessible from the Server Manager -> All Tools menu.  Highlight the server and right-mouse to see the following options
    • Connect... This opens up a console screen on that machine.  By default is uses the local Administrator account.  You can force it to use an Active Directory Account by sending that screen a Ctrl-Alt-Delete and selecting Switch user. Note the schizophrenic use of a graphical screen on a Server Core instance that isn't supposed to have any GUI! 


Enable Remote Management

You may receive the following, somewhat misleading, error panel when attempting to remotely manage a Hyper-V virtual machine.  The panel correctly tells you that you have to enable the windows firewall rules.  It tells you the wrong rule sets when the machine you are trying to manage is a server 2012 instance, probably also  Windows 7 and Windows 8 instances.  The panel appears after the remote connection times out.
Note that it tells you to enable rule sets
  • COM+ Network Access (DCOM-In)
  • Remote Event Log Management
You actually want to enable rule sets
  • Windows Management Instrumentation (WMI)
  • Remote Event Log Management
Run these commands as administrator on the machine you wish to manage using the remote console via Hyper-V.  I normally do this with a domain account.

netsh advfirewall firewall set rule group="Windows Management Instrumentation (WMI)" new enable=yes
netsh advfirewall firewall set rule group=“remote event log management” new enable=yes

The Computer Management control panel (mmc) should now be able to remotely connect to and manage your core server.

9 comments:

  1. Thanks for information……Useful for my current research on the topic Remote Device management

    ReplyDelete
  2. Excellent Blog every one can get lots of information for any topics from this blog nice work keep it up.
    Firewall Server

    ReplyDelete
  3. Great advice, thanks for your help. I just used this to allow remote management for two new Hyper-V servers that I'm configuring.

    ReplyDelete
  4. Thanks mate.

    Kind Regards,
    Clint Boessen [Exchange MVP]
    http://clintboessen.blogspot.com

    ReplyDelete
  5. Great Blog!!Can you please provide more details on Remote Management for a Windows Server .
    IT Managed Services Cleveland

    ReplyDelete
  6. Thanks for publishing. Just a comment for others; if you get an error "Group cannot be specified along with other identification conditions." then it is likely you can cut and pasted from this webpage and the double quotes in the second command aren't translating properly. If you just type the command freehand it should work.

    HTH

    Paul

    ReplyDelete
  7. Great tips for connecting to Hyper-V Server!

    I can successfully remotely manage my Hyper-V Server 2012 Core in a workgroup environment. I can also remotely manage the disks on the Hyper-V server.

    I wrote a quick 12-step tutorial (article and video) showing exactly what I did to get this working.

    http://pc-addicts.com/12-steps-to-remotely-manage-hyper-v-server-2012-core

    Hopefully this can help others who found this to be a very frustrating task.

    -Chris
    http://PC-Addicts.com

    ReplyDelete
  8. Thanks for sharing a very informative article. Those who are in remote server management are surely delighted with this helpful post. Cheers!

    ReplyDelete
  9. Thank you so much sir for your great invention for managing application on windows server .This is new to me as well as most effective tutorial for me.Thank you sop much for sharing such a nice and informative information .I loved your step by step information on it.Though as a world of hosting every body need to follow this techniques which mywindowshosting.com hosting company follow for their blog improvement.

    ReplyDelete