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 Fix “Failed to initialize Azure emulator” Error

January 22nd, 2012

 

This is what I did to install Azure on my machine

  1. Installed Visual Studio 2010 Full
  2. Downloaded the Azure SDK via the WebPI and installed

I then created a simple MVC project and when debugging, I get the error below:

2012-01-22_1208

Windows Azure Tools: Failed to initialize Windows Azure storage emulator. Unable to start Development Storage. Failed to start Storage Emulator: the SQL Server instance ‘localhost\SQLExpress’ could not be found.   Please configure the SQL Server instance for Storage Emulator using the ‘DSInit’ utility in the Windows Azure SDK.

To fix it, access Start –> All Programs –> Windows Azure SDK for .NET – November 2011 –> Windows Azure Command Prompt

And type:

dsinit /sqlInstance:.

The database should be successfully created and you should be on your way!

2012-01-22_1910

How to get rid of ghost networks in Windows

January 18th, 2012

This is something that is bound to happen if you have virtual machines and you remove a NIC.  Say for instance that you have a VM that has a virtual network and under Network Adapters you give the name “Public”.  A few weeks later, you remove the virtual NIC, add a new NIC and then want to rename the NIC from “Local Area Connection” to “Public”.  You will most likely see this message:

Cannot rebame this connection.  A connection with the name you specified already exists.  Specify a different name.

So you take a peak at the Device Manager to find the old network to nuke it – good luck with that, you won’t find it!  Why?  The old NIC is hidden, and even if you select to view hidden devices in the device manager it won’t show up.  Why?  I have no idea:

No Ghost NIC 

So here is what you need to do:

  1. Close Device Manager if already open
  2. Open a command prompt as administrator
  3. Type:
    1. SET DEVMGR_SHOW_NONPRESENT_DEVICES=1
    2. START DEVMGMT.MSC

Device Manager will show up.  From the View menu, select Show hidden devices:

Show Hidden Devices

And just like that, your ghost networks will show up:

Ghost NICs Found!

Nuke the ghost NICs and now your new NIC can have its old name back! 

How to Upgrade Microsoft HPC Server SP2 to SP3

November 16th, 2011

Windows HPC Server 2008 R2 SP3 was released not too long ago and I am upgrading an SP2 cluster .   This guide will show what I did to upgrade from version 3.2.3716 to version 3.3.3950:

3959

Assuming you have the bits ready, let’s get ready.

BTW, this assumes you do not want to preserve data from your database, if you want to preserver this data, follow this link.

  1. Uninstall everything from your head node from the previous SP2 install (yes, this will break your cluster)
  2. Install SP3 on the head node as you did the first time.  As you can see from the screenshot below, the old DB instance will be detected and data will be nuked.  Check the link above to upgrade w/o losing DB info.

    Installation screen

  3. Start Cluster Manager
  4. Carry out all the “Deployment Tasks” as you usually do.
  5. You’ll now see all your nodes in an Unapproved state, this is because the template they were associated with was nuked in the update.   Assign a node template to your compute nodes/workstation nodes.
  6. To upgrade your compute/workstation nodes, download the “HPC2008R2-SP3-Update-x64.zip” file from http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=28017
  7. Unzip the file, and place the installer files on the head node, for example \\HEAD-NODE\public\HPC2008R2-SP3-Update-x64\
  8. Use clusrun to update all nodes besides the head node:
  9. clusrun /exclude:%COMPUTERNAME% \\HEAD-NODE\Public\HPC2008R2-SP3-Update-x64\HPC2008R2_SP3-x64.exe -unattend -systemReboot
  10. Your nodes will take a while to process the update, will reboot and will then be ready.  All done!! :-)

Some useful links:

 

 

How to Cut SCVMM Deployments to 1/2 of the Time

August 2nd, 2011

