WIndows Azure Virtual Machines - deep dive session

37
Windows Azure Virtual Machines – the Linux story Alex Belotserkovskiy & Michal Smereczynski

description

Windows Azure IaaS deep dive session with some ninja command-line (Python, Bash, Powershell) demos by Michal and lot of a theory.Focus on Linux way.

Transcript of WIndows Azure Virtual Machines - deep dive session

Page 1: WIndows Azure Virtual Machines - deep dive session

Windows Azure Virtual Machines – the Linux story

Alex Belotserkovskiy &Michal Smereczynski

Page 2: WIndows Azure Virtual Machines - deep dive session

OS DiskPersistentDefault Cache (R/W)Drive C:

Temp DiskLocal (Not Persistent)Drive D:

Data DisksPersistentDefault No CacheCustomer Defined Letter

Page 3: WIndows Azure Virtual Machines - deep dive session

Disk LimitsOS DiskMaximum 127 GB, R/W CacheData DiskUp to 16 disks (XL)Maximum 1 TB eachCacheNo cache for performance workloadsOnly 4 disks can have a cache

Page 4: WIndows Azure Virtual Machines - deep dive session

EndpointPublic PortLocal PortProtocol (TCP/UDP)Name

Port Forwarding Input Endpoints

Cloud App/Hosted Service

Single Public IP Per Cloud Service

Page 5: WIndows Azure Virtual Machines - deep dive session

Load Balanced Sets

Endpoint SetPublic PortLocal PortProtocol (TCP/UDP)Name

Cloud App

Page 6: WIndows Azure Virtual Machines - deep dive session

Load Balancer Custom ProbesLoad Balancer ProbeSet NameProtocol (TCP)Probe PortProbe Path(/healthcheck.aspx)

Looks for HTTP 200

Cloud App

Page 7: WIndows Azure Virtual Machines - deep dive session

Protocols and Endpoints

Port Forwarded EndpointsDirect communication to multiple VMs in the same cloud app

Support for All IP-Based Protocols (VM to VM)Instance-to-instance communicationTCP, UDP and ICMP, dynamic ports

UDP Traffic Supported in WALoad-balanced incoming traffic and allows outbound traffic

Custom Load Balancer Health ProbesHealth check with probe timeoutsHTTP based probing, allowing granular control of health checks

Page 8: WIndows Azure Virtual Machines - deep dive session

Windows Azure Virtual Machine - Details

8

CPU Core MemoryVM Size

A0

A1

A2

A3

A4

Shared

1

2

4

8

768 MB

1.75 GB

3.50 GB

7.00 GB

14.00 GB

Max Attached vDisks (<=1TB each)

1

2

4

8

16

A6 4 28.00 GB 8

A7 8 56.00 GB 16

Page 9: WIndows Azure Virtual Machines - deep dive session

Understanding a Linux VM

Page 10: WIndows Azure Virtual Machines - deep dive session

Why Linux

Our customers have Linux Workloads that they want to run in Windows Azure

IaaS enables us to satisfy this need

Page 11: WIndows Azure Virtual Machines - deep dive session

Distributions

We will supportSUSE SLES 11 sp2Open SUSE 12.1CentOS 6.2 by OpenLogic* Ubuntu 12.04

Specific versions are endorsedIntegration ComponentsTesting and validation by partnersBring other variants at your own risk**

( at GA only)

*Image provided by OpenLogic based on CentOS 6.2**Integration Work will be needed

Page 12: WIndows Azure Virtual Machines - deep dive session

Linux Offering

1ST

First Class CitizenEnterprise + ISV

Open Source Community

Support

Page 13: WIndows Azure Virtual Machines - deep dive session

What Does Persistent Mean?

Persistent OS Disk…and highly durable

Virtual Machine

Windows Azure StorageWindows Azure Storage (Disaster

Recovery)

Page 14: WIndows Azure Virtual Machines - deep dive session

What Does Persistent Mean?

Persistent OS Disk…and highly durable

Virtual Machine

Windows Azure StorageWindows Azure Storage (Geo-Replication)

Virtual Machine

Page 15: WIndows Azure Virtual Machines - deep dive session

The Technology to Provision a Platform Image

Portal (API)HyperVisor

VM

OS

Data

Cache

ISO

Platform Storage Repository

Customer’s Storage Account

Stock Images

Provisioning Repository

Unattend

Add Server Hostname Password …

Cache.VHD

Storage API

OS Disk

Data Disk

Page 16: WIndows Azure Virtual Machines - deep dive session

The Technology to Provision a Linux Platform Image

Portal (API)HyperVisor

VM

OS

Data

Cache

ISO

Partner Repository

Customer’s Storage Account

Stock Images

Provisioning Repository

Unattend

Add Server Hostname Password …

Cache.VHD

Storage API

OS Disk

Data Disk

Linux Agent

ICs

Page 17: WIndows Azure Virtual Machines - deep dive session

Windows Azure Linux Agent

HV1 HV2

VM

Service Management APIWindows Azure provided DNS

Host1Host

2

Page 18: WIndows Azure Virtual Machines - deep dive session

Demo

Alex

Quick Create Demo

Page 19: WIndows Azure Virtual Machines - deep dive session

Demo

Michal

Some interesting Python, Bash and Powershell stuff

Page 20: WIndows Azure Virtual Machines - deep dive session
Page 21: WIndows Azure Virtual Machines - deep dive session

Simple VM Creation

First Virtual Machine in a NEW Cloud Service (-Location specified)New-AzureQuickVM -Windows -ServiceName $svc -Name $vm1 -ImageName $wimg -Location $location -Password $pwd

New Virtual Machine in an Existing Cloud Service (no –Location)New-AzureQuickVM -Windows -ServiceName $svc -Name $vm2 -ImageName $wimg -Password $pwd

Creating a Linux Virtual Machine in an Existing Cloud ServiceNew-AzureQuickVM -Linux -ServiceName $svc -Name $vm3 -ImageName $limg -LinuxUser $lu -Password $pwd

Page 22: WIndows Azure Virtual Machines - deep dive session

Configuring VM at Provisioning

Create Configuration Object with New-AzureVMConfigModify with Add-* cmdletsAdd with New-AzureVM

New-AzureVMConfig -Name $vm1 -InstanceSize Medium -ImageName $img | Add-AzureProvisioningConfig -Windows -Password $pwd | Add-AzureDataDisk -CreateNew -DiskLabel 'data' -DiskSizeInGB 10 -LUN 0 | Add-AzureEndpoint -Name 'web' -PublicPort 80 -LocalPort 80 -Protocol tcp | New-AzureVM -ServiceName $newSvc -Location $location

Page 23: WIndows Azure Virtual Machines - deep dive session

VM Batch Creation

Create Multiple Configured VMs and Pass to New-AzureVM

$vm1 = New-AzureVMConfig -Name 'myvm1' -InstanceSize 'Small' -ImageName $img | Add-AzureProvisioningConfig -Windows -Password $pwd

$vm2 = New-AzureVMConfig -Name 'myvm1' -InstanceSize 'Small' -ImageName $img | Add-AzureProvisioningConfig -Windows -Password $pwd $vm3 = New-AzureVMConfig -Name 'myvm1' -InstanceSize 'Small' -ImageName $img | Add-AzureProvisioningConfig -Windows -Password $pwd New-AzureVM -CreateService -ServiceName $cloudSvcName -VMs $vm1,$vm2,$vm3 -Location $dc

Page 24: WIndows Azure Virtual Machines - deep dive session

VM Batch Creation (using an array)

Create Multiple Configured VMs and Pass to New-AzureVM

$vmcount = 5$vms = @()for($i = 0; $i -lt 5; $i++){ $vmn = 'myvm' + $i $vms += New-AzureVMConfig -Name $vmn -InstanceSize 'Small' -ImageName $img | Add-AzureProvisioningConfig -Windows -Password $pwd | Add-AzureDataDisk -CreateNew -DiskLabel 'data' -DiskSizeInGB 10 -LUN 0 | Add-AzureDataDisk -CreateNew -DiskLabel 'logs' -DiskSizeInGB 10 -LUN 1 }

New-AzureVM -ServiceName $cloudSvcName -VMs $vms -Location $dc

Page 25: WIndows Azure Virtual Machines - deep dive session

Linux Provisioning Options

Add-AzureProvisioningConfig OptionsLinux -LinuxUser $user -Password $pwd -DisableSSH , -NoSSHEndpoint -SSHKeyPairs, -SSHPublicKeys installed from certificates deployed in cloud service

Page 26: WIndows Azure Virtual Machines - deep dive session

Deploying into a Virtual Network

Virtual Machine SettingsSet Subnet on VM with Set-AzureSubnet

Deployment SettingsSet Virtual Network -VNetName Set DNS Servers - New-AzureDns and -DNSSettings

Page 27: WIndows Azure Virtual Machines - deep dive session

Provisioning into a VNET and Active Directory$dom = 'contoso'$jdom = 'contoso.com'$onPremDNS = New-AzureDns -IPAddress '192.168.1.4' -Name 'OnPremDNS'$cloudDNS = New-AzureDns -IPAddress '10.1.1.4' -Name 'CloudDNS'$computerOU = $advmou = 'OU=AzureVMs,DC=contoso,DC=com‘

New-AzureVMConfig -Name 'myvm1' -InstanceSize 'Small' -ImageName $img | Add-AzureProvisioningConfig -WindowsDomain -Password $pwd -Domain $dom ` -DomainUserName $domUser -DomainPassword $dpwd -JoinDomain $jdom ` -MachineObjectOU 'AzureVMs' | Set-AzureSubnet -SubnetNames 'AppSubnet' | New-AzureVM –ServiceName $svc -AffinityGroup 'adag' ` -VNetName 'ADVNet' -DnsSettings $onPremDNS, $cloudDNS

Page 28: WIndows Azure Virtual Machines - deep dive session

Virtual Machine Discovery

Retrieve Cloud Services Get-AzureService

Retrieve Virtual Machines for Service Get-AzureVM -ServiceName $cloudSvcName

Retrieve Status for All VMs in SubsriptionGet-AzureService | foreach { $_ | Get-AzureVM | ft ServiceName, Name, InstanceStatus}

Page 29: WIndows Azure Virtual Machines - deep dive session

Virtual Machine Storage

Data DisksAdd/Remove data disks at boot or while runningCreate blank or attach existing disks

Modify Cache Settings of OS Disk or Data DiskModifying OS Disk while running requires reboot

Page 30: WIndows Azure Virtual Machines - deep dive session

Data Disk Creation

New Virtual Machine Creation with Data DiskNew-AzureVMConfig -Name 'myvm1' -InstanceSize 'Small' -ImageName $img | Add-AzureProvisioningConfig -Windows -Password $pwd | Add-AzureDataDisk -CreateNew -DiskSizeInGB 10 -DiskLabel 'myddisk' -LUN 0 | New-AzureVM -ServiceName $cloudSvcName

Add new Data Disk to existing Virtual MachineGet-AzureVM -ServiceName 'myvm1' | Add-AzureDataDisk -CreateNew -DiskSizeInGB 10 -DiskLabel 'myddisk' -LUN 1 | Update-AzureVM

Page 31: WIndows Azure Virtual Machines - deep dive session

Modifying Cache Settings

Set Host Caching on OS Disk During ProvisioningNew-AzureVMConfig -Name 'myvm1' -InstanceSize 'Small' -ImageName $img | Add-AzureProvisioningConfig -Windows -Password $pwd | Set-AzureOSDisk -HostCaching 'ReadOnly' | New-AzureVM -ServiceDescription $cloudSvcName

Set Host Caching on Existing Data Disk in running VMGet-AzureVM -ServiceName $cloudSvcName -Name 'myvm1' | Set-AzureDataDisk -HostCaching 'ReadWrite' -LUN 0 | Update-AzureVM

Page 32: WIndows Azure Virtual Machines - deep dive session

Configuring Endpoints

Add Endpoints at CreationNew-AzureVMConfig -Name 'myvm1' -InstanceSize 'Small' -ImageName $img | Add-AzureProvisioningConfig -Windows -Password $pwd | Add-AzureEndpoint -LocalPort 80 -PublicPort 80 -Name http -Protocol tcp | Add-AzureEndpoint -LocalPort 443 -PublicPort 443 -Name https -Protocol tcp | New-AzureVM -ServiceDescription $cloudSvcName

Modify Endpoints at RuntimeGet-AzureVM -ServiceName $cloudSvcName -Name 'myvm1' Add-AzureProvisioningConfig -Windows -Password $pwd | Add-AzureEndpoint -LocalPort 53 -PublicPort 53 -Name dns -Protocol udp | Remove-AzureEndpoint -Name https | New-AzureVM -ServiceDescription $cloudSvcName

Page 33: WIndows Azure Virtual Machines - deep dive session

Capturing a Virtual Machine as a new ImageCapture Sys-Prepped VM into a new Image (Deletes the Source VM)

Save-AzureVMImage -ServiceName $cloudSvcName -Name 'myvm1' -NewImageName 'Image Name'

Page 34: WIndows Azure Virtual Machines - deep dive session

Virtual Network Operations

View and Set Virtual Network ConfigurationGet-AzureVNetConfig | Select -Expand XMLConfigurationSet-AzureVNetConfig -ConfigurationPath 'c:\Network\MyNetCFG.xml'

Start and Stop Virtual Network Gateway Set-AzureVNetGateway -Disconnect -VNetName 'MyVNet' -LocalNetworkSiteName 'MySite'Set-AzureVNetGateway -Connect -VNetName 'MyVNet' -LocalNetworkSiteName 'MySite'

View Virtual Network StatusGet-AzureVNetConnection -VNetName 'MyVNet'

Page 35: WIndows Azure Virtual Machines - deep dive session

Demo

Alex

Virtual Network example (Linux way)

Page 36: WIndows Azure Virtual Machines - deep dive session

It’s a lab time

https://github.com/WindowsAzure-TrainingKitItPRO:HOL-AutomatingVMManagementPSHOL-IntroToWindowsAzureVirtualMachinesLinuxhttp://thinkfirstcodelater.com/blog/?p=2982DevPro:Demo-UrlShortener-PHPHOL-WebAppGalleryAzureWebSites-OSXHOL-NodejsAzureWebSitesVMs-OSXHOL-PHPAppsAzureWebSites-OSX

Page 37: WIndows Azure Virtual Machines - deep dive session

© 2011 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.