Monday, June 3, 2013

Server 2012 Hyper-V Free Workgroup Setup and Management

Log onto your Microsoft Live account and Download the installation media here:
http://aka.ms/hv2012gs

Run the Setup and restart as necessary.

After installing you will be prompted to create a default Administrator password.
After setting up your password log onto the server. It will open a command prompt and basic management console as shown below:

image

The menus are straight forward and will prompt you through the process I underlined my settings:

1) Domain/Workgroup: to add to domain, setup workgroup name
2) Computer Name: 1
3) Add Local Administrator: I would recommend creating at least one additional administrator
4) Configure Remote Management: Enable or Disable
5) Windows Update Settings: Manual or Automatic
6) Download and Install Updates:
7) Remote Desktop: Enable or Disable and authentication methods
8) Network Settings: Configure as Static or DCHP Settings including DNS
9) Date and Time:
10) Help improve the product with CEIP: Customer Experience Improvement Program Enable or Disable
11) Log Off User:
12) Restart Server:
13) Shut Down Server:
14) Exit Command Line :

After you configure your host as recommended above you now can RDP into it from you desktop

For credentials use “.\administrator” or “ .\” the account you created.

Once logged on to your Free 2012 Hyper V server go to the command prompt and open Powershell by typing in Powershell.exe as shown below:

image

At the PS prompt enter in the following commands to modify your firewall to enable the following in order:

netsh firewall set service type=RemoteAdmin mode=enable

image

 

netsh advfirewall firewall SET rule group="Remote Administration" new enable=yes

image

netsh advfirewall firewall set rule group="File and Printer Sharing" new enable=yes

image

netsh advfirewall firewall set rule group="Remote Service Management" new enable=yes

image

netsh advfirewall firewall set rule group="Performance Logs and Alerts" new enable=yes

image

Netsh advfirewall firewall set rule group="Remote Event Log Management" new enable=yes

image

Netsh advfirewall firewall set rule group="Remote Scheduled Tasks Management" new enable=yes

image

netsh advfirewall firewall set rule group="Remote Volume Management" new enable=yes

image

netsh advfirewall firewall set rule group="Remote Desktop" new enable=yes

image

netsh advfirewall firewall set rule group="Windows Firewall Remote Management" new enable =yes

image

netsh advfirewall firewall set rule group="windows management instrumentation (wmi)" new enable =yes

image

netsh advfirewall firewall add rule name="Microsoft Management Console" dir=in action=allow program="%windir%\system32\mmc.exe" enable=yes profile=private

image

Type “Exit to exit powershell

Type in “WinRM quickconfig” enter


Tasks on Remote Management PC:

Install Server RSAT on your workstation download it here:
http://www.microsoft.com/en-us/download/details.aspx?id=7887

Open Powershell as and Administrator

Type in the following:

Set-item WSMAN:\localhost\Client\TrustedHosts –Value “HYPERVServer” –concatenate

image

image

Allow Anonymous DCOM Access:

Run DCOMCNFG
Console Root > Component Services > Computers > My Computer
Right click > Properties > "COM Security"
Access Permission> Edit Limits as shown below:

image

Check "ANONYMOUS LOGON" under Remote Access as shown below:

image

You need to add DNS reference to the hosts file for your Hyper-V server. Located at C:\Windows\System32\Drivers\ETC\hosts as shown below:

image

Add the IP and Name such as my example below:

image

Note: Due to permissions it may not let you save after editing in the same location. Edit and save elsewhere such as the desktop and then drag to and replace the existing host file.

Do a quick Ping to test to confirm:

image

Now open RSAT and select “Add other servers to manage” as shown below:

image

Select the DNS tab and enter in your Hyper-V server name as shown below:

image

Select the Search and then the server and the arrow to add it to your servers list:

image

Once it appears in the list select “OK”:

image

Once back to RSAT select All Servers and you will see the following “Kerberos authentication error”:

image

Right Click on the HyperV server and select “Manage As…”:

image

Enter in the Hyper-V server \ user and password> Check “Remember my credentials” and “OK”:

image

It should then connect properly:

image

Right Click on the HyperV server and select “Hyper-V Manager”:

image

You should now see and be able to manage your Hyper-V server as shown below:

image

Credit References:

Jason Powell

http://blogs.technet.com/b/keithmayer/archive/2013/04/05/getting-started-with-hyper-v-server-2012-hyperv-virtualization-itpro.aspx#.UafVCerD-M8

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

http://serverfault.com/users/66435/molotch

Hyper-V Virtual Machines Disappear after restart of Host

Problem:
When you open the Hyper-V Manager after a restart your VMs are missing as shown below:

clip_image001

Solution:
First make sure your Antivirus is excluding your VM directory

If you have known good backups do the following first and save yourself time.

-Stop the service using the Hyper-V Manager “stop service” icon on the right or at a dos prompt:

Net Stop “Hyper-v virtual machine management”

-Do a restore of your VMs\Virtual Machines\ directory containing your XML files such as the path below to an alternate location such as VMs\Restore\ 

clip_image002

-Rename the existing XML files with the prefix OLD (with the GUID remaining)

clip_image003

-Move the restored XML files only from VMs\Restore\ to the VMs\Virtual Machines directory

clip_image004

-Start the service using the Hyper-V Manager “start service” icon on the right or at a dos prompt:

Net Start “Hyper-v virtual machine management”

Your VM’s should now be repopulated and starting up. If all works properly you can delete the corrupted OLD(GUID).xml files.

If not proceed to the links below for deeper troubleshooting:

http://social.technet.microsoft.com/Forums/en-US/winserverhyperv/thread/135d1385-4b75-4737-80de-f8c517c25f8d

http://social.technet.microsoft.com/Forums/en-US/winserverhyperv/thread/38f7bf66-0a39-4905-90f8-c6900a4fdfd6/

If doing deeper troubleshooting See proper VM XML link Example Below:

clip_image005