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

How to install HPC Pack Remotely

August 12th, 2010

If you are carrying an HPC deployment where you deploy the operating system by your own means (wds, ghost, true image, etc.) and will run the HPC pack on the nodes, it’s actually quite easy to install the HPC pack on the node w/o logging in at all. I’m assuming your nodes are already part of the domain where the cluster will run.

First, download psexec and place it on c:\windows\system32\ on your headnode. Then, open a command prompt and enter:

psexec -s \\[NODE-NAME] \\hpc-hn\REMINST\setup.exe -unattend -computenode:[CLUSTER-NAME]

Make sure to replace [NODE-NAME] & [CLUSTER-NAME] with your values. That command will take about 1 minute to run and sooner than later, you will have the node showing up on cluster manager waiting for a template, no need to log on the node at all!


How to Install DPM 2010 Agents Remotely

August 4th, 2010

We’re currently setting up System Center DPM 2010 in an environment where we were using DPM 2010 RC. I can’t seem to add the agents to remote machines via the console, most likely because of firewall issues. I decided to write a small script to automate the process of installing the DPM agent to any machine from within the DPM server. The final script follows:

#Change the variable below to your DPM server
$DPMServer = "pacbu"
#Change the variable below to the path of the DPMAgentInstaller from the DPM Installation bits (UNC path recommended)
$PathToDPMAgentInstaller = "\\grant\Products\System Center\Data Protection Manager 2010\Agents\DPMAgentInstaller_x64.exe"

$machine = Read-Host("Enter the name of the machine to install the agent:")
#Try and remove old agent#Change the variable below to your DPM server
$DPMServer = "pacbu"
#Change the variable below to the path of the DPMAgentInstaller from the DPM Installation bits (UNC path recommended)
$PathToDPMAgentInstaller = "\\grant\Products\System Center\Data Protection Manager 2010\Agents\DPMAgentInstaller_x64.exe"

$machine = Read-Host("Enter the name of the machine to install the agent:")
#Try and remove old agent
Start-Process psexec -wait -args  ("\\" + $machine + " -s Msiexec /x {07CCDE6A-1D92-2C9C-D091-9E682643ABCC} /quiet /forcerestart")
#Enable Execution of Remote PowerShell Scripts
Start-Process psexec -wait -args ("\\" + $machine + " -s powershell Set-ExecutionPolicy remoteSigned")
#Enable WinRM for Remoting
Start-Process psexec -wait -args ("\\" + $machine + " -s powershell Enable-PSRemoting -force")
#Copy file locally
copy $PathToDPMAgentInstaller "\\$machine\c$\"
#Create new session
$session = New-PSSession -computername $machine
#Install Agent
icm -session $session -scriptBlock {C:\DPMAgentInstaller_x64.exe}
#Time it takes to install
Sleep 90
#For some reason, the installer hangs even though it's finished - kill it!
icm -session $session -scriptBlock {Stop-Process -processname 'DPMAgentInstaller_x64'}
#Connect Agent to DPM Server
Start-Process psexec -wait -args ("\\" + $machine + ' -s "C:\Program Files\Microsoft Data Protection Manager\DPM\bin\SetDpmServer.exe" -dpmServerName ' + $DPMServer)
#Cleanup
icm -session $session -scriptBlock {rm C:\DPMAgentInstaller_x64.exe}
Exit-PSSession
Remove-PSSession $session

Launch the script with PowerShell and it will ask you which machine you would like to install the agent on. Right off the bat, the script will try and enable PowerShell with Execution Policy of RemoteSigned, and it will then try to enable remoting.

As you look at the script the script, you might ask yourself why on Earth am I using psexec and PowerShell remoting in the same script. The section that calls the DPMAgent installer was not working for me with psexec, so I gave Remoting a shot. I’ve also wanted to play with PS Remoting and I really cannot believe how powerful it is – I don’t think I’ll be opening a remote connection to manage many machines anymore.

Note that when the psexec windows open up, you might have to hit Return to close them.

Management in Windows HPC Server 2008 R2

July 18th, 2010

As I am documenting a lab, I’m playing with the RC version of Microsoft Windows HPC Server 2008 R2, which you can download from connect.microsoft.com. As I am documenting some of the features, I have noticed a lot of things have changed in the GUI, and thought about documenting them here since these minor details will probably will not in the lab itself.

The Icon

“Pfft, the icon?” you may ask, but this is a welcomed addition. I for one, could never tell the icon from Server Manager and Cluster Manager, they were too much alike. The new icon sports a modern look:

Node View Improvements

The Node View displays a wealth of information just by looking at the regular node tab. v2 of Windows HPC Server had the following tabs: Properties, Network, Metrics, Operations, and Provisioning Log (click on any image for a better look):

v3 has the following tabs: Node Health, Properties, Network, Metrics, Operations, and Provisioning Log. The Node Health tab is incredibly useful feature, as you can now get a general idea of the node state by looking at this tab. The pivoting links provide a quick access to other related areas of that have to do with this node:

The Heat Map

