Azure, Azure and Azure

May 18, 2016

Understand Azure datacenter architecture, regional availability, and high availability
Microsoft Contributes Next Generation Server Design to Open Compute Project:
http://blogs.technet.com/b/msdatacenters/archive/2014/10/31/microsoft-contributes-next-generation-server-design-to-open-compute-project.aspx  
Building and Managing Cloud-Scale Data Centers:
http://rt.ms-studiosmedia.com/events/2014/1403/106208/Cloud_Scale/Default.html 
How Microsoft Designs its Cloud-Scale Servers:
http://download.microsoft.com/download/5/7/6/576F498A-2031-4F35-A156BF8DB1ED3452/How_MS_designs_its_cloud_scale_servers_strategy_paper.pdf 
Azure Fault Domain and Upgrade Domain Explained for IT Pros:
http://blogs.technet.com/b/yungchou/archive/2011/05/16/window-azure-faultdomain-and-update-domain-explained-for-it-pros.aspx  
Manage the Availability of Azure Virtual Machines:
http://azure.microsoft.com/en-us/documentation/articles/virtual-machines-manage-availability/ 
Azure Fabric Controller Internals: Building and Updating High-Availability Apps:
http://channel9.msdn.com/Events/Build/2014/3-627  
Azure Regions:
http://azure.microsoft.com/en-us/regions/  
Azure Services by Region:
http://azure.microsoft.com/en-us/regions/#services  
Developer Notes for Azure in China Applications:
http://msdn.microsoft.com/en-us/library/azure/dn578439.aspx  
Manage the Availability of Virtual Machines:
http://azure.microsoft.com/en-us/documentation/articles/virtual-machines-manage-availability/ 
Traffic Manager and Availability:
http://msdn.microsoft.com/en-us/library/azure/hh744833.aspx  
Disaster Recovery and High Availability for Azure Applications:
http://msdn.microsoft.com/en-us/library/azure/dn251004.aspx  

Design Azure virtual networks, networking services, DNS, DHCP, and IP addressing configuration 
http://msdn.microsoft.com/library/azure/jj156007.aspx 
Classless Inter-Domain Routing:
http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing  
How to Create a Virtual Network in Azure:
http://social.technet.microsoft.com/wiki/contents/articles/17789.how-to-create-a-virtual-network-inazure.aspx  
Understand ACLs and Network Security Groups
Virtual Network FAQ:
http://msdn.microsoft.com/en-us/library/azure/dn133803.aspx  
DNS Services:
http://msdn.microsoft.com/en-us/library/azure/jj156088.aspx  
Network Security Groups:
http://msdn.microsoft.com/en-us/library/azure/dn848316.aspx  
Regional VNets and Affinity Groups for Virtual Networks:
http://msdn.microsoft.com/en-us/library/azure/jj156085.aspx  
Instance-Level Public IP Addresses:
http://msdn.microsoft.com/en-us/library/azure/dn690118.aspx  
Reserved IP Addresses:
http://msdn.microsoft.com/en-us/library/azure/dn690120.aspx  
Static Internal IP Address (DIP) for a VMs:
http://msdn.microsoft.com/en-us/library/azure/dn630228.aspx  
Network Access Control Lists (ACLs):
http://msdn.microsoft.com/en-us/library/azure/dn376541.aspx  
VNET to VNET Connection:
http://msdn.microsoft.com/en-us/library/azure/dn690122.aspx  
Multiple NIC and Network Virtual Appliances:
http://azure.microsoft.com/blog/2014/10/30/multiple-vm-nics-and-network-virtual-appliances-in-azure/  
Internal Load Balancing:
http://msdn.microsoft.com/en-us/library/azure/dn690121.aspx  
Introduction to Microsoft Azure Networking Technologies and What’s New:
https://channel9.msdn.com/Events/TechEd/Europe/2014/CDP-B227  
A Records, CNAME, and Using DNS with Windows Azure Web Sites (WAWS):
http://azure.microsoft.com/blog/2013/11/21/a-records-cname-and-usingdns-with-windows-azure-web-sites-waws/

Understanding Azure – A Guide For Developers – An Official eBook Guide from Microsoft

May 18, 2016

Microsoft has released the latest Developers Guides on Azure eBook –. It covers the latest Azure platform services such as Azure Functions, Azure Service Fabric and Azure IoT application development. It’s FREE and you can get it from the link below. It’s a very good resource for developers who want to learn and keep up with the latest Azure technologies and best practices!

Azure_Developer_Guide_eBook.pdf

more free ebooks around Azure

Developing big data solutions on Microsoft Azure HDInsight – eBook

Microsoft Azure Essentials – Fundamentals of Azure

Microsoft Azure Essentials – Migrating SQL to Azure

Microsoft Azure Essentials: Azure Machine Learning

Planning and Preparing for Microsoft SharePoint Hybrid

The Security Development Lifecycle

Microsoft System Center Data Protection for the Hybrid Cloud

any my favorite Smile 

TCP/IP Fundamentals for Microsoft Windows 

Full ebook Gallery around Microsoft Technologies can be found here

Free ebooks from the MVA Academy here

Recommended hotfixes for Windows 2012 R2 failover clusters

April 27, 2016

there is no more the need to keep your own lists of clustering patches as this is now summarized in KB2920151. this includes the recommended Failover Cluster and as well the Hyper-V patches

Windows Server 2012 Failover Cluster patches are covered in KB2784261 and the recommended patches for Windows Server 2012 Hyper-V can be found here

worth to take a look at it to keep your clusters healthy, stay tuned

Powershell-3rd Party modules

April 27, 2016

there are several 3rd party Powershell modules available which enables you to manage your devices like F5 BIG or Cisco UCS with Powershell. just from my experience, the functions are limited but at least if offers you ability to automate basic reoccurring stuff like a.e. backup configuration and also a good starter to develop your own crazy stuff. here are 2 which I use currently and which I can recommend to take a look at

F5 – BIGIP

https://devcentral.f5.com/questions/big-ip-configuration-backup-restore
https://devcentral.f5.com/d/microsoft-powershell-with-icontrol
https://support.f5.com/kb/en-us/solutions/public/11000/300/sol11318.html

Cisco UCS Powertool

https://communities.cisco.com/docs/DOC-37154

Around Cisco UCS you can also check out this site from joemar which provides lots of examples for management UCS centers

https://communities.cisco.com/people/joemar/content

there are many more out there so please share any 3rd party modules you would recommended and I will add them to this list

Thanks and stay tuned Winking smile

Ramazan

KB3000850–November Rollup 2014

December 4, 2014

3000850 is a recommended rollup for failover clusters. beside few others a lot of fixes around Hyper-V and Clustering are included.

A cumulative update that includes the security updates and nonsecurity updates including Failover Clustering updates that were released between April 2014 and November 2014. Available from Windows Update and for individual download from Download Center. To apply this update, you must first install the update 2919355 on Windows Server 2012 R2.

Checkout the details here

http://support.microsoft.com/kb/3000850

http://support.microsoft.com/kb/2920151

Powershell-Generate Automated CSVFreespace and Memory Report

December 4, 2014

This script relies the Hyper-V clusters are been managed by VMM but if you do not use VMM you can also modify based on your environment. It should just give you an idea how to collect data and use sentmail function to get a daily report of your resource status.

Note: script version 1.3 is targeted to be run as a task so no console outputs are considered, just a logfile is written into same folder where is script is located

as no user interaction is possible because we want to use this as a task following variables has to be updated in the script

$VMMServer = "YOURVMMSERVER"
$smtpServer = "YOURSMTP"
$smtpFrom = "johndoe@mydomain.com"
$SMTPPort = "25"
$Username = "johndoe@mydomain.com"
$Password = ‘YOURPASSWORD’
$smtpTo = reports@mydomain.com

#
#Creator: Ramazan Can
#V1.2 	- dumping into log and generating mail with function "SentReportviaMail"
#		- mail sender, recipient, account for authentification can be modified in function "SentReportviaMail"
# 				$smtpFrom - $Username - $smtpTo 
#V1.3	- task scheduler version

#Write-Host " "
import-module virtualmachinemanager
import-module failoverclusters
$VMMServer = "YOURVMMSERVER"
$VMMClusters=(Get-SCVMHostCluster -vmmserver $VMMServer).Name
$timestamp=(get-date -Format d).Replace("/","_")
$date=Get-date
Get-item ".\CSVandMemory_Report_$timestamp.txt" -ea 0 | Remove-Item -ea 0
$logfile=".\CSVandMemory_Report_$timestamp.txt"

"This Report was run at $date " | out-file -filepath $logfile -append
" " | out-file -filepath $logfile -append

function GetCSVFreeSpace {
#incorporated and modified from http://blogs.msdn.com/b/clustering/archive/2010/06/19/10027366.aspx
$objs = @()

$csvs = Get-ClusterSharedVolume -Cluster $Cluster
foreach ( $csv in $csvs )
{
   $csvinfos = $csv | select -Property Name -ExpandProperty SharedVolumeInfo
   foreach ( $csvinfo in $csvinfos )
   {
      $obj = New-Object PSObject -Property @{
         Name        = $csv.Name
         Path        = $csvinfo.FriendlyVolumeName
         Size        = $csvinfo.Partition.Size
         FreeSpace   = $csvinfo.Partition.FreeSpace
         UsedSpace   = $csvinfo.Partition.UsedSpace
         PercentFree = $csvinfo.Partition.PercentFree
      }
      $objs += $obj
   }
}

$objs | ft -auto Name,Path,@{ Label = "Size(GB)" ; Expression = { "{0:N2}" -f ($_.Size/1024/1024/1024) } },@{ Label = "FreeSpace(GB)" ; Expression = { "{0:N2}" -f ($_.FreeSpace/1024/1024/1024) } },@{ Label = "UsedSpace(GB)" ; Expression = { "{0:N2}" -f ($_.UsedSpace/1024/1024/1024) } },@{ Label = "PercentFree" ; Expression = { "{0:N2}" -f ($_.PercentFree) }}
}

function SentReportviaMail {
$logfile=(Get-item ".\CSVandMemory_Report*" -ea 0).Name
$Logs=Get-Content $logfile
$smtpServer = "YOURSMTP"
$smtpFrom = "johndoe@mydomain.com"
$SMTPPort = "25"
$Username = "johndoe@mydomain.com"
$Password = 'YOURPASSWORD'
$smtpTo = "reports@mydomain.com"
$messageSubject = "$VMMServer - Automated CSV FreeSpace and Total Memory Report"

[string]$messagebody = ""

foreach ($log in $logs )
{
	$messagebody = $messagebody + $log + "`r`n"
}
#Write-Host " "
#Write-Host "Starting to sent mail to $smtpTo via $smtpServer ...." -ForegroundColor green
$smtp = New-Object Net.Mail.SmtpClient($smtpServer)
$smtp.Credentials = New-Object System.Net.NetworkCredential($Username, $Password);
$smtp.Send($smtpFrom,$smtpTo,$messagesubject,$messagebody)
#Write-Host "mail sent completed " -ForegroundColor green
#Write-Host " "
}


foreach ($Cluster in $VMMClusters)
{
	#Write-Host "Starting to collect memory and CSV free space data in $Cluster ....." -foregroundcolor green
	[int]$TotalFreeMemory = 0;
	[int]$TotalMemory = 0;
	$ClusterNodes = Get-Cluster $Cluster | Get-ClusterNode
	foreach ($ClusterNode in $ClusterNodes)
	{
		[int]$FreeMemory = [math]::round(((Get-WmiObject -ComputerName $ClusterNode -Class Win32_OperatingSystem).FreePhysicalMemory / 1MB), 0)
		[int]$TotalFreeMemory = [int]$TotalFreeMemory + [int]$FreeMemory
		[int]$NodeMemory = [math]::round(((Get-WmiObject -ComputerName $ClusterNode -Class Win32_OperatingSystem).TotalVisibleMemorySize / 1MB), 0)
		[int]$TotalMemory = [int]$TotalMemory + [int]$NodeMemory

	}

	$TotalAvailableMemory = $TotalFreeMemory - $NodeMemory
 
	"Cluster: $Cluster" | out-file -filepath $logfile -append
	"Total Memory: $TotalMemory" | out-file -filepath $logfile -append
	"Total Free Memory: $TotalFreeMemory" | out-file -filepath $logfile -append
	"Total Available Memory: $TotalAvailableMemory" | out-file -filepath $logfile -append
	" " | out-file -filepath $logfile -append
	"CSV Freespace : " | out-file -filepath $logfile -append
	GetCSVFreeSpace | out-file -filepath $logfile -append
	" " | out-file -filepath $logfile -append
}
SentReportviaMail

example output mail:

image

Disclaimer: Please read, understand and test script before you run put in production! This should just give you an idea around the power of powershell and automation

 

best practices for running AV on SQL servers

September 25, 2014

Running Antivirus software is critical part of server security but it is also important to understand the impact and effect it has on SQL Server. here is some really good guidance on how to configure AV and exclusions.

1. SQL Server Data Files (files with extensions like .MDF, .NDF)
2. SQL Server Log Files (files with extensions like .LDF)
3. SQL Server Backup files (files with extensions like .BAK and .TRN)
4. Full-Text Catalog Files
5. SQL Server Audit Files
6. SQL Server Query Files (Extensions like .SQL)
7. Trace/Profiler Files (Extensions like .TRC)
8. Entire Directory that is holding Analysis Services files that is used for processing Cubes and used for queries that are reading files in to the data folder and the temp folder.
9. Folder where Analysis Services Backups Files Reside
10. Exclude SQLServer.Exe file (This is the main database engine file)
11. ReportingServicesService.Exe
12. MSMDSrv.exe
13. Cluster Directory (Usually it is C:\Windows\Cluster) *If your servers are clustered
14. Cluster Quorum Drive
15. FILETABLE and Filestream folders

Reference full article here

Powershell–How to monitor HP Smartarray disk status?

July 4, 2014

really a quick one and straight forward but sometimes very useful. here is a quick example how you can monitor your smartarray controller disk status and in case of “Failed” drive detected sent a mail out to you with the summary.

Of course, SCOM has also automated capabilities to monitor HP hardware components in a much more efficient way but that’s a another story

Prerequisites are:

– depends on your SA version – you need the “HP ProLiant Array Configuration Utility (CLI) for Windows” and can be found here, the user guide here

– if required, modify program path to hp array utility command line tool "C:\Program Files\HP\hpssacli\bin\hpssacli.exe"

– modify smtp settings $smtpServer, $smtpFrom, $SMTPPort, $Username, $Password and $smtpTo

– modify $localhost

– check if your controller is 0 “controller slot=0”

###Code Snippet###

$localhost="PUTYOURSERVERNAMEHERE"
Get-item ".\log.txt" -ea 0 | Remove-Item -ea 0
$logfile=".\log.txt"

function CheckSmartArray {
Write-Host " "
Write-Host "Checking SmartArray on system"$localhost"" -foregroundcolor green
C:\Windows\System32\cmd.exe /c "C:\Program Files\HP\hpssacli\bin\hpssacli.exe" controller slot=0 physicaldrive all show
}

CheckSmartArray | out-file -filepath $logfile -append

function SentDiskDrivefailedviaMail {
$Logs=Get-Content $logfile
$smtpServer = "yoursmtp.server.com"
$smtpFrom = "sender@yourdomain.com"
$SMTPPort = "25"
$Username = "user@yourdomain.com"
$Password = "passwordhere"
$smtpTo = "recipient@yourdomain.com"
$messageSubject = "Disk Drive failed at $localhost"

[string]$messagebody = ""

foreach ($log in $logs )
{
    $messagebody = $messagebody + $log + "`r`n"
}
Write-Host "failed disk detected – starting to sent mail to $smtpTo via $smtpServer …." -ForegroundColor red
$smtp = New-Object Net.Mail.SmtpClient($smtpServer)
$smtp.Credentials = New-Object System.Net.NetworkCredential($Username, $Password);
$smtp.Send($smtpFrom,$smtpTo,$messagesubject,$messagebody)
Write-Host "mail sent completed " -ForegroundColor green
Write-Host " "
}

#Check logfile if a "Failed" status can be found, if true send a mail with "SentDiskDrivefailedviaMail" function
[array]$logcontent=gc $logfile
foreach ($line in $logcontent) {
    if ($line -match "Failed") {
    Write-Host " "
    write-host "failed disk found at $localhost " -foregroundcolor red
    write-host "detailed logs can be found $logfile " -foregroundcolor red
    Write-Host " "
    SentDiskDrivefailedviaMail
    }
}

###Code Snippet###

Sample Output from smart array CLI utility “controller slot=0 physicaldrive all show”

image

Disclaimer: Please read and test script before you run in your production!

Powershell-How to easily verify patch level between computers

July 4, 2014

Compare patches between computers? Here is a quick and easy way how you can verify this with Powershell

$node1 = Get-HotFix -ComputerName SERVER1
$node2 = Get-HotFix -ComputerName SERVER2
Compare-Object -ReferenceObject $node1 -DifferenceObject $node2 -Property HotFixID

