Showing posts with label Clustering. Show all posts
Showing posts with label Clustering. Show all posts

Friday, March 9, 2012

Windows 8 Beta–the platform comes together

I know I am bit late to the party, but if you have not done it already – you NEED to download the Win8 Server Beta.

Notice that “8” is written just that way.  With the parenthesis.

Windows Server 8 has lots of little new features.  Each on its own does not mean much, but bringing them all together makes for some really cool stuff.

For example: 

SMB 2.2 – to most of us the enhancements mean little other than a more reliable SMB protocol.  And since Windows is the main user of CIFS (the other name for SMB) then it also means nothing to non-CIFS customers.  However, its enhancements enable:

The HA File Server – okay, this is on feature that has been necessary for a long time.  Take the File Server Role and make it an active / active Failover Cluster.  Oh, to do that you needed:

Enhancements for Cluster Shared Volumes and Clustering in general.  Lots of little things here but they all add up to a big win for the platform as a whole.  Primarily, CSV moving to CSVFS – the v1 of the cluster file system.

Take those together and now you have a resilient, highly available File Server that you can use for VHDX / VHD storage behind Hyper-V, and SQL database storage (whoa) behind SQL.

This also enables the Hyper-V Live Migration without shared storage scenarios and migration of VMs in a checkout type of mode.  Such as from your test client to the share then to your development client.

Just a dusting of the features and how they align with each other to make a bigger platform package beyond the single Roles.

Oh, PowerShell everything..  More coming on that.  Lots to consume there.  If you don’t grok PowerShell yet, time to begin learning.  You can learn some coding basics at http://www.codeyear.org/ (go do it!).

Thursday, December 15, 2011

Making VMs highly available with PowerShell

If you have been following you will know that I have a bunch of copies of a MasterVM.

These were created using Export / Import so they are all nice and tidy in their own folders on the same volume.  If your target volume was a CSV (Cluster Shared Volume) then you are all set for this one and are ready for a multi-node cluster.  If your destination was not a CSV, but possibly another local volume, you can still make your VMs Highly Available, but you won’t be able to migrate.  This is fine for testing, but not really of high value in production.

Here is the script:

if ($highlyAvailable -match "yes") {
    write-progress -Id 1 "Making each VM highly available" -Status "Executing"
    # Make a remote session here to run the below loop passing in $arrUpdatedVms
    $session = New-PSSession -computerName $hypervHost
    Invoke-Command -scriptblock { Import-Module FailoverClusters } -session $session
    Import-PSSession -module FailoverClusters -session $session
    foreach($e in $arrUpdatedVms){
        $vm = $e.Split(",")
        $deviceName = $vm[0]
        Add-ClusterVirtualMachineRole -VirtualMachine $deviceName
    }
    write-progress -Id 1 "Making each VM highly available" -Completed $TRUE
}

The most interesting thing that I do here is that I am using Import-PSSession to bring the Clustering cmdlets (installed on the remote Hyper-V server) into my local script execution session.  This allows me to use the cmdlets as if they were installed locally, but without installing them.  This is pretty useful.

The hitch is that your networking cannot incur any blips.  Your session must remain solid or the script simply begins to fail.