Cloud OS Network – Azure & SQL Training for Service Providers & System Integrators

Last two weeks, I have travelled to Sydney, Australia & Kuala Lumpur, Malaysia to provide training to service providers and system integrators in the area, to deliver in-depth hands on training to help them with architecting, designing and implementing SQL cloud solutions in a private and hybrid cloud environment. Training covered the following topics:

  • Introduction to SQL 2014 features & capabilities
  • Contained databases for multi-tenant database offerings
  • Resource Governor for controlling CPU, Memory and Disk IO in a multi-tenant environment
  • Advanced Backup & Restore with SQL 2014 (on-premise and cloud)
  • Introduction to High Availability & Disaster Recovery
  • SQL High Availability with Failover Cluster Instance
  • SQL High Availability with AlwaysOn Availability Groups
  • Disaster Recovery with Azure as the DR environment
  • Establishing hybrid connectivity (VPN) to Azure
  • SQL Always On Availability Groups DR setup with Azure
  • Enabling SQL service offerings to customers using Windows Azure Pack
  • Dev/Test environment setup on Azure
  • System Center Operations Manager

Feel free to reach out to me, if you have any follow up questions or need some help. J

Passed Microsoft Exam 70-534 Architecting Microsoft Azure Solutions

This Monday, I got certified for 70-534 Architecting Microsoft Azure Solutions, which is aimed at validating Microsoft Azure solution design skills. This test validates our knowledge about the features and capabilities of Azure services, ability to identify tradeoffs and make decisions for designing public and hybrid cloud solutions. Test also covers our knowledge and experience on defining the appropriate infrastructure and platform solutions to meet the required functional, operational, and deployment requirements through the solution lifecycle.

Preparation

Having true hands on experience with Windows Azure development really helps in preparing as well passing this exam. In addition to the practical knowledge gained through these experiences, I have used the following resources.

Skills measured

Design Microsoft Azure infrastructure and networking (15–20%)

  • Describe how Azure uses Global Foundation Services (GFS) datacenters
    • Understand Azure datacenter architecture, regional availability, and high availability
  • Design Azure virtual networks, networking services, DNS, DHCP, and IP addressing configuration
    • Extend on-premises Active Directory, deploy Active Directory, define static IP reservations, understand ACLs and Network Security Groups
  • Design Azure Compute
    • Design Azure virtual machines (VMs) and VM architecture for IaaS and PaaS; understand availability sets, fault domains, and update domains in Azure; differentiate between machine classifications
  • Describe Azure virtual private network (VPN) and ExpressRoute architecture and design
    • Describe Azure point-to-site (P2S) and site-to-site (S2S) VPN, understand the architectural differences between Azure VPN and ExpressRoute
  • Describe Azure services
    • Understand, at a high level, Azure load balancing options, including Traffic Manager, Azure Media Services, CDN, Azure Active Directory (Azure AD), Azure Cache, Multi-Factor Authentication, and Service Bus

Secure resources (15–20%)

  • Secure resources by using managed identities
    • Describe the differences between Active Directory on-premises and Azure AD, programmatically access Azure AD using Graph API, secure access to resources from Azure AD applications using OAuth and OpenID Connect
  • Secure resources by using hybrid identities
    • Use SAML claims to authenticate to on-premises resources, describe DirSync synchronization, implement federated identities using Azure Access Control service (ACS) and Active Directory Federation Services (ADFS)
  • Secure resources by using identity providers
    • Provide access to resources using identity providers, such as Microsoft account, Facebook, Google, and Yahoo!
  • Identify an appropriate data security solution
    • Use the appropriate Access Control List (ACL), identify security requirements for data in transit and data at rest
  • Design a role-based access control strategy
    • Secure resource scopes, such as the ability to create VMs and websites