When dealing with SCVMM deployments, you may be aware that copies of VMs (clones, templates, etc.) are done via BITS using https. This means that any traffic from source through destination is encrypted, which might not be the desired functionality if you don’t need encryption.

Point in case: we are currently cloning 100 VMs (~40 GB each one) in a cluster. The time per VM to be cloned was about 40 minutes, which was too much. After some surfing, I came across the ‘AllowUnencryptedTransfers’ switch.  This is used with the Set-VMHostGroup comandlet to remove the encryption of the transfers.  This basically translates to “copies are going to be a lot faster!”

To activate this in your SCVMM hosts, all you need is this command:

Set-VMHostGroup -VMHostGroup “All Hosts” -AllowUnencryptedTransfers $true

You can then verify that the change took place by looking at the Get-VMHostGroup command and looking at this row:

After you set that, look at the jobs in your SCVMM console and enjoy the speed!  (in our tests the VM was cloned in 14 minutes vs. 30 minutes using https)

Booyah!

Hyper-V Script to “Migrate” a Virtual Machine

July 26th, 2011

We were having issues using the export command of SCVMM to export from a host that had a VM on local storage to a host that was clustered.  The error only reported that a “WMI issue” had happened.  I got a bit frustrated about this and wrote the following script to take care of the migration for me:

#Hyper-V PowerShell Module Location
Import-Module "C:\Program Files\modules\HyperV"
#============= VALUES THAT NEED TO BE MODIFIED ==============
# Name of the host that contains the VM to export
$SOURCE_HOST = "pac0915"
# Local Path of host where to store the export
$HOST_SOURCE_TARGET_DIR = "D:\Temp\"
# UNC Path of host where to store the export
$UNC_SOURCE_TARGET_DIR = "\\pac0915\d$\Temp"
# Name of the host that the export will go to
$DESTINATION_HOST = "pac0910"
# UNC Destination Directory where the export will be copied to
$UNC_TARGET_DIR = "\\pac0910\c$\ClusterStorage\Volume1"
# Local Destination Directory where the export will be copied to
$DESTINATION_TARGET_DIR = "c:\ClusterStorage\Volume1"
# Name of VM to Export
$VM_NAME = "O365-DC"
#============= END OF VALUES THAT NEED TO BE MODIFIED ==============

$SOURCE_VM = Get-VM -Name $VM_NAME -Server $SOURCE_HOST

#Shut Down VM
if ($SOURCE_VM.State -ne "Stopped") {
    Invoke-VMShutdown $SOURCE_VM
}

Export-VM -Force -Server $SOURCE_HOST -Wait -CopyState -VM $SOURCE_VM -Path $HOST_SOURCE_TARGET_DIR

Copy-Item -Force -Recurse ($UNC_SOURCE_TARGET_DIR + "\$VM_NAME") $UNC_TARGET_DIR

Start-Sleep(20)

Import-VM -Server $DESTINATION_HOST -Wait  -Paths ($DESTINATION_TARGET_DIR + "\$VM_NAME")



Migrating a 17 GB VM, the script took 8 minutes.  Cloning the same VM with SCVMM 2008 R2 SP1 took 15 minutes Ninja

BTW: You need to install the PowerShell Hyper-V scripts for this to work.

Activating Excel in a Topology 1 HPC Cluster

June 21st, 2011

I’ve been wanting to write this for a while but did not had the time (I still know I owe many of you the Azure post on taking an UDF to Azure, it’s in the works – I promise!).

Anyhow, the problem is the following: You have 1024 nodes with Excel, and you need to activate them with your KMS server.  Problem is that your nodes and the KMS server are NOT on the same network, that is – the compute nodes are isolated.

The easiest way to go about this has been enabling NAT and then issuing commands to manually activate each node with the KMS server using clusrun.

OK…so first things first…if you have your cluster already installed, access network configurations and make sure NAT is enabled:

Once you have enabled this and configured the wizard, open Remote and Routing Services, right click on NAT and select New Interface and select the NIC that has public access to your network:

Afterwards, select the following options and your NAT should be set:

Ok, that takes care of the NAT…before going further, find out the IP address of your KMS server and have it handy.

Now is a great time to see if you can ping your KMS server by its IP address from one of the compute nodes:

clusrun ping X.X.X.X

Open a command prompt from your head node and type the following command to set the KMs server:

clusrun cscript "c:\Program Files (x86)\Microsoft Office\Office14\ospp.vbs" /sethst:X.X.X.X

(make sure to substitute X.X.X.X by your KMS ip address.)

Wait about 10 seconds and cancel the clusrun job…that command returns a MessageBox which will prevent clusrun from finishing, we’ll assume it executed correctly.

Next type the following command (assuming you have 32-bit version of Office installed):

clusrun cscript "c:\Program Files (x86)\Microsoft Office\Office14\ospp.vbs" /act

Extra – Activating the OS of your compute nodes with KMS:

clusrun slmgr /skms X.X.X.X

…break clusrun after 10 seconds and then:

clusrun slmgr /ato

If someone knows how to avoid the GUI when activating Office or Windows Server, please let me know!

Microsoft Windows HPC Server 2008 R2 Links

June 21st, 2011

Here are some quick links that should help you with the development of HPC software on Windows.

Microsoft HPC Pack 2008 R2 SDK (includes link to sample downloads):

http://www.microsoft.com/download/en/details.aspx?id=12218

HPC Pack 2008 R2 MS-MPI Redistributable Package with Service Pack 1

http://www.microsoft.com/download/en/details.aspx?id=14737

HPC Pack 2008 R2 Express

http://www.microsoft.com/download/en/details.aspx?id=6535

HPC Pack 2008 R2 Client Utilities Redistributable Package with Service Pack 1

http://www.microsoft.com/download/en/details.aspx?id=17017

Concurrency Runtime Labs @ MSDN

June 21st, 2011

In today’s HPC Developer class in Melbourne, we talked quite a bit about the Parallel Performance Library (PPL) and the Task Parallel Library (TPL).  If you want to learn more about this subject, head over to MSDN and try out the 5 exercises on PPL on the “Designed for Performance” labs we authored a while ago:

http://msdn.microsoft.com/en-us/WindowsServer2008R2TrainingCourse_NumaUmsCppConcurrency

Extreme Web Services

June 19th, 2011

During various developer HPC courses, I have mentioned “Native Web Services”, which allows you to write SOA based applications using C++.  Windows HPC Server 2008 R2 adds support for running native web services on compute nodes; thus allowing to run native code at the compute nodes without the use of Windows Communication Foundation.

Not that there is anything wrong with WCF, but if you have a native C++ DLL that you’d like to turn into a SOA based app, Native We Services is the way to go to avoid performance issues because of interop.

Curious about Native web services?  Check out the following site that contains a lab we did some time ago.  It will guide you on writing a native C++ SOA DLL that can be invoked from C# or C++ to sort numbers:

http://msdn.microsoft.com/en-us/gg981626

How to solve: The type or namespace name ‘Session’ does not exist in the namespace ‘Microsoft.Hpc.Scheduler’

May 21st, 2011

If you attended one of the developer labs and are trying to create your SOA client (or use one of the already built solutions) and you are using the SDK from HPC Server 2008 R2 SP2 Beta, then you might see the following error:

The type or namespace name ‘Session’ does not exist in the namespace ‘Microsoft.Hpc.Scheduler’

This had me stomped for a while. For some reason, the default profile for C# apps in VS2010 SP1 is .Net Framework 4 Client Profile:

This profile is limited to seeing only the following references:

Which means that even if you add the Microsoft.Hpc.Scheduler.Session reference, it will not be able to use it.

The fix is easy, all you need to do is change the profile of your client to .Net Framework 4.0

You will then be able to see the references from the Add Reference dialog and everything will compile fine: