ScorpioTek Solutions
07-filler-left Information about ScorpioTek Services Offered by ScorpioTek Training Courses Offered by ScorpioTek Technology Blog by ScorpioTek Contact us for more information on training/services 08-filler-right
06-message

Archive for the ‘Server Core’ Category

How to get Server Core 2008 R2 to Hyper-V in 10 Minutes or Less

Tuesday, May 25th, 2010

Motivation

I need to showcase the capabilities of Windows HPC Server 2008 and for doing so I’ve decided to host 4 VMs that will be part of the cluster.  My VM server only has 4 GB of RAM and I need to make the best usage out of the hardware.  I decided to install Windows Server 2008 R2 Enterprise as the Server Core option, this would give me more RAM for the VMs to run. I wrote this guide to get your base Windows Server 2008 R2 installation to a full Hyper-V server in a matter of minutes, let me know if it works for you!

Procedure

One of the first things you want to do is enable remote desktop connections:

WMIC RDToggle Where ServerName="%COMPUTERNAME%" Call SetAllowTSConnections AllowTSConnections="1"

Then, enable the firewall to allow RDC:

netsh advfirewall firewall add rule name="RemoteDesktop" dir=in action=allow protocol=TCP localport=3389

That’s it in terms of sitting in front of your server core, you can now connect remotely and carry out the rest of the procedures.

If you have not done so already, log-in from a remote computer to your server core box.

Let’s now enable .Net 2.0:

dism /online /enable-feature /featurename:NetFx2-ServerCore

And now, let’s enable PowerShell:

dism /online /enable-feature /featurename:MicrosoftWindowsPowerShell

Download Core Configurator, burn it to a CD/DVD and insert it into the server core box.

Copy all the contents of the DVD to your server core machine, for instance:

xcopy /Y D:\* c:\Program Files\CoreConfiguratorv20\

Open PowerShell:

c:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe

Enable RemoteExecution policy:

Set-ExecutionPolicy RemoteSigned

Change directories to the CoreConfigurator directory:

cd "C:\Program Files\CoreConfiguratorv20\"

Launch Core Configurator:

.\CoreConfig.ps1

Now on CoreConfigurator carry out these steps:

  1. Click “Computer Settings…”
  2. Click Roles and Features
  3. Enable the Hyper-V role and click Apply:
  4. You will be prompted to Reboot, click Restart now

    You machine will reboot and after configuring Windows will reboot once again

    You should now have a full Hyper-V Server Core installation, pat yourself in the back, you deserve it.  Now…how do you do stuff with it?  Well, first and foremost, CoreConfigurator has a Hyper-V settings button:

From that setting you should be able to start/stop VMs:

But what about controlling the Hyper-V settings from a Hyper-V manager from another machine?  The good news is that is possible, and the bad news is that is not straightforwards.  Luckily for us, John Howard was cool enough to write a utility that enables a much easier configuration: the Hyper-V Remote Management Configuration Utility

Read the instructions carefully and you should be able to control your Server Core Hyper-V from a remote Hyper-V machine:

How to Create Startup Items on Server Core

Wednesday, December 31st, 2008

Things changed a bit from Windows Server 2003 to Windows Server 2008 when it comes to startup items. In W2K8, the place where you want to put items launched at startup is:

C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup

This works great, but what about Server Core? The path exists and you can place all you want in there, but guess what? When you log into the server core machine, nothing happens and this is most likely because there is no start menu ;)

The fix to this is to modify your registry in Server Core:

  1. Launch RegEdit by typing regedit at the command prompt
  2. Access the following registry key: HKLM\Software\Microsoft\Windows\CurrentVersion\Run
  3. Right click on the right pane and select New -> String Value
  4. Name the String something relative to what you are launching, for instance Launch Notepad
  5. Double click on the key that you just created to edit the string
  6. Enter the path of the executable, script, etc. that you want launched in this key and click OK
  7. Click OK, logoff and the next time anyone logs in, Notepad (in my case) will be launched – easy as pie!

Sources:

http://forum.sysinternals.com/forum_posts.asp?TID=15330