The Heat Map has gone a mayor overhaul, starting with the introduction of Tab Actions. This feature allows you to have multiple heat maps (each still can have up to 3 metrics), but by having as many Node Map Action tabs, you can have as many Heat Maps with different metrics as you’d like, which is incredibly useful IMHO:

One of my major gripes in v2 was the lack more metrics than the ones that were available for monitoring. v3 is not shy on the metrics that are now available, and you can see it in when selecting the metrics for List Views:

I’ll keep posting small posts on more things that I find differently. So far, V3 feels like a great improvement. Windows HPC Server has come a long way, and it’s nice to have seen its evolution since the days when it had the “Compute Cluster 2003” name.


ScorpioTek Delivers HPC Training at UANL

June 17th, 2010

On June 16th and June 17th, ScorpioTek delivered an intensive HPC training for IT professionals in Monterrey México at the Universidad Autónoma de Nuevo Léon. The training was delivered by using a remote virtual lab infrastructure, so the on-site setup was minimal (basically a laptop and Internet connection).

We had the chance to work Gerardo, Susan, and Jesús – the IT masterminds make up part of the team that keep all the servers at UANL running smoothly. In 2 days we drilled down in the details needed for them to eventually start testing Windows HPC Server 2008 for an eventual deployment to support various departments. The plan is have a scalable infrastructure up and running to support research activity from grad students in various departments.

Since this was a small group, we quickly turned the training to a round table format, in which we had a constant discussion while touching very important topics when deciding how to setup an HPC cluster in Windows.

Working with them was great, they were a very hospitable and fun to work trio. The last day we delayed the training for a bit to watch México beat France 2-0 in the World Cup, which was a fun game to watch and definitely worth it! :)


Where is HPC Pack SP2?

June 15th, 2010

HPC Pack SP2 was released a while back, but if you try and find it, you won’t be able to – what gives? After searching a bit in the Windows HPC Server Job Submission and Scheduling forums, I found the answer:

A minor issue was found in SP2 that could affect users who have applications that interact with the HPC job scheduler via COM. While we prepare a fix for the issue we have disabled the downloads of SP2.

So basically, you have to wait for a fix for this issue, or you can go ahead and download the beta of v3 from Connect.


HPC Server 2008 Heat Map Resuscitation: Now with more Vitamins

June 5th, 2010

In a previous post, I cranked up a script using PowerShell and psexec to fix the heat map problems that may happen with Windows HPC Server 2008. The script waited for each node to complete, which could take hours to perform if your cluster is big.

In order to solve this problem, I upgraded the head node’s PowerShell to v2.0 (HPC Server ships with PowerShell 1.0) and was now able to use the Start-Process process. This leads to having the script run in no time at all. Here is the code:
#Uncomment line below if running from a regular PowerShell Window
#Add-PSSnapin "Microsoft.HPC"
#Change the HPC-HN value below to match the name of your head node
$HEAD_NODE = "HPC-HN"

#Obtain Compute Nodes
$nodes = Get-HpcNode -GroupName ComputeNodes

Write-Host "Setting Head Node To:" $HEAD_NODE
Set-Content Env:CCP_SCHEDULER $HEAD_NODE
#Stop Head Node Services
Stop-Service -Force HpcManagement
Stop-Service -Force HpcNodeManager
Stop-Service -Force HpcSdm

$services = "HpcManagement", "HpcNodeManager"
#Stop the services on all compute nodes
foreach ($node in $nodes)  {
foreach ($service in $services) {
 $serviceStop = "net stop $service"
 $computer = $node.NetBiosName
 $computer = "\\$computer"
 Write-Host ("Executing command: psexec " + $computer + " " + $serviceStop)
 Start-Process psexec -args ($computer + " " + $serviceStop)
 }
}

Write-Host("Waiting 10 seconds for services to stop")
#Change the value below if you have a large number of nodes
Sleep(10)

foreach ($node in $nodes)  {
foreach ($service in $services) {
 $serviceStart = "net start $service"
 $computer = $node.NetBiosName
 $computer = "\\$computer"
 Write-Host ("Executing command: psexec " + $computer + " " + $serviceStart)
 Start-Process psexec -args ($computer + " " + $serviceStart)
 }
}
Write-Host("Waiting 20 seconds for services to start")
#Change the value below if you have a large number of nodes
Sleep(20)
#Start Services on Head Node
Start-Service HpcManagement
Start-Service HpcNodeManager
Start-Service HpcSdm
Write-Host("Your nodes should show up in the heat map in a about a minute")
And of course, we need to have a video. Here is the script in action with 4 nodes that are not displaying their info on the heat map:


México HPC IT Pro Event

June 5th, 2010

Last Friday marked the end of a 3-day event in México City around High Performance Computing for IT Professionals. The attendees learned everything they need to know regarding Windows HPC Server 2008 in terms of setup, scheduling jobs, PowerShell, command line, network topologies, SOA, job templates, node templates, and node groups. The crowd was great to work with, highly-skilled individuals form different backgrounds, some wanting to get their feet wet with this technology, and other experienced folks who wanted to learn more about advanced topics.

This was my first time in México City and it’s unfortunate that I could not stay a bit longer to get to know the city a little better. At least we got to try authentic Mexican food and ate at a legitimate “Taquería” close to the event venue, the “Borrego Viudo” while watching the Mexican soccer team beat Italy in the World Cup:

As a follow-up to our attendees, I would like to communicate the following:

  1. Your diplomas for the course completion can be obtained from KED starting June 7th (contact person is Liliana Gutiérrez)
  2. If you would like a copy of the training material, please drop me an e-mail and I’ll make sure you get a copy (csaborio at scorpiotek dot com)

Now, off to TechEd NA 2010!


HPC Server 2008 Heat Map Resuscitation with PowerShell

May 31st, 2010

Note: This script will work with PowerShell v1.0 and is slow.  If you would like a faster version and you are willing to upgrade your head-node to v2, check this post instead.

I’ve been working in creating a series of demos for a couple of HPC trainings we are delivering this month.  One of the things that I’ve noticed with the heat map, is that when restoring the nodes from a snapshot (they are virtual nodes) the heat map fail to display the info.  This is due to some services on the nodes not starting and failing to communicate with the head node.  The solution is to go through every node and restart this service.  Good luck doing that if you are running a 1,000 node cluster!

You might think “well, why not just use clusrun to stop and start the service?”  Thought of that and then realized that one of the services that need to be restarted is the one that is used for clusrun, so as soon as you shut it down, your clusrun session is over.

Once again, psexec and PowerShell save the day.  If you would like to restore heat map functionality from the head node to all nodes on your cluster, follow these steps:

  1. Download and drop a copy of psexec on c:\Windows\System32 on your head node
  2. Copy the PowerShell code below and save it in a file, say “C:\FixHeatMap.ps1″
    $HEAD_NODE = "HPC-HN"
    Write-Host "Setting Head Node To:" $HEAD_NODE
    Set-Content Env:CCP_SCHEDULER $HEAD_NODE
    
    $nodes = Get-HpcNode
    $services = "HpcManagement", "HpcNodeManager"
    
    foreach ($node in $nodes)  {
    foreach ($service in $services) {
    
    $serviceStart = "net stop $service"
    $serviceStop = "net start $service"
    $commandBytesStart = [System.Text.Encoding]::Unicode.GetBytes($serviceStart)
    $commandBytesStop = [System.Text.Encoding]::Unicode.GetBytes($serviceStop)
    $encodedStartCommand = [Convert]::ToBase64String($commandBytesStart)
    $encodedStopCommand = [Convert]::ToBase64String($commandBytesStop)
    $commandLine += $encodedCommand
    
    $computer = $node.NetBiosName
    $computer = "\\$computer"
    
    psexec $computer cmd /c "echo . | powershell -EncodedCommand $encodedStartCommand"
    psexec $computer cmd /c "echo . | powershell -EncodedCommand $encodedStopCommand"
    }
    }
    #Start the service that retrieves info from CN to heat-map
    net stop HpcSdm
    net start HpcSdm
    
  3. Edit the text of the file so that $HEAD_NODE = “HPC-HN” matches the name of your head node
  4. Open an HPC PowerShell command prompt and launch the script, here is the script in action with 4 nodes:

One of the things you will notice is that it can be slow as 3 services are started and stopped for every node via a remote call with psexec.  I know the process can be long but I don’t have time to optimize it.  If there are PowerShell gurus that would like to chip in, please be my guest!

Sources

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

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 use QuickSFV to verify file integrity

May 22nd, 2010

We usually exchange large files with our customers, such as highly compressed virtual machines.  Compression works perfectly for us, as it allows us to send a VM as one file, which is usually a self-extracting archive.  However, downloading files opens up the possibility of download corruption, which can render the compressed archive useless.

In order to avoid corrupted downloads, you should use a download manager that allows you to resume the download in case it breaks.  We’ve had good luck recently with Internet Download Manager.

In order to verify that no corruption has happened during the transfer process, we usually send our clients a sfv file.  This file is intented to be used with QuickSFV in order to verify that the download is not corrupt .  The following guide will instruct you on how to use QuickSFV to verify that your download is not corrupt.

Assumptions

We are assuming that you:

  1. Already have the files downloaded somewhere on your computer
  2. Already have installed QuicSFV on the computer where the files were download (make sure you install the correct one if you are using a 64-bit OS)
  3. Have placed the sfv in the same folder where the files you want to check are located

Procedure

  1. Navigate to the folder where your downloaded files are
  2. Double click the sfv file
  3. QuickSFV will start checking your files.  Depending on the size of the files, this might take some time

    Verification in Progress

  4. If you see a dialog similar to the one below that displays All files OK, you are good, the files have been verified:

    Pass

  5. If you see the dialog below, pay attention to which file is corrupt and re-download the file:

    Fail

Parting Words

ALWAYS use a download manager for large files, you’ll be sorry if you stick to FireFox/Internet Explorer for these types of downloads.

Consider donating to QuickSFV, it’s a great utility that can save you hours of pain.