Design an application storage and data access strategy (15–20%)

  • Design data storage
    • Design storage options for data, including Table Storage, SQL Database, DocumentDB, Blob Storage, MongoDB, and MySQL; design security options for SQL Database or Azure Storage; identify the appropriate VM type and size for a solution
  • Design applications that use Mobile Services
    • Create Azure Mobile Services, consume Mobile Services from cross-platform clients, integrate offline sync capabilities into an application, extend Mobile Services using custom code, implement Mobile Services using Microsoft .NET or Node.js, secure Mobile Services using Azure AD
  • Design applications that use notifications
    • Implement push notification services in Mobile Services, send push notifications to all subscribers, specific subscribers, or a segment of subscribers
  • Design applications that use a web API
    • Implement a custom web API, scale using Azure Websites, offload long-running applications using WebJobs, secure a web API using Azure AD
  • Design a data access strategy for hybrid applications
    • Connect to on-premises data from Azure applications using Service Bus Relay, BizTalk Hybrid Connections, or the VPN capability of Websites, identify constraints for connectivity with VPN, identify options for joining VMs to domains or cloud services
  • Design a media solution
    • Describe Media Services, understand key components of Media Services, including streaming capabilities, video on-demand capabilities, and monitoring services

Design an advanced application (15–20%)

  • Create compute-intensive applications
    • Design high-performance computing (HPC) and other compute-intensive applications using Azure Services
  • Create long-running applications
    • Implement worker roles for scalable processing, design stateless components to accommodate scale
  • Select the appropriate storage option
    • Use a queue-centric pattern for development, select the appropriate storage for performance, identify storage options for cloud services and hybrid scenarios with compute on-premises and storage on Azure, differentiate between cloud services and VMs interacting with storage service and SQL Database
  • Integrate Azure services in a solution
    • Identify the appropriate use of machine learning, big data, Media Services, and search services

Design websites (15–20%)

  • Design websites for scalability and performance
    • Globally scale websites, create websites using Visual Studio, debug websites, understand supported languages, differentiate between websites to VMs and cloud services
  • Deploy websites
    • Implement Azure Site Extensions, create packages, hosting plans, deployment slots, resource groups, publishing options, Web Deploy, and FTP locations and settings
  • Design websites for business continuity
    • Scale up and scale out using Azure Websites and SQL Database, configure data replication patterns, update websites with minimal downtime, backup and restore data, design for disaster recovery, deploy websites to multiple regions for high availability, design the data tier

Design a management, monitoring, and business continuity strategy (15–20%)

  • Evaluate hybrid and Azure-hosted architectures for Microsoft System Center deployment
    • Understand, at an architectural level, which components are supported in Azure; describe design considerations for managing Azure resources with System Center; understand which scenarios would dictate a hybrid scenario
  • Design a monitoring strategy
    • Identify the Microsoft products and services for monitoring Azure solutions; understand the capabilities of System Center for monitoring an Azure solution; understand built-in Azure capabilities; identify third-party monitoring tools, including open source; describe use cases for Operations Manager, Global Service Monitor, and Application Insights; describe the use cases for Windows Software Update Services (WSUS), Configuration Manager, and custom solutions; describe the Azure architecture constructs, such as availability groups and update domains, and how they impact a patching strategy
  • Describe Azure business continuity/disaster recovery (BC/DR) capabilities
    • Understand the architectural capabilities of BC/DR, describe Hyper-V Replica and Azure Site Recovery (ASR), describe use cases for Hyper-V Replica and ASR
  • Design a disaster recovery strategy
    • Design and deploy Azure Backup and other Microsoft backup solutions for Azure, understand use cases when StorSimple and System Center Data Protection Manager would be appropriate
  • Design Azure Automation and PowerShell workflows
    • Create a PowerShell script specific to Azure
  • Describe the use cases for Azure Automation configuration
    • Understand when to use Azure Automation, Chef, Puppet, PowerShell, or Desired State Configuration (DSC)

Good luck for your exams.

Passed Microsoft Exam 70-532 Developing Microsoft Azure Solutions

This Monday, I got certified for 70-532 Developing Microsoft Azure Solutions, which is testing experience in designing, programming, implementing, automating, and monitoring Microsoft Azure solutions. It also tests that we are proficient with development tools, techniques, and approaches used to build scalable and resilient solutions.

Preparation

Having true hands on experience with Windows Azure development really helps in preparing as well passing this exam. In addition to the practical knowledge gained through these experiences, I have used the following resources.

Skills measured

Design and implement websites (15‒20%)

  • Deploy websites
    • Define deployment slots; roll back deployments; create hosting plans; migrate websites between hosting plans; create a website within a hosting plan
  • Configure websites
    • Define and use app settings, connection strings, handlers, and virtual directories; configure certificates and custom domains; configure SSL bindings and runtime configurations; manage websites by using the API, Windows PowerShell, and Xplat-CLI
  • Configure diagnostics, monitoring, and analytics
    • Retrieve diagnostics data, view streaming logs, configure endpoint monitoring, configure alerts, configure diagnostics, use remote debugging, monitor website resources
  • Implement web jobs
    • Write web jobs using the SDK, package and deploy web jobs, schedule web jobs
  • Configure websites for scale and resilience
    • Configure auto-scale using built-in and custom schedules, configure by metric, change the size of an instance, configure Traffic Manager
  • Design and implement applications for scale and resilience
    • Select a pattern, implement transient fault handling for services, respond to throttling, disable Application Request Routing (ARR) affinity

Create and manage virtual machines (20‒25%)

  • Deploy workloads on Azure virtual machines (VMs)
    • Identify workloads that can and cannot be deployed, run workloads including Microsoft and Linux, create VMs
  • Create and manage a VM image or virtual hard disk
    • Create specialized and reusable images, prepare images using SysPrep and Windows Agent (Linux), copy images between storage accounts and subscriptions, upload VMs
  • Perform configuration management
    • Automate configuration management by using PowerShell Desired State Configuration and VM Agent (custom script extensions); configure VMs using a configuration management tool, such as puppet or chef; enable remote debugging
  • Configure VM networking
    • Configure reserved IP addresses, access control list (ACL), DNS at the cloud service level, load balancing endpoints, HTTP and TCP health probes, public IPs, firewall rules, direct server return, and keep-alive
  • Scale VMs
    • Scale up and scale down VM sizes, configure auto-scale and availability sets
  • Design and implement VM storage
    • Configure disk caching, plan for storage capacity, configure shared storage using Azure File service, configure geo-replication
  • Monitor VMs
    • Configure endpoint monitoring, configure alerts, configure diagnostic and monitoring storage location

Design and implement cloud services (20‒25%)

  • Design and develop a cloud service
    • Install SDKs, install emulators, develop a web role or worker role, design and implement resiliency including transient fault handling, develop startup tasks
  • Configure cloud services and roles
    • Configure HTTPS endpoint and upload an SSL certificate, and instance count and size; configure network access rules, local storage, multiple websites, custom domains, and dedicated and co-located caching; scale up and scale down role sizes; configure auto-scale
  • Deploy a cloud service
    • Upgrade an automatic, manual, or simultaneous deployment; VIP swap a deployment; package a deployment; implement continuous deployment from Visual Studio Online (VSO); implement runtime configuration changes using the portal; configure regions and affinity groups
  • Monitor and debug a cloud service
    • Configure diagnostics using the SDK or configuration file, profile resource consumption, enable remote debugging, establish a connection using Remote Desktop CmdLets in Windows PowerShell, debug using IntelliTrace or the emulator

Design and implement a storage strategy (20‒25%)

  • Implement Azure Storage blobs and Azure files
    • Read data, change data, set metadata on a container, store data using block and page blobs, stream data using blobs, access blobs securely, implement async blob copy, configure Content Delivery Network (CDN), design blob hierarchies, configure custom domains, scale blob storage
  • Implement Azure storage tables
    • Implement CRUD with and without transactions, design and manage partitions, query using OData; scale tables and partitions
  • Implement Azure storage queues
    • Add and process messages, retrieve a batch of messages, scale queues
  • Manage access
    • Generate shared access signatures, including client renewal and data validation; create stored access policies; regenerate storage account keys; configure and use Cross-Origin Resource Sharing (CORS)
  • Monitor storage
    • Set retention policies and logging levels, analyze logs
  • Implement SQL databases
    • Choose the appropriate database tier and performance level, configure and perform point in time recovery, enable geo-replication, import and export data and schema, scale SQL databases

Manage application and network services (15‒20%)

  • Integrate an app with Azure Active Directory
    • Develop apps that use WS-federation, OAuth, and SAML-P endpoints; query the directory using graph API
  • Configure a virtual network
    • Deploy a VM into a virtual network, deploy a cloud service into a virtual network
  • Modify network configuration
    • Modify a subnet, import and export network configuration
  • Design and implement a communication strategy
    • Develop messaging solutions using service bus queues, topics, relays, and notification hubs; create service bus namespaces and choose a tier; scale service bus
  • Monitor communication
    • Monitor service bus queues, topics, relays, and notification hubs
  • Implement caching
    • Implement Redis caching, implement Azure Cache Service

Good luck for your exams.

Passed Microsoft Exam 70-533 Implementing Microsoft Azure Infrastructure Solutions

Last month, I got certified for Microsoft 70-533 Implementing Microsoft Azure Infrastructure Solutions, which is implementing an infrastructure solution in Microsoft Azure. It also tests our experience implementing and monitoring cloud and hybrid solutions as well as supporting application lifecycle management.

Preparation

I have been working with Microsoft Azure since 2008 (lead the team who built Java SDK based on WS-* protocols for .NET Services (Service Bus Relay) and did drive the efforts to simultaneous shipping of the Java SDK, when Windows Azure was announced in Build conference in 2008. Recently we are helping many organizations across the globe on developing software solutions and implementing infrastructure hybrid solutions. In addition to the practical knowledge gained through these experience, I have used the following resources.

Skills measured

Implement websites (15-20%)

  • Deploy websites
    • Define deployment slots; roll back deployments, configure and deploy packages, deploy web jobs, schedule web jobs
  • Configure websites
    • Configure app settings, connection strings, handlers, and virtual directories; configure certificates, custom domains, and traffic manager; configure SSL bindings and runtime configurations; manage websites by using Windows PowerShell and Xplat-CLI
  • Configure diagnostics, monitoring, and analytics
    • Retrieve diagnostics data; view streaming logs; configure endpoint monitoring, alerts, and diagnostics; monitor website resources
  • Configure scale and resilience
    • Configure auto-scale using built-in and custom schedules; configure by metric; change the size of an instance
  • Manage hosting plans
    • Create hosting plans; migrate websites between hosting plans; create a website within a hosting plan

Implement virtual machines (15-20%)

  • Deploy workloads on Azure virtual machines (VMs)
    • Identify supported Microsoft workloads; deploy and connect to a Linux VM; create VMs
  • Implement images and disks
    • Create specialized and generalized images for Windows and Linux; copy images between storage accounts and subscriptions; upload VHDs
  • Perform configuration management
    • Automate configuration management by using PowerShell Desired State Configuration and custom script extensions; enable puppet and chef extensions
  • Configure VM networking
    • Settings include reserved IP addresses, access control list (ACL), internal name resolution, DNS at the cloud service level, load balancing endpoints, HTTP and TCP health probes, public IPs, firewall rules, direct server return, and Keep Alive
  • Configure VM resiliency
    • Scale up and scale down VM sizes; auto-scale; configure availability sets
  • Design and implement VM storage
    • Configure disk caching; plan storage capacity; configure operating system disk redundancy; configure shared storage using Azure File service; configure geo-replication; encrypt disks
  • Monitor VMs
    • Configure endpoint monitoring, alerts, and diagnostics

Implement cloud services (15-20%)

  • Configure cloud services and roles
    • Configure instance count and size, operating system version and family, upgrade and fault domains, ACLs, reserved IPs, and network access rules; configure local storage; configure dedicated and co-located caching, local and cloud configurations, and local disks; configure multiple websites; configure custom domains
  • Deploy and manage cloud services
    • Upgrade a deployment; VIP swap a deployment; package a deployment; modify configuration files; perform in-place updates; perform runtime configuration changes using the portal; scale a cloud service; create service bus namespaces and choose a tier; apply scalability targets
  • Monitor cloud services
    • Monitor service bus queues, topics, relays, and notification hubs; configure diagnostics

Implement storage (15-20%)

  • Implement blobs and Azure files
    • Read data; change data; set metadata on a container; use encryption (SSL); perform an async blob copy; configure a Content Delivery Network (CDN); implement storage for backup and disaster recovery; configure Azure Backup; define blob hierarchies; configure custom domains; configure the Import and Export Service
  • Manage access
    • Create and manage shared access signatures; use stored access policies; regenerate keys
  • Configure diagnostics, monitoring, and analytics
    • Configure retention policies and logging levels; analyze logs
  • Implement SQL databases
    • Choose the appropriate database tier and performance level; configure point in time recovery and geo-replication; import and export data and schema; design a scaling strategy
  • Implement recovery services
    • Create a backup vault; deploy a backup agent; backup and restore data

Implement an Azure Active Directory (15-20%)

  • Integrate an Azure AD with existing directories
    • Implement DirSync, O365 integration, and single sign-on with on-premises Windows Server 2012 R2; add custom domains; monitor Azure AD
  • Configure the Application Access Panel
    • Configure single sign-on with SaaS applications using federation and password based; add users and groups to applications; revoke access to SaaS applications; configure access; federation with Facebook and Google ID
  • Integrate an app with Azure AD
    • Web apps (WS-federation); desktop apps (OAuth); graph API

Implement virtual networks (15-20%)

  • Configure a virtual network
    • Deploy a VM into a virtual network; deploy a cloud service into a virtual network; configure static IPs; configure internal load balancing; design subnets
  • Modify a network configuration
    • Modify a subnet; import and export a network configuration
  • Design and implement a multi-site or hybrid network
    • Choose the appropriate solution between ExpressRoute, site-to-site, and point-to-site; choose the appropriate gateway; identify supported devices and software VPN solutions; identify networking prerequisites; configure regional virtual networks and multi-site virtual networks

Good luck for your exams.

Configure new SSH authorization key for Linux on Azure

If you would like to use SSH with Linux virtual machines on Azure, there is a great documentation here. One question I have seen in the forum, which is not clearly explained in the documentation is, how do we add a new SSH authorization key, if we missed adding the SSH file, during the creation of virtual machine.

Giving the steps I have followed to setup a new SSH authorization key below:

Step 1: I created a Linux VM (Ubuntu 14) on Azure using quick create VM (linuxvmforssh.cloudapp.net).

Step 2: Executed following commands from Git shell on my Windows 8.1 laptop

GIT> ssh-keygen -t rsa -b 2048 -v -f azurecert.key
	
GIT> scp azurecert.key.pub azureuser@linuxvmforssh.cloudapp.net:/home/azureuser

GIT> ssh azureuser@linuxvmforssh.cloudapp.net

azureuser@linuxvmforssh:~$ cat azurecert.key.pub >> .ssh/authorized_keys

azureuser@linuxvmforssh:~$ sudo service ssh restart

azureuser@linuxvmforssh:~$ exit

GIT> ssh -i azurecert.key azureuser@linuxvmforssh.cloudapp.net

Hope this helps you to setup new SSH authorized keys for your Linux virtual machines.

Resource Governor at Work with Azure Pack

WAP administrators can use the functionality of SQL Server 2014 Resource Governor with UR5 of Windows Azure Pack. You can read about ‘Manage tenant database workloads with resource governor in WAPack’ here. In this blog post I am detailing the last section ‘Resource Governor at Work’ of the above blog post.

Tools available to generate load on SQL server

Though we can write custom tools (C#, PowerShell) etc. to create test databases and generate load, sometimes publically available tools will come handy. Providing two tools that I have come across.

  • Hammer DB (I have used this for various load generation, benchmark verification before/after changing server configuration etc.)
  • SQL Load Generator

View CPU Usage for Resource Pools

In this post, I assume that you have followed the instructions provided in the above blog post. In my configuration, I have created the suggested resource pools and created a database named ‘contoso’. I am providing the steps to identify the resource pool name and how to view the performance counters for the resource pool.

Step 1: Identify the resource pool associated with the database

As a service provider administrator, navigate to ‘servers‘ tab in ‘SQL Servers‘ resource provider and navigate to the details of specific server.


Navigate to the ‘databases‘ tab and find out the ‘resource pool name’.


Step 2: Open performance monitor

You can do this by running ‘perfmon’ on windows run prompt.


  1. Navigate to the performance monitor view
  2. Select any existing counters
  3. Click on ‘Delete’ to remove the existing counters
  4. Click on ‘+’ button next to add new counters (in the following step)

Step 3: Add SQL Resource Governor Performance Counter


  1. Choose counter ‘CPU usage %‘ in ‘SQL Server: Resource Pool Stats

    Note: You can see that all the resource pools you saw along with databases tab in windows azure pack + two system resource pool instances (default & internal) are listed in the instances section

  2. Now you can select all instances and click on ‘Add‘ button.

Step 4: Generate load against the databases and watch usage in performance monitor

Windows Azure Pack – Dedicated SQL offering (Part 3)

Part 1: In the part one of this series, we have gone through the step by step instructions of installing and configuring Windows Azure Pack portal and api express on an Azure virtual machine. You can read through the part one of this series here.

Part 2: In the part two of this series, we have gone through the step by step instruction of creating group and server in SQL server resource provider, followed by creating plan and add-on based for providing a dedicated offer. Also, we created a tenant account. You can read through the part two here.

In this post, I am providing the PowerShell script that can be used to assign the private plan and add-on to the tenant. It is possible to assign private plan to tenant from admin portal. However assigning a private add-on to tenant is not enabled from admin portal. So we need to leverage PowerShell script to assign the plan and add-on to tenant.

Step 7: Assign private plan and add-on to tenant by service provider admin

# Assign all variable values specific to your environment
$windowsAuthSiteUri = "https://localhost:30072"
$adminUri  = "https://localhost:30004"
$planName  = "Dedicated Plan 001"
$addonName = "AddOn for Dedicated Plan 001"
$userName  = "admin@tenant.com"

#
# Get Token
$token = Get-MgmtSvcToken `
	-Type Windows `
	-AuthenticationSite $windowsAuthSiteUri `
	-DisableCertificateValidation `
	-ClientRealm "http://azureservices/AdminSite"

#
# Get plan, add-on and user objects
$plan = Get-MgmtSvcPlan `
	-AdminUri $adminUri `
	-Token $Token `
	-DisableCertificateValidation `
	-DisplayName $planName    

$addon = Get-MgmtSvcAddOn `
	-AdminUri $adminUri `
	-Token $Token `
	-DisableCertificateValidation `
	-DisplayName $addonName

# Create a new subscription for the user against the dedicated plan
$subscription = Add-MgmtSvcSubscription `
	-AdminUri $adminUri `
	-Token $token `
	-AccountAdminLiveEmailId $userName `
	-AccountAdminLivePuid $userName `
	-PlanId $plan.Id `
	-FriendlyName $planName `
	-DisableCertificateValidation

In the last part of this series, I will walk through the tenant experience of creating databases leveraging the dedicated plan/add-on.

Windows Azure Pack – Dedicated SQL offering (Part 2)

In the part one of this series, we have gone through the step by step instructions of installing and configuring Windows Azure Pack portal and api express on an Azure virtual machine. You can read through the part one of this series here.

In this post, we will go through creating plan and add-on that will enable us to assign a single server to a single subscription. This is the high level approach.

  • Add a new group for the dedicated server. Only this dedicated server will be available in this group.
  • Add a new SQL server and assign it to the group we created above. Let us assume that this server can support up-to 10GB of data files. And we want to provide 1GB as the minimum database size. With this configuration, tenant can create one 10GB database or ten 1GB databases. Tenant can create a database and can increase the size of database, based on remaining space available on the server (made available through add-on).
  • Now create a new plan. During plan quota configuration, add the group created about. Also, keep the base size as 1GB and allow add-on size of up-to 9GB.
  • Create a new add-on and allow tenants to extend capacity by up-to 9GB. Link this plan & add-on.
  • Remember, plan and add-on are kept private, so that users can’t sign up for this plan. In the next blog post, I will walk through how to assign the plan & add-on to the user (even though it is private).

Step 5: Create Group, Server, Plan and Add-On

































 

Step 6: Create a new tenant (for test purpose)









 

You can read through the third part in this series here. This part has the PowerShell script that can be used to assign the private plan and add-on to the tenant.

Windows Azure Pack – Dedicated SQL offering (Part 1)

Windows Azure Pack comes with SQL resource provider, which enables service providers to offer shared database services for both standalone (no HA) and highly available databases. This blog is the first in the series where I explain step-by step on how a dedicated SQL offer (this means that a single database server is reserved for a single subscription) leveraging the plans / add-on features. Each instruction / step is shown with the corresponding screen capture. Texts are provided with the screen capture, only if something needs to be called out specifically.

Like always, while testing this out, I have used a virtual machine from Azure. If you are trying this on an on-premise machine, skip the steps accordingly.

This blog covers the first four steps

  • Create and remote into SQL 2014 virtual machine on Azure
  • Install Windows Server Roles & Features
  • Enable SQL Authentication and Reset ‘sa’ password
  • Install and Configure Windows Azure Pack Portal Express

You can continue reading the second part of this series here.

Step 1: Create and remote into SQL 2014 virtual machine on Azure

 

 

 

 

 

 

 

 

 

 

 

Step 2: Install Windows Server Roles & Features

Enable the required roles and features for Windows Azure Pack. I have created another blog on how to easily do this using PowerShell. You can follow the steps from here. Note that this step is optional. If you do not do this, Windows Azure Pack Portal Express deployment will do it for you.

Step 3: Enable SQL Authentication and Reset ‘sa’ password

By default, SQL virtual machines on Azure come with Windows Authentication. You need to explicitly enable SQL authentication. Note that you need to restart SQL Server service, after enabling SQL authentication.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Step 4: Install and Configure Windows Azure Pack Portal Express

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

You can continue reading the second part of this series here.

Azure SQL Virtual Machine for Development and Testing

Though Microsoft Azure provides virtual machine images with SQL server installed, during development and testing, I may not need those optimizations. All I might need is a virtual machine with database engine installed. Also, from a cost standpoint, using an evaluation version of SQL server on a virtual machine might be preferred over a SQL VM image, for development and testing purposes. Providing how I prepare my SQL experiment virtual machine (most of the time, I use the machine for a week or two and once the experiment is complete, I delete the virtual machine).

Azure Virtual Machine Images with SQL


Build a Virtual Machine with SQL Database Engine

Step 1: Create a new ‘Windows Server 2012 R2 Datacenter’ virtual machine with required configuration. Once virtual machine is up and running continue with next steps.

Step 2: SQL Server requires .NET 3.5 to be installed on server. This is not installed by default on Azure virtual machines.

Install-WindowsFeature -Name NET-Framework-Core
Install-WindowsFeature -Name PowerShell-V2

Step 3: Download SQL server installer from an Azure storage account. You should run the following commands from Microsoft Azure PowerShell window.

CD C:\

$context = New-AzureStorageContext `
                -StorageAccountName '<todo>' `
                -StorageAccountKey '<todo>'

Get-AzureStorageBlobContent -Container '<todo>' `
                            -Context $context `
                            -Blob 'SQLServer2014-x64-ENU.iso'

Step 4: Mount downloaded ISO image to a drive

$sqlIso = "C:\SQLServer2014-x64-ENU.iso"

$sqlDrive = (Mount-DiskImage -ImagePath $sqlIso `
                            -PassThru `
                            -WarningAction Ignore | 
                            Get-Volume).DriveLetter + ":"

Step 5: Silently install SQL Server from command line. For more details around command line based install check product documentation.

$domainName = Get-Content env:USERDOMAIN
$userName   = Get-Content env:USERNAME
$adminUser  = $domainName + "\" + $userName
$saPassword = "Secret@2015"

$installCommand = "$sqlDrive\Setup.exe /Q /IACCEPTSQLSERVERLICENSETERMS /ACTION=install /UpdateEnabled=0 /FEATURES=SQLENGINE,CONN,SSMS,ADV_SSMS /INSTANCENAME=MSSQLSERVER /SECURITYMODE=SQL /SAPWD=$saPassword /SQLSVCACCOUNT='NT Service\MSSQLSERVER' /SQLSYSADMINACCOUNTS=$adminUser"

Invoke-Expression $installCommand 

Step 6: Once installation is complete, open SQL Management Studio and test with both Windows as well as SQL authentication.

Upload SQL installer to Storage

You can use the following script to upload SQL installer to blob storage for future use.

$context = New-AzureStorageContext `
                -StorageAccountName '<todo>' `
                -StorageAccountKey '<todo>'
				
Set-AzureStorageBlobContent `
			-Blob "SQLServer2014-x64-ENU.iso" `
			-Container '<todo>' `
			-File "SQLServer2014-x64-ENU.iso" `
			-Context $context `
			-Force 
https://hyper-v.nu/

My views on technology

Virtualization and some coffee

My views on technology

Thomas Maurer

Cloud and Datacenter Blog focusing on Microsoft Azure

Cloud Administrator in Azure World

Begin Your Azure Management Journey with the Cloud Administrator