windows azure virtual machines - deep dive session
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
Windows Azure Virtual Machines – the Linux story
Alex Belotserkovskiy &Michal Smereczynski
OS DiskPersistentDefault Cache (R/W)Drive C:
Temp DiskLocal (Not Persistent)Drive D:
Data DisksPersistentDefault No CacheCustomer Defined Letter
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
EndpointPublic PortLocal PortProtocol (TCP/UDP)Name
Port Forwarding Input Endpoints
Cloud App/Hosted Service
Single Public IP Per Cloud Service
Load Balanced Sets
Endpoint SetPublic PortLocal PortProtocol (TCP/UDP)Name
Cloud App
Load Balancer Custom ProbesLoad Balancer ProbeSet NameProtocol (TCP)Probe PortProbe Path(/healthcheck.aspx)
Looks for HTTP 200
Cloud App
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
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
Understanding a Linux VM
Why Linux
Our customers have Linux Workloads that they want to run in Windows Azure
IaaS enables us to satisfy this need
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
Linux Offering
1ST
First Class CitizenEnterprise + ISV
Open Source Community
Support
What Does Persistent Mean?
Persistent OS Disk…and highly durable
Virtual Machine
Windows Azure StorageWindows Azure Storage (Disaster
Recovery)
What Does Persistent Mean?
Persistent OS Disk…and highly durable
Virtual Machine
Windows Azure StorageWindows Azure Storage (Geo-Replication)
Virtual Machine
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
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
Windows Azure Linux Agent
HV1 HV2
VM
Service Management APIWindows Azure provided DNS
Host1Host
2
Demo
Alex
Quick Create Demo
Demo
Michal
Some interesting Python, Bash and Powershell stuff
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
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
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
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
Linux Provisioning Options
Add-AzureProvisioningConfig OptionsLinux -LinuxUser $user -Password $pwd -DisableSSH , -NoSSHEndpoint -SSHKeyPairs, -SSHPublicKeys installed from certificates deployed in cloud service
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
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
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}
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
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
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
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
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'
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'
Demo
Alex
Virtual Network example (Linux way)
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
© 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.