Example Output:

HotFixID                                                    SideIndicator
——–                                                    ————-
KB2862152                                                   =>
KB2876331                                                   =>
KB2884846                                                   <=
KB2892074                                                   <=
KB2894029                                                   =>

The Compare-Object cmdlet compares two sets of objects. One set of objects is the "reference set," and the other set is the "difference set."

The result of the comparison indicates whether a property value appeared only in the object from the reference set (indicated by the <= symbol), only in the object from the difference set (indicated by the => symbol) or, if the IncludeEqual parameter is specified, in both objects (indicated by the == symbol).

Compare-Object is really powerful, check it out

http://technet.microsoft.com/en-us/library/hh849941.aspx

Powershell – How to get total VM memory overview (dynamic, static and startup memory) per node in a cluster?

June 16, 2014

Host Memory Pressure – I think this is one of the keys (in addition to storage, network, CPU) in performance when running virtualization with dynamic memory and should be monitored. An balance between high density of running VMs on a host and memory calculation/demand is something to consider when managing self service clouds and/or running memory intensive workloads.

Write-host " "
Write-Host " "
$Cluster = Read-Host "Cluster Name "
cls
Write-Host " "
Write-Host "Starting to check VM Memory pressure on $Cluster nodes " -ForegroundColor green
Write-Host " "
Write-Host "Collecting data like nodes, VMs Memory….please be patient" -ForegroundColor green
Write-Host " "
Write-Host " "
$Hostnames=(Get-Cluster $Cluster | Get-ClusterNode).Name
#$Hostname=(Get-VMhost).Name

foreach ($Host1 in $Hostnames) {
[int]$hostmem=@{} | Out-Null
[int]$totalstartupmem=@{} | Out-Null
[int]$totalmaxmem=@{} | Out-Null
[int]$staticmemory=@{} | Out-Null
[int]$overcommited=@{} | Out-Null
[int]$totalramrequired=@{} | Out-Null

$AllVMs=(get-vm -ComputerName $Host1).Name
$Hostmem=(Get-VMhost -ComputerName $Host1).MemoryCapacity / 1024 / 1024 / 1024

foreach ($VM in $AllVMs) {
$CurrentVM=(get-VM $VM -ComputerName "$Host1" | fl *)
if ((Get-VMMemory -vmname $VM -ComputerName "$Host1").DynamicMemoryEnabled -eq "True") {
$memorystartup=(get-vm $VM -ComputerName "$Host1" | select-object MemoryStartup).MemoryStartup /1024 / 1024 / 1024
$MemoryMaximum=(get-vm $VM -ComputerName "$Host1" | select-object MemoryMaximum).memorymaximum /1024 / 1024 / 1024
$totalstartupmem += $memorystartup
$totalmaxmem += $MemoryMaximum
}
else {
$static=(get-vm $VM -ComputerName "$Host1" | select-object MemoryStartup).MemoryStartup /1024 / 1024 / 1024
$staticmemory += $static
}
}
$totalramrequired=$totalstartupmem + $staticmemory

write-host "Summary Report for Host $Host1" -foregroundcolor green
write-host "Total Startupmem for Dynamic VMs $totalstartupmem GB " -foregroundcolor green
write-host "Total Staticmem for Static VMs $staticmemory GB " -foregroundcolor green
write-host "Total minimum RAM (Startup+Static) required $totalramrequired GB " -foregroundcolor yellow
write-host "Total Maxmem for Dynamic VMs $totalmaxmem GB " -foregroundcolor yellow
write-host "Total available memory $Hostmem GB " -foregroundcolor green
if ($totalmaxmem -gt $Hostmem) {Write-Host "$Host1 is overcomitted " -foregroundcolor red}
write-host " "
write-host " "
}

image

This is just one way to get a total summary per node in your Hyper-V cluster and their configured memory demand. It provides a quick view on memory utilization of your Hyper-V nodes. Be creative and modify based on your needs.

Disclaimer: Please read and test script before you run in your production!

Dynamic Memory Pressure Monitoring:

http://blogs.msdn.com/b/virtual_pc_guy/archive/2010/09/01/looking-at-dynamic-memory-performance-counters.aspx

…a “bad” configuration can result in “bad” performance:-)

Stay tuned…


Follow

Get every new post delivered to your Inbox.

Join 54 other followers