You are on page 1of 49

AZR313

Deep Dive into


Windows Azure Virtual
Machines

Vijay Rajagopalan
Principal Lead Program Manager
Microsoft Corporation

Agenda
Introduction & Getting Started
Patterns for running Virtual Machines
Provisioning in the Cloud
Image Customization
Bring your own Images / Disks & Best Practices

API Surface & Platform Programmability


REST, Client Libraries
PowerShell Cmdlets
Cross Platform Cmdlets

Scalextreme ISV building Cloud based Monitoring &


Management
Inside Provisioning Virtual Machines
Application Patterns:- SLA, Building for availability, IaaS +
PaaS
Summary

Getting Started with Virtual Machines


1. Create new VMs from Platform supplied stock images from VM Image
Gallery
Tools:- Azure Management Portal / APIs / PowerShell cmdlets
2. Customize a platform stock image and capture for future usage
Tools:- Management Portal / APIs / PowerShell cmdlets
3. Bring your own VMs from on-premises
Tools:- Management Portal / APIs / PowerShell cmdlets &

Cloud Provisioning
Getting Started

Management Portal

>
_
Scripting
(Windows, Linux and Mac)

New Disk
Persisted in
Storage

Select Image
and VM Size

Boot VM from New Disk


Server

Blob
Storage

Cloud
REST API

Imaging in the Cloud :- Customizing


Stock Images in the Cloud
Cloud
Blob
Storag
e

Identical/similar deployment
instances using common OS image
as start

Base.VHD

Boot
VM

Customiz
e
VHD

Generali
ze
VHD

Blob
Storage
Capture
VM

Capture VM Saves Customized


Image to Your Image Library

Bring Your Own Server/VHD


On-Premises

On Premises
Virtual Server

Cloud

MyApp.vh
d

Use Case

Forklift Migration of VMs

Sysprepped Images

Upload
VHD

VHD Must Be Fixed Disk

Ensure VHD is Fixed and Upload as


PageBlob

RDP/SSH before Upload

Blob
Storage

Best Practices
Activation
Paging File
Time Sync
Provision VM
from Image or
Disk using portal,
script or API
Create
Disk or
Image

Image Mobility
On-Premises

Cloud

MyApp.vh
d

Blob
Storag
e

Bring your own Image/disk from onpremises


We support Image & Disk based migration.
Windows Azure SDK Authoring Tools (CSUpload)
Basic VHD validation
Dynamic disk to Fixed disk conversion
Multi-threaded upload
Resume functionality
Automatic Image/Disk registration
Image Patching support

CSUpload under the covers


Uploading an data disk is simple
Customers Storage Account
Data Disk

PUT Blob
Windows Azure
Storage API

Data
Disk

CSUpload under the covers


Uploading an OS disk is simple
Customers Storage Account
OS Disk

PUT Blob
Windows Azure
Storage API

OS
Disk

What will work on upload


Sysprepd Windows
Server
VHD on Hyper-V

Images
Windows
Azure Image

(Server 2008 R2 and


Windows 8 Server)

Windows Server
VHD on Hyper-V
(Server 2008 R2 and
Windows 8 Server)

Windows
Azure Disk
Disks

Persistent Disk Management


Capability

OS Disk

Data Disk

Host Cache Default ReadWrite

ReadOnly

Max Capacity

127 GB

1 TB

Imaging Capable

Yes

No

Hot Update

Cache Setting
Requires Reboot

Change Cache Without


Reboot, Add/Remove
without Reboot.

C:\ = OS Disk
D:\ = Non-Persistent Cache Disk
E:\, F:\. G:\ ... Data Disks

DEMO

Image Customization &


(Capture)
Bring your VMs / Data Disks
Migration : - Bring your own
VM from on-premises using
System Center App Controller

Technology Behind Launching a Virtual


Machine
Base
Customer
Data

Data Disk

OS

OS Disk

Image
s

Storage
Account

Image Publisher Gallery

ISO
Cache

VM

UNATTEN
D

Provisioning
Repository

Add Server
Storage API

CACHE.VHD

Windows Azure
Hypervisor

Portal (API)

Hostname
Password

Virtual Machine Provisioning Options


General Settings
Computer Name
Windows Update (default on)
Windows Domain Join Settings (Script Only)
Certificate/SSH Cert Deployment

Networking
Configure TCP/UDP Endpoints
Subnet Name(s)
Virtual Network

Disk Configuration
Modify cache and Add Data Disks

Windows Azure Virtual Machine


Architecture
Cloud Service

Clients

Location: North Central US


Name: myservice.cloudapp.net
Public IP (VIP)
myservice.cloudapp.net

VIP
Load Balancer

Deployment
Virtual Network: MyVNET
DNS Ips: 10.2.2.4, 10.2.2.5

Virtual MachineVirtual Machine


Role Name: srv1
Subnet: sub1

Role Name: srv2


Subnet: sub1

DIP

Windows
Azure
Storage

Virtual Machines Under the Hood


Virtual Machine
RoleName: spsql1
Subnet: AppSubnet
InstanceStatus:
ReadyRole
IP Address: 10.26.190.71

OS Disk
HostCaching
DiskName
MediaLink
SourceImageName
Eval.11-29-2011

Input Endpoints
EnableDirectServerReturn :
False
LocalPort
:
3389
Name
:
RDP
Port
:
61388
Protocol
:
tcp
Vip
:
65.52.249.196
LoadBalancerProbe:
LoadBalancedEndpointSetName:

Data Disk
HostCaching
: ReadOnly
DiskLabel
: sqldata
DiskName
: SPMigDemo1-spsql1-0-2012319124817
Lun
: 0
LogicalDiskSizeInGB : 20
MediaLink
: https://spmigdemo1.blob.core.azurepreview.com/vhds/sqldata.vhd

:
:
:
:

ReadWrite
SPMigDemo1-spsql1-0-2012319124815
http://spmigdemo1.core.azure-preview.com/vhds/spsql1.vhd
MSFT__Windows-Server-2008-R2-SP1-with-SQL-Server-2012-

Virtual Machine Management


Remote Desktop
Fully Configured.

Windows Update
On by default
Preferred mode for keeping your VMs up to date
No Coordination between VMs and platform updates

VM Customization & Software Acquisition


Interactively with RDP
Web PI
Data Disk
FTP Server
Hybrid SMB Server

Protocols and Endpoints


UDP Traffic Supported in WA
Load-balanced incoming traffic and allows outbound traffic

Support for All IP-Based Protocols (VM to VM)


Instance-to-instance communication
TCP, UDP and ICMP, Support for dynamic ports

Custom Load Balancer Health Probes


Health check based on Probes
HTTP and TCP based probing, allowing granular control of health
checks

Port Forwarded Endpoints


Direct communication to multiple VMs in the same cloud app

Service Management REST APIs- A Birds eye


View
Entity Reference
Parent Child
C - Reference
Create
R - Read
U - Update
D - Delete

Management.core.windows.net/
Management.core.windows.net/

Subscription
Subscription
(R)
(R)

Images
Images
(CRUD)
(CRUD)

Disks
Disks
(CRUD)
(CRUD)

Deployment
Deployment
(CRUD)
(CRUD)

Virtual
Virtual
Machine
Machine
(CRUD)

Data
Data Disk
Disk
(CRUD)
(CRUD)

Configuration
Configuration
Set
Set
(CRUD)

Hosted
Hosted
Service
Service
(CRUD)

Storage
Storage
Account
Account
(CRUD)
Service
Service
Certificate
(CRUD)
(CRUD)

Location
Location
(CRUD)
(CRUD)

OSFamily
OSFamily
(CRUD)
(CRUD)

OS
OS
(R)
(R)

Operation
Operation
s
s
(R)

REST APIs for VM Operations


Add Role (i.e., Create Virtual
Machine)

Delete Role

Get Role

Shutdown/Restart Role

Modify Role

Deployment Level APIs

Attach Disk

Capture Role

Detach Disk

Download RDP file

Modify Disk Attribute

Get/Set/List Virtual Networks

Create Virtual Machine


POST https://management.core.windows.net/<subid>/services/compute/myService/Deployments/myDeployment/Roles
{
Name:MyWebServerFrontEndH1,
RoleType:PersistentVMRole,
InstanceSize:Medium,
OSDisk: {
SourceImageId:PlatformWin2k8R2Apr01
},
DataDisks:
[{
LogicalDiskSizeInGB:15
}],
ConfigurationSets:
[{
ConfigurationSetType:ProvisioningConfiguration,
AdminPassword:ac63783093bbef82729==,
ResetPasswordOnFirstLogon:true
}]
}
Response 202 Accepted
x-ms-requestid : 3874857458459420685695

Capture a Virtual Machine


POST https://management.core.windows.net/<subid>/services/compute/myService/Deployments/
myDeployment/Roles/MyWebServerFrontEndH1/Operations?OperationType=Capture
{
TargetImageName:MySQLServerSP3BaseImage,
PostCaptureAction:REPROVISION|DELETE,
ConfigurationSets:[{
ConfigurationType:ProvisioningConfiguration,
AdminPassword:baac7364384948==,
ResetPasswordOnLogon:true,
MachineName:SQLServerv11
}]
}
Response 202 Accepted
x-ms-requestid : 3874857458459420685695

Introducing
Client Libraries for Service Management
We will deliver .NET Reference Library for all the
management scenarios
Prescriptive & Consistent Client Scenario Wrappers
to enable Microsoft & ISV products.
Java & PHP Libraries for non-Windows scenarios.

Announcing Windows Azure PowerShell


Cmdlets
Subscription Management
Cloud Services/Deployments
New/Upgrade/Delete/VIP Swap

Instance Management
Add/Remove/Reboot/Re-Image

Diagnostics Management
Configure/Download/Clea

Basic Storage Operations


Upload/Download/Delete
Create/Manage Storage Accounts
Storage Analytics

Virtual Machine Management


Create/Managing Virtual Machines
Hot Add Disks/Endpoints
Manage VNET Settings

Scripted Deployment
$vms = @()
$vms += New-AzureVM -RoleName 'vm1' -InstanceSize Small |
Add-ProvisioningConfiguration -Windows -AdminPassword $pwd |
Add-OSDisk -ImageName $imgname -MediaLocation $vm1storage
$vms += New-AzureVM -RoleName 'vm2' -InstanceSize Small |
Add-ProvisioningConfiguration -Windows -AdminPassword $pwd |
Add-OSDisk -ImageName $imgname -MediaLocation $vm2storage
New-AzureDeployment-NewCloudService -ServiceName $svcName
-Location 'North Central US' -Roles $vms

DEMO

REST API Surface area


Command Line Tools
Building Webfarm using
PowerShell
Managing Virtual Machines from
Linux/Mac

Scalextreme

ScaleXtreme Overview
Cloud-based Systems Management
Instant On
Manage existing servers or create brand-new servers no need to
use our images, you can use your own
Monitoring, Patch Management, general-purpose Job Automation,
Budgets & Cost Control, etc.

Complements Azure management functionality with actual


server launch and management capabilities Windows and
Linux fully supported, today
Directly integrates with Windows Azure through
management APIs
Worked closely with Microsoft to ensure native integration

Super Easy

1. Create free account at http://www.scalextreme.com/free


2. Link your Azure account to ScaleXtreme

3. Put agent on existing servers or start launching new ones

. All functionality (patch, job automation) instantly available!

Demo!

Application Patterns
SLA & Building for High Availability
Highly Available Application Pattern
SQL Mirroring for Availability
SharePoint
Designing VMs with Domain Controller
Connecting Cloud Services & VMs over
VIP
Connecting Cloud Services & VMs over
VNet
Mixed Mode (PaaS + IaaS working
together)

Service Level Agreements


99.95% for Virtual Machines (in Availability Set)
4.38 hours of downtime per year

99.9% for single Virtual Machine


8.75 hours of downtime per year

What is included
Compute Hardware failure (disk, cpu, memory)
Datacenter failures - Network failure, power failure
Hardware upgrades, Software maintenance Host OS
Updates

What is not included


VM Container crashes, Guest OS Updates

Availability Set Visualized


Fault Domain

Fault Domain

Rack

Rack

Virtual
Machine

Virtual
Machine

IIS1

Web Availability Set

Virtual
Machine

SQL1

IIS2

Virtual
Machine

SQL Availability Set

SQL2

How Does this Relate to SLA?


SLA >= 99.95

Availability Set

SLA 99.9

SQL
Server
- Primary
Virtual
Machine

SQL
Server
- Primary
Virtual
Machine

SQL
Server
- Primary
Virtual
Machine

End to End Highly Available Solution

IIS Web
Application
Web Role

Internet

Business
Components &
Entities
Persisten
t Disk

SQL
Server
Virtual Machine

SQL Mirroring

Redundancy at every level

Virtual Machine
LB
Tips :1. Add both VMs to
the same
availability Set at
every layer
2. Configure a load
balanced endpoint
on Port 80 for UI

IIS Web
Application
Web Role

Business
Components &
Entities
Persisten
t Disk

Virtual Machine

SQL
Server
Virtual Machine

Summary SLA and Availability


SCENARIO

WINDOWS AZURE

SQL SERVER

Multiple Instance
Availability

99.95% (Availability Sets)

99.95% (DB Mirroring)

Single Instance
Availability

99.9%

99.9%

Disaster Recovery

Windows Azure Storage


Geo-Replication

Log-Shipping/Backup

Tips :-

SharePoint
10.8.8.
10.8.8.
x
x

VNet

On
On
Premises
Premises
DC
DC

DC
DC
User
User
Accounts
Accounts

DNS
DNS

DNS
DNS

Virtual
Virtual Machine
Machine

Local
Local DNS
DNS

Create second VM from the Images


Create load balanced endpoints
Put both VMs in the same availability set

Virtual
Virtual Machine
Machine
Server
Server
Accounts
Accounts

SQL

Virtual
Virtual Machine
Machine

SharePoint
SharePoint
FrontEnd
FrontEnd

Create first VM from SQL Server.


Configure databases on it.
Sysprep and shut it down.
Capture as an Image

Virtual
Virtual Machine
Machine

Search
Search
and
and Index
Index

Virtual
Virtual Machine
Machine

DC
DC

DNS
DNS

Local
Local DNS
DNS

Virtual
Virtual Machine
Machine

Open
Open User
User
Access
Access
(Website)

Domain joined to
On-Premises
On-Premises
Network
Network

L
B

Internet

SharePoint
SharePoint
FrontEnd
FrontEnd

SQL

Virtual
Virtual Machine
Machine

SharePoint
SharePoint
FrontEnd
FrontEnd
Virtual
Virtual Machine
Machine

Internet

Server
Server
Accounts
Accounts

Virtual
Virtual Machine
Machine

Search
Search
and
and Index
Index
Persistent
Disk
Virtual Machine
Machine
Virtual

SQL
Virtual
Virtual Machine
Machine

SQL
SQL Mirroring
Mirroring

Persistent
Disk
Virtual
Virtual Machine
Machine

SQL

SQL
SQL Mirroring
Mirroring

SharePoint
SharePoint
FrontEnd
FrontEnd

L
B

Configure the Virtual Network


Configure Gateway to On Premise
Configure your on premise router
Start the gateway

Building Complex LOB Applications with


Domain Controller
VNet

Active Directory
Web Tier
UI Process
Components

DNS
Business & Data
Tier Business
Components &
Entities

SQL
Server
Virtual Machine

Virtual Machine
Domain joined to
Network

DEMO
Building Complex

Applications using
Domain based
Automation

Power of Choice
Virtual Machines(IaaS) & Cloud Services(PaaS) Better
Together
Connect Cloud Services via VIPs
Easily compose services by connecting public endpoints
Direct Connectivity Using Virtual Networking

Simple, secure and highly efficient method of using IaaS


and PaaS side-by-side
For advanced connectivity scenarios such as Active
Directory
or DCOM
Mixed Mode: Virtual Machines and Web/Worker Roles in the Same
Cloud Service

Connecting Cloud Services via VIPs


SQL Data Access Traffic Through Public Endpoint

Cloud
Service1

Load
Balancer

80
WA Web Role
Secure
Endpoints
with Firewall

Cloud
Service 2

2001-1433
Load
Balancer

SQL
Server

Strengths
Simplicity
Tenant Autonomy
VIP Swap (stateless roles)
Easy Local Dev/Test
Persistent Service is
Easily Accessible
(even from other services!)

Weakness
Higher Latency
Less Secure
Management/Deployment
Overhead

Connecting Cloud Services with VNET


ContosoVNet (10.0.0.0/8)

FrontEndSubne
t
(10.0.0.0/16)

80
Load
Balancer

Cloud
Service1

WA Web Role
Direct
Access
via VNET

AD
AD Subnet
(10.2.0.0/1
6)

Cloud
Service 2

SQLSubnet
(10.1.0.0/16)

SQL
Mirror

Strengths
Simplicity
Tenant Autonomy
VIP Swap (stateless roles)
Easy Local Dev/Test
Persistent Service is Easily
Accessible
(even from other services!)

Weakness

VNET Complexity
No iDNS use BYOD

Mixed Mode: PaaS/IaaS in the Same Cloud


Service
Cloud
Service

Load
Balancer

80

Strengths
Internal DNS (iDNS)
Low latency connectivity
Single deployment, update and
management unit

Virtual
Machine
WA Web Role

Weakness
No VIP Swap (coming in the
future)

Coming in the future

Track Resources

@WindowsAzure
@teched_europ
e

Hands-On Labs

DOWNLOAD
Windows Azure
Meetwindowsazure.c
om

Windowsazure.com/
teched

Resources
Learnin
g
Connect. Share. Discuss.

Microsoft Certification & Training Resources

http://europe.msteched.com

www.microsoft.com/learning

TechNe
t
Resources for IT Professionals

http://microsoft.com/technet

Resources for Developers

http://microsoft.com/msdn

Evaluations
Submit your evals
online
http://europe.msteched.com/sessions

2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.
The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to
be a commitment on the
part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS
PRESENTATION.

You might also like