Convert existing Azure Virtual Machines to use Hybrid Use Benefit

Hybrid Use Benefit (HUB) Allows customers with Software Assurance to use their on-premises Windows Server licenses to license Servers in Azure. With one Windows Server license, you can run two Windows Server Virtual Machines up to 8 Cores or a single Virtual Machine up to 16 Cores. This is a significant price reduction for customers who are using standard Windows Server image from Azure Marketplace (Up to around 40% cost saving). Windows Server Datacentre edition allows simultaneous usage both on-premises and in Azure whereas the standard can only be used either on-premises or in Azure.

Microsoft has an online calculator which can help customer calculate their potential saving if they use Hybrid Use Benefit (https://azure.microsoft.com/en-us/pricing/hybrid-use-benefit/?v=17.220).

When we create new Virtual Machines, using Portal / PowerShell or using an ARM template we can specify to use HUB template images. Initially, this was only available via PowerShell and ARM templates, but it is now available for deployment using the Azure Portal as well.

2017-06-21 22_38_29-Clipboard

Recently I had a customer who had used Marketplace images (Windows Server Datacentre template instead of HUB) and wanted to look at whether it’s possible to convert existing virtual machines into HUB activate images. While doing a bit of research, there’s no straightforward method to convert existing Virtual Machines into HUB activated Virtual machines. Only method available at the moment is to delete the virtual machine and re-create using existing resources with a license switch set on the Virtual machine.

Below is a virtual machine created using standard Windows Server datacenter template.

Below is the output from Resource Explorer on a standard Windows Server virtual machine without having enabled Hybrid use benefit.

Next step for us is to delete the VM but before deleting the virtual machine. Before we do this, let’s export the automation template from the Azure portal which we will use and modify accordingly to apply HUB when re-creating the virtual machine.

Delete the VM

Next step is to verify and confirm Virtual Machine object is deleted but all other resources are available.

Next I will use the automation template which we extracted earlier and re-deploy this Virtual machine from Azure portal. Let’s first make some modifications to the template

Add “LicenseType” : “Windows_Server”

Remove Image reference

Remove OS profile

Modify OS Disk create option to attach

Next step is for us to deploy this template against the same resource group.

You will notice that the deployment will skip disk/network and storage diagnostic resources and provision the Virtual machine using existing resources available.

Having a look at the Resource Explorer, we can see that the license type is now set for this virtual machine.

After logging into the virtual machine, I can use slmgr /dlv to check the license activation status. NTTST9111 virtual machine is activated against Microsoft KMS Server.

Since we have set the license option in the template, this Virtual Machine will now use Hybrid Use benefit, and you won’t get charged for the operating system.

Have a look at some of the resource below for more information relating to Hybrid Use Benefit

References

https://azure.microsoft.com/en-us/pricing/hybrid-use-benefit/faq/

https://blogs.msdn.microsoft.com/azureedu/2016/04/13/how-can-i-use-the-hybrid-use-benefit-in-azure/

https://azure.microsoft.com/en-us/pricing/hybrid-use-benefit/?v=17.22

https://azure.microsoft.com/en-us/resources/videos/azure-hybrid-use-benefit/

4TB Disk Support for Azure

Microsoft recently increased maximum Virtual disks size for all Azure datacentres. Now we can create disks up to 4TB and assign to Virtual machines. This also increases total capacity supported up to 256TBs per VM.

At the moment, we cannot create large disks or resize using the Azure Portal, and this needs to be done using an ARM template. Portal changes are planned to be rolled out within next few weeks along with the support for Azure backups and also Azure Site Recovery (Migration & DR).

Since the OS disks get created as a MBR drive, maximum supported for the OS disk is still limited at 2TB, however, Data disks can be attached up to 4TB of capacity.

In this blog post, let’s look at how we can create a 4TB Data disk using Resource Manager Templates and using PowerShell.

ARM Template for adding new 4TB Data disk for an existing VM

Step 01 – Making sure that you are running latest version of Azure PowerShell

2017-06-18 01_36_48-Clipboard.png

Step 02 – create a managed disk using Azure Powershell

$ResourceGroupName = "NT-Proj01-RG1"

$location = "australiaeast"

$datadiskName = "4tbd1"

New-AzureRmDisk -DiskName $dataDiskName -Disk (New-AzureRmDiskConfig -AccountType StandardLR -Location $location -CreateOption Empty -DiskSizeGB 4095)`

-ResourceGroupName $ResourceGroupName

2017-06-18 01_37_45-Clipboard.png

Looking at my resource group, I can now view my new disk resource

2017-06-18 01_38_52-Clipboard.png

Step 03 – Attach new disks into a virtual machine

In my example below I’m using the Azure portal to assign our new 4TB disk which we created.

2017-06-18 01_39_26-Clipboard.png

Hit save and the VM will get updated. After that, I’m going to login to the VM and have a look at the attached disk.

2017-06-18 01_39_57-Clipboard.png

Using ARM Template

{

"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",

"contentVersion": "1.0.0.0",

"parameters": {

"datadiskname": {

"defaultValue": "4tbdatad3",

"type": "String"

}

},

"variables": {

},

"resources": [

{

"type": "Microsoft.Compute/disks",

"name": "[parameters('datadiskname')]",

"apiVersion": "2016-04-30-preview",

"location": "australiaeast",

"properties": {

"accountType": "Standard_LRS",

"creationData": {

"createOption": "Empty"

},

"diskSizeGB": 4095

},

"dependsOn": []

}

],

"outputs": {

}

}

 

We can also extend existing disks both OS Disks and also Data disks using above-mentioned methods (Powershell or JSON Template).  Below example, I have extended the OS drive from 31GB to 1700GB by specifying OS Disk size in the ARM Template.

2017-06-18 02_05_29-Clipboard.png

More information, please have a look at below references

Announcing large disk sizes of up to 4 TB for Azure IaaS VMs

https://docs.microsoft.com/en-us/azure/virtual-machines/windows/create-managed-disk-ps

Azure Site Recovery Unified setup 9.7 – Change input language to English

In this blog post, I’m going to walkthrough and issue which I came across recently while setting up a lab environment for a customer. I downloaded latest ASR unified setup yesterday to build VMware (on-premises) to Azure (DR) scenario for a client. While running ASR Unified Setup, I came across below error, which was a bit strange for me as I had not seen that error before when running this setup(build a similar setup last month). All my servers are configured with EN-AU locale due to date/time format.

clip_image002

So it appears that I cannot proceed ahead if I use EN-AU locale and I had go to regional settings and get it changed so that the setup can move ahead.

Step 01 – Open Control Panel and open Regional Settings. As you can see below my region format is set to “English (Australia)” which will no longer work with the new ASR Setup binaries.

clip_image004

Step 02 – Change Region Format to English (United States)

clip_image006

After changing locale settings, I didn’t need to reboot the VM and straight off re-running the setup, I managed to get ASR setup to work. Simple fix.

For anyone who’s wondering about version of the setup that I use, it is version 9.7.4438.1

clip_image008

For more information regarding ASR Setup, please find below few online resources

Step by Step Instructions for setting up ASR – VMware to Azure https://docs.microsoft.com/en-us/azure/site-recovery/site-recovery-vmware-to-azure

My Ignite session on ASR https://channel9.msdn.com/Events/Ignite/Australia-2017/INF334

SQL Server 2016 Failover Cluster Instances in Azure

Microsoft recently announced additional support scenarios for using Guest Clusters in Azure. In this blog post, let’s have a look how we can build a two node SQL 2016 Guest clustering in Azure using Windows Server 2016 Storage Spaces Direct.

Utilizing Guest clusters in Azure enables mission critical application such as a SQL backend to function with greater availability if a single instance fails. By using Failover clustering and also placing virtual machines in an availability set, ensure that the application can work regardless of a hardware failure / Host updates or an application instance failure.

At the moment, following scenarios are supported in Azure using Failover Clustering

  • SQL AlwaysOn Availability Groups
  • SQL Server Failover Cluster Instances (detailed in this post)
  • Scale-out File Server for hosting User Profile Disks when using Remote Desktop Services

In this blog post, we will be looking at SQL Server 2016 Failover Cluster Instance deployment in Azure utilizing resource manager deployment templates available on Github.

Deployment Architecture

clip_image002

Template Link = https://aka.ms/azure-sql-server-alwayson-fci-cluster

Requirements

  • Virtual machines are built using Windows Server 2016 and SQL Server 2016 images
  • Requires existing VNET and also a Domain Controller
  • Service Accounts to be provisioned, which will be later used by the Resource Manager deployment template
  • Selected virtual machine size must support the number of data disks specified in the deployment template (Example standard_DS3_v2 only supports maximum up to 8 disks).
  • Template creates Premium Storage Account for SQL virtual machines & a standard storage account for Cloud Witness.
  • Virtual Machines are placed into a single availability set.

 

Step by Step deployment for SQL 2016 Failover Cluster in Azure using Azure Resource Manager Template

Step 01 – Use template link below and open it up in a browser

clip_image004

Step 02 – click on “Deploy to Azure” which will load this template into a custom template deployment within azure

clip_image006

clip_image008

Step 03 – Fill in required parameters and hit deploy.

Basic Section

  • Select the subscription in which you want to deploy
  • Create a new resource group (which will help isolate resources relating to this deployment)
  • Location – select your preferred location where you have a VNET created with connectivity to a domain controller.

Settings Section

  • Name Prefix = provide a name between 3 charters and up to 8 characters. Provide a name prefix in lowercase otherwise, storage account creation will fail.
  • Storage Account Type = Premium_LRS should be selected
  • VM Size = depending on the workload, you could select the VM Size. Based on the selected VM Size, and the number of disks selected, data disks will get created during the deployment.
  • VM Disk Size = 1023 (Maximum supported per disk in azure at the moment).
  • VM Disk Count = 2 (depending on the chose VM, you could go up to 32 Disks)
  • Existing Domain Name = domain name of your active directory environment (example contoso.local)
  • Admin Username = administrative account in your active directory environment
  • Admin Password = password
  • Svc Username = SQL Administrator account name. must be a domain account
  • Svc Password = password
  • Existing Virtual Network Resource Group Name = Resource group name for existing VNET (example – NT-AUE-VNET-RG)
  • Existing Virtual Network Name = Virtual Network Name (example NT-AUE-VNET)
  • Existing Subnet Name = Subnet Name within your given VNET (Example Front-End)
  • Cluster IP = Free IP Address which is not used or allocated
  • _artifacts location = leave default – not required to be modified
  • _artifacts location SaS Token = leave default – not required to be modified

Step 04 – Accept custom template, terms and conditions and select “I Agree to the terms & conditions after reading through”. Next click on Purchase, which will initiate the deployment process.

Step 05 – click notifications and select the deployment to check the progress of the build.

clip_image009

clip_image011

Clicking on the resource “DeploySFCICluster”, you will be able to see individual component status

clip_image013

Deployment should take around 45 – 1 hour to complete.

clip_image015

once completed, you will see completed notification as below.

clip_image016

Step 06 – get local IP address of the VM and connect using remote desktop

clip_image017

Step 07 – Open Failover Cluster Manager (Start menu -> Windows Administrative Tools -> Failover Cluster Manager). Looking at the screenshot below, we can validate that the cluster was successfully created.

clip_image019

Next, we will go ahead and validate cluster roles to make sure that the SQL failover cluster installation is a success.

clip_image021

Next, we can navigate to Storage section within Failover Cluster Manager and verify Storage Spaces Direct configuration.

clip_image023

Storage Pool Summary

clip_image025

Physical Disks

clip_image027

Cluster summary

clip_image029

Step 08 – Open Microsoft SQL Server Management Studio (Star Menu -> Microsoft SQL Server 2016 -> Microsoft SQL Server Management Studio).

Login to SQL Failover Cluster Name

clip_image030

After you confirm that you can log in – create a sample database. Failover SQL resources to confirm that the services can failover to the other available node.

Select SQL Server Role and right click -> Move -> Select Node

clip_image031

Select the other available instance

clip_image032

And click “OK”. After few seconds, services should start on the failover instance.

clip_image034

This blog post details, how to create a SQL Server 2016 Failover Cluster Instance in Azure using Windows Server 2016 Storage Spaces Direct. Please have a look at reference links below for more information. Any queries, please feel free to comment below or reach out to me via twitter (@nirmalmt)

https://blogs.msdn.microsoft.com/clustering/2017/02/14/deploying-an-iaas-vm-guest-clusters-in-microsoft-azure

https://docs.microsoft.com/en-us/azure/virtual-machines/windows/sql/virtual-machines-windows-portal-sql-create-failover-cluster#step-2-configure-the-windows-server-failover-cluster-wsfc-with-s2d

https://support.microsoft.com/en-us/help/3200896/sql-server-availability-solutions-for-microsoft-identity-manager-services-databases

Single Instance VM SLA in Azure

For many years one of the challenges we had with customers, is that Azure didn’t have an SLA for single instance VMs. The recommendation is always to have two VM instances added to an availability set, which will make sure that the customer are covered under Microsoft SLA for VM Update time which is 99.95%.

A recent announcement from Microsoft states that they now support for Single Instance VM within Azure with an SLA of 99.9% provided that the VMs are running on Premium Storage. Which means that the VMs needs to be created using DS / GS or F_S series VMs and the storage account needs to be created using Premium Storage for hosting these VMs.

More information, please refer link below

https://azure.microsoft.com/en-us/blog/announcing-4-tb-for-sap-hana-single-instance-sla-and-hybrid-use-benefit-images/

Application Dependency Monitoring with OMS

Last year Microsoft acquired a company that specializes in App Dependency Monitoring called Bluestripe. This solution is now built into OMS which automatically maps dependencies by monitoring inbounds and outbound connections. Dependency Monitor creates a Service Map which also integrates with other services such as Security & Update Solutions.

Below is an example where we have a Service Map which shows DPM Agent installed on a Hyper-V Host

clip_image002

clip_image010

We can also see Windows Updates on each of the dependent servers

clip_image004

Performance data is also visible within the Service Map

clip_image006

Change Tracking Solution is also integrated with Service Maps, which shows Service changes on dependent systems.

clip_image008

Malware Security solution also integrates with Service Maps, similar to other solutions

clip_image012

Let’s have a look at how we can set it up.

The first step is to have the OMS Agent installed either manually deployed / installed using other deployment tools (such as using SCOM / Config Manager or scripts). Service Maps also requires a dependency agent which needs to be installed on each server. We can download this agent by accessing Service Map solution configuration.

clip_image018

Download the agent and install it on Application Servers

clip_image019

clip_image020

Once the installation completes, within few minutes you will notice that the OMS Agent and Dependency Map agent reports back with Application dependencies.

clip_image022

More info : https://blogs.technet.microsoft.com/hybridcloud/2016/11/21/introducing-service-map-for-dependency-aware-monitoring-troubleshooting-and-workload-migrations/

Windows Server 2016 & System Center 2016 General Availability

Microsoft released evaluation bits for Windows Server 2016 and System Center 2016 during Ignite Conference in Atlanta on 27th September 2016. Having released evaluation bits, Microsoft made these two products generally available on 12th October, which added them to MSDN and also into Volume Licensing Service Center for Enterprise Customers.

Evaluation media can be downloaded from links below

Windows Server 2016: https://www.microsoft.com/en-us/evalcenter/evaluate-windows-server-2016?i=1

System Center 2016: https://www.microsoft.com/en-us/evalcenter/evaluate-system-center-2016

While there are many sessions at Ignite, which highlights capabilities presented within Windows Server 2016, feel free to have a look at some of the videos below as well.

 

 

 

 

 

 

  • Software Defined Networking is a huge step forward in how you configure, manage and secure your network. Check out Greg Cusanza talking about the build in load balancer: https://www.youtube.com/watch?v=5q3sEQN4GSM

 

 

 

 

 

 

Awarded as a Microsoft MVP for 6th consecutive year

2nd July I was re-awarded as a Microsoft MVP for 6th consecutive year. Over the years, it has been a great privilege being part of this Microsoft MVP community, to be able to share and also learn from others.

This year, I’m part of the Cloud & Datacenter Management award category due to some of the recent changes in the MVP Program. Previously I was awarded for High Availability award category for my contributions relating to Windows Server / SQL Server High Availability and since OCT 2015, Microsoft made changes to bring Windows Server / System Center award categories together under Cloud & Datacenter Management. This gives us greater flexibility to be able to contribute in other areas such as System Center and also get credited towards the Microsoft MVP Award.

Looking forward to another year within the MVP Program and mostly looking forward to meeting all of my MVP friends and the product team later during the year at the MVP Global Summit, which is held annually at the Microsoft Campus in Redmond.

Windows Update using Azure Server Management Tools

Microsoft recently updated Azure Server Management tools with a new functionality, which allows remote execution of Windows updates against managed Windows Server / Nano Server instances using Azure Server Management tools. For those who are not familiar Azure Server management tools, I wrote a blog post recently announcing Azure Server Management Tools, which is a new method for managing Windows Server 2016 Servers and also Nano Servers. (https://nirmalt.com/2016/02/26/azure-server-management-toolsinstallation/)

Let’s have a look at the new patch management process using Server Management Tools.

The first step is to go ahead and login to Azure Server Management Tools. And then select a server which needs to be patched using Windows Updates.

You will notice that under settings, we now have a new functionally called “Windows Updates”.

clip_image002

Once you select Windows Update option, you will get two options

  • View available updates
  • View update history

As the name implies, if you select View available updates, it will trigger Windows Update client agent on the Server, and it will show information relating to any missing updates. As you can see from my example below, we can see that there are Updates available.

clip_image004

After selecting Available Updates. You will be able to see all the updates which are applicable for the server and then you can click on Install Updates to install them on the server.

clip_image006

Soon you will see a notification pop-up saying that the updates are being downloaded and installed on the Server.

clip_image008

It should take several minutes, depending on how many updates needs to be downloaded and deployed.

clip_image010

Once we have windows updates successfully installed, we can click on the notification pop-up and get more details

clip_image012

We could also use View update history option to see all the updates which were deployed part of the patch deployment process using Azure Server management tools.

clip_image014

If we trigger Windows Update scan once again, it will show that the device is up to date and doesn’t require any further updates.

clip_image016

More information, please have a look at the blog post below.

https://blogs.technet.microsoft.com/systemcenter/2016/05/11/windows-update-now-available-in-server-management-tools/

Import All Virtual Machines in a Folder using Powershell

Hello Everyone

Quick blog post to walkthrough a script that I used during my Windows Server Technical Preview 5 Lab refresh. I used below script to search through a folder and look for all the virtual machines, and then get them imported in to Hyper-V. Credit should go to Ben who blogged about this few years back but the script was specific for Windows Server 2012 R2 which uses XML for VM configuration. With Server 2016, we have a new binary file format for VM Configuration and this new format uses .VMCX file extension.

I have modified this script from Ben, which can now look for all VMCX files and then import all the VMs in to Hyper-V

Search and Import VMs created using Windows Server 2016 Technical Preview

Get-ChildItem d:\vm -Recurse -Filter "Virtual Machines" | %{Get-ChildItem $_.FullName -Filter *.vmcx} | %{import-vm $_.FullName -Register}

Search and Import VMs created using Windows Server 2012 R2

Get-ChildItem d:\vm -Recurse -Filter "Virtual Machines" | %{Get-ChildItem $_.FullName -Filter *.xml} | %{import-vm $_.FullName -Register}

“D:\VM” is the folder location given to search for Virtual Machine configuration files.

clip_image001

clip_image002

Reference : – https://blogs.msdn.microsoft.com/virtual_pc_guy/2013/08/21/bulk-registering-virtual-machines-with-powershell/