Azure Saving Plan vs. Reserved Instances, Document Extract and Notes

Saving Plans and Reserved Instances

I have compiled the following information to help you better understand “Saving plan” and “Reserve instances” when using Pricing Calculator as shown on the left.

 Azure Saving PlanAzure Reserved Instance
Doc
  • Save with Azure savings plans
  • Save with Azure reservations
  • What
  • Up to 30%+ discount from pay-as-you-go pricing across Azure compute resource globally
  • Applicable to a selected scope
  • Scope changeable
  • Plan transferable between supported agreements
  • 1- or 3-year commitment with monthly or up-front payment
  • For Windows VMs and SQL Database, the saving plan discount doesn’t apply to the software costs. You may be able to cover the licensing costs with Azure Hybrid Benefit.
  • Self-service reservations trade-in for Azure savings plans
  • If your Azure VMsDedicated Hosts, or Azure App Service reservations don’t provide the necessary flexibility you need, you may trade them for a savings plan.
  • Up to 60%+ discount from pay-as-you-go prices
  • Reservation scoping and options
  • Discount auto-applies to the resource usage that matches the attributes you select when you buy the reservation including: SKU, Region (where applicable); and Reservation scope
  • 1- or 3-year commitment with monthly or up-front payment
  • Reservation benefits are “use-it-or-lose-it” at hourly grain.   
  • HowSearch the keyword, save and click Saving plans.
  • Who can buy a savings plan
  • Savings plan-eligible resources
  • Determine your savings plan commitment
  • Manage Azure savings plans – Microsoft Cost Management
  • Seach with the keyword, save or reservation, and click Reservations. Azure Reservation
  • Determine what to purchasePurchase reservations
  • Why
  • Consistent compute spending on disparate resources
  •  
  • Consistent resource usage
  •  

    Additional Information

    Use Spot Virtual Machines to buy unused compute capacity at significant cost savings for:

    • workloads that can handle interruptions and don’t need to be completed within a specific period of time.
    • workloads for dev/test/QA/Batch/ML/AI/image, etc. 

    Azure Network Topology Document Extracts and Notes

    Azure Network Topology

    • Two core approaches: traditional and Azure Virtual WAN
    • The above document has a topology diagram for each model.
    FeatureTraditional Azure Network TopologyAzure Virtual WAN Network Topology
    HighlightsCustomer-managed routing and security

    An Azure subscription can create up to 50 vnets across all regions.

    Vnet Peering links two vnets either in the same region or in different regions and enables you to route traffic between them using private IP addresses (carry a nominal charge).

    Inbound and outbound traffic is charged at both ends of the peered networks. Network appliances such as VPN Gateway and Application Gateway that are run inside a virtual network are also charged.

    Azure Virtual Network Pricing  
    A Microsoft-managed networking service providing optimized and automated branch to branch connectivity through Azure.

    Virtual WAN allows customers to connect branches to each other and Azure, centralizing their network and security needs with virtual appliances such as firewalls and Azure network and security services.

    Azure Virtual WAN Pricing
    DeploymentCustomized deployment with routing and security managed by the customer

    Virtual Network documentation

    Plan virtual networks

    Tutorial: Filter network traffic with a network security group using the Azure portal
    Microsoft-managed service

    Virtual WAN documentation

    Tutorial: Create an ExpressRoute association to Virtual WAN – Azure portal

    – Other tutorials include site-to-site and point-to-site connections
    InterconnectivityTraffic between two virtual networks across two different Azure regions is expected. Full mesh network across all Azure regions is not required.Global connectivity between vnets in these Azure regions and multiple on-premises locations.
    IPsec TunnelsFewer than 30 IPsec Site-to-Site tunnels are needed.More than 30 branch sites for native IPsec termination.
    Routing PolicyFull control and granularity for manually configuring your Azure network routing policy.Not applicable
    Data CollectionCollects data from servers and Kubernetes clusters.Collects data from servers and Kubernetes clusters.
    Data StorageStores data in Log Analytics workspace or customer’s own storage account.Stores data in Log Analytics workspace or customer’s own storage account.
    Data Analysis and VisualizationUses Log Analytics for analysis and visualization of collected data.Uses Azure Monitor for analysis and visualization of collected data.

    Additional Information

    Why Azure Arc

    For IT decision makers, here’s why it’s pertinent to consider Azure Arc:

    • An integrated management and governance solution that is centralized and unified, providing streamlined control and oversight.
    • Securely extending your on-prem and non-Azure resources into Azure Resource Manager (ARM), empowering you to:
      • Define, deploy, and manage resources in a declarative fashion using JSON template for dependencies, configuration settings, policies, etc.
      • Manage Azure Arc-enabled servers, Kubernetes clusters, and databases as if they were running in Azure with consistent user experience.
      • Harness your existing Windows and Azure sysadmin skills honed from on-premises deployment.
    • When connecting to Azure Arc-enabled servers, you may perform many operational functions, just as you would with native Azure VMs including these key supported actions:
      • Govern
      • Protect
        • Secure non-Azure servers with Microsoft Defender for Endpoint, included through Microsoft Defender for Cloud, for threat detection, vulnerability management, and proactive monitoring for potential security threats. Microsoft Defender for Cloud presents the alerts and remediation suggestions from the threats detected.
      • Configure
      • Monitor
        • Keep an eye on OS, processes, and dependencies along with other resources using VM insights. Additionally collect, store, and analyze OS as well as workload logs, performance data, and events. Which may be injected into Microsoft Sentinel real-time analysis, threat detection, and proactive security measures across the entire IT environment.
    October 10, 2023 is the date the support for Windows Server 2012 and 2012 R2 ends.
January 9, 2024 is the date the support for Windows Server 2012 and 2012 R2 ends.

    Extended Security Updates (ESUs) is enabled by Azure Arc. IT can seamlessly deploy ESUs through Azure Arc in on-premises or multi-cloud environments, right from the Azure portal. In addition to providing a centralized management of security patching, ESUs enabled by Azure Arc is flexible with a pay-as-you-go subscription model compared to the classic ESU offered through the Volume Licensing Center which are purchased in yearly increments.

    To test it out, follow Quickstart – Connect hybrid machine with Azure Arc-enabled servers.

    Azure OpenAI Document Extracts and Notes

    Featured

    OVERVIEW

    • Azure OpenAI is a service provided by Microsoft Azure that allows users to access OpenAI’s powerful language models, including the GPT-3, Codex, and Embeddings model series. Users can access the service through REST APIs, Python SDK, or a web-based interface in the Azure OpenAI Studio.
    • Azure OpenAI Service gives customers advanced language AI with OpenAI
      • GPT-4, GPT-3, Codex, and DALL-E
      • Models with the enterprise security and privacy of Azure.
    • Azure OpenAI co-develops the APIs with OpenAI, ensuring compatibility and a smooth transition from one to the other
    • Azure OpenAI Infographic

    Comparing Azure OpenAI and OpenAI

    • Enterprise-grade security with role-based access control (RBAC) and private networks
    • Essentially Security, Privacy, and Trust
    • Microsoft values a customer’s privacy and security of data. When using Azure AI services, Microsoft may collect and store data to improve the session experience and supportability of models. However, customer data is anonymized and aggregated to protect individual privacy.
    • Microsoft does not use customer data for fine-tuning or customizing models for individual users.
    • Microsoft Responsible AI Standard (PDF Download)

    Responsible AI

    • For building AI systems according to six principles:
      • Fairness and Inclusiveness
        • Make the same recommendations to everyone who has similar symptoms, financial circumstances, or professional qualifications.
      • Reliability and Safety
        • Operate as originally designed, respond safely to unanticipated conditions, and resist harmful manipulation.
      • Privacy and Security
        • Restrict access to resources and operations by user account or group.
        • Restrict incoming and outgoing network communications.
        • Encrypt data in transit and at rest.
        • Scan for vulnerabilities.
        • Apply and audit configuration policies.
        • Microsoft has also created two open-source packages that can enable further implementation of privacy and security principles: SmartNoise and Counterfit
      • Transparency and Accountability
        • The model interpretability component provides multiple or global, local, and model explanations/views into a model’s behavior.
        • The people who design and deploy AI systems must be accountable for how their systems operate.

    SECURITY AND PRIVACY

    • Azure OpenAI Service automatically encrypts your data when it’s persisted to the cloud, using FIPS 140-2 compliant 256-bit AES encryption.
    • By default, Microsoft-managed encryption keys are used, but you also have the option to use customer-managed keys (CMK) for greater control over encryption key management.
    • The Files API allows customers to upload their training data stored in Azure Storage, within the same region as the resource and logically isolated with their Azure subscription and API Credentials. Uploaded files can be deleted by the user via the DELETE API operation.
    • With Azure OpenAI, customers get the security capabilities of Microsoft Azure while running the same models as OpenAI. Azure OpenAI offers private networking, regional availability, and responsible AI content filtering.
      • Azure OpenAI Service contains neural multi-class classification models aimed at detecting and filtering harmful content; the models cover
        • four categories: hate, sexual, violence, and self-harm across
        • four severity levels: safe, low, medium, and high.
      • The default content filtering is default to filter at the medium severity threshold for all four content harm categories for both prompts and completions. That means that content that is detected at severity level medium or high is filtered, while content detected at severity level low is not filtered by the content filters. The configurability feature is available in preview and allows customers to adjust the settings, separately for prompts and completions, to filter content for each content category at different severity levels.

    AZURE OPENAI MODELS

    Azure OpenAI provides access to models with various capabilities. The following is a list of the models and their descriptions:

    • GPT-4 (8k/32k): A set of models that improve on GPT-3.5 and can understand as well as generate natural language and code.
    • GPT-3 (4k/16k): A series of models that can understand and generate natural language. This includes the new ChatGPT model.
    • DALL-E: A series of models that can generate original images from natural language.
    • Codex: A series of models that can understand and generate code, including translating natural language to code.
    • Embeddings: A set of models that can understand and use embeddings. An embedding is a special format of data representation that can be easily utilized by machine learning models and algorithms. The embedding is an information dense representation of the semantic meaning of a piece of text. Currently, we offer three families of Embeddings models for different functionalities: similarity, text search, and code search.

    AZURE OPENAI ON YOUR DATA

    With Azure OpenAI GPT-35-Turbo and GPT-4 models, enable them to provide responses based on your data. You can access Azure OpenAI on your data using a REST API or the web-based interface in the Azure OpenAI Studio to create a solution that connects to your data to enable an enhanced chat experience.

    Per the document, Azure OpenAI on your data, Azure OpenAI Service supports the following file types:

    File typeExtension
    Text.txt
    Markdown.md
    HTML.html
    Word.docx
    PowerPoint.pptx
    PDF.pdf
    CSV.csv
    TSV.tsv
    Excel.xlsx
    JSON.json
    JSONL.jsonl

    QUICKSTART

    Previous models were text-in and text-out, meaning they accepted a prompt string and returned a completion to append to the prompt. However, the GPT-35-Turbo and GPT-4 models are conversation-in and message-out.

    TRAIN MODEL

    TOKEN

    • Azure OpenAI processes text by breaking it down into tokens. Tokens can be words or just chunks of characters. For example, the word “hamburger” gets broken up into the tokens “ham”, “bur” and “ger”, while a short and common word like “pear” is a single token. Many tokens start with a whitespace, for example “ hello” and “ bye”.
    • The total number of tokens processed in a given request depends on
      • the length of your input,
      • output and
      • request parameters.

    The quantity of tokens being processed will also affect your response latency and throughput for the models.

    Azure OpenAI Pricing

    • Pricing will be based on the pay-as-you-go consumption model with a price per unit for each model, which is similar to other Azure AI Services pricing models.

    Azure Service Availability

    • SLA: This describes Microsoft’s commitments for uptime and connectivity for Microsoft Online Services covering Azure, Dynamics 365, Office 365, and Intune.

    Quota and Limits

    PLAYGROUND

    The system role also known as the system message is included at the beginning of the array. This message provides the initial instructions to the model. You can provide various information in the system role including:

    • A brief description of the assistant
    • Personality traits of the assistant
    • Instructions or rules you would like the assistant to follow
    • Data or information needed for the model, such as relevant questions from an FAQ

    You can customize the system role for your use case or just include basic instructions. The system role/message is optional, but it’s recommended to at least include a basic one to get the best results.

    Azure AD has become Microsoft Entra ID

    Per Microsoft’s Announcement on July 11th, the net is

    “To simplify our product naming and unify our product family, we’re changing the name of Azure AD to Microsoft Entra ID. Capabilities and licensing plans, sign-in URLs, and APIs remain unchanged, and all existing deployments, configurations, and integrations will continue to work as before. Starting today, you’ll see notifications in the administrator portal, on our websites, in documentation, and in other places where you may interact with Azure AD. We’ll complete the name change from Azure AD to Microsoft Entra ID by the end of 2023. No action is needed from you.

    Chart outlining all the product name changes that come with the renaming of Azure AD to Microsoft Entra ID.

    Here are some key resources:

    AzureRM to be retired on February 29, 2024

    Just so you know,

    • After February 29, 2024, AzureRM PowerShell modules will continue to be available to customers, however will not be supported by Microsoft. 
    • Know your options for updating your scripts from AzureRM to Az PowerShell modules.
    • To automatically update scripts, reference this quickstart guide.
    • May want to upgrade sooner than later since Az PowerShell module runs cross-platform and supports all Azure services including Azure authentication mechanisms.

    Deploying Azure VM with a Generalized VHD file Using Azure Portal

    Assuming one has already

    • logged in Azure portal
    • had a generalized vhd stored in an Azure storage account,
    1. Create an image with a target vhd file by

    searching and find the image service

    adding a vm image

    browsing and selecting an intended vhd file to create a vm image

    1. Create a vm with the image by

    form the Images page, selecting/clicking the target image

    creating a vm with the image from the image overview page

     Test RDP

    From the vm overview page, start and connect to the VM

    • If RDP does not start a dialogue as the following,

    use RUN command to review and validate the VM RDP settings, as needed

    • If experiencing a credential issue,

    reset the user password or create new user credential

     

    Disabling/Enabling Azure VM BootDiagnostic Using PowerShell

    Despite a simple operation, apply the following sample statements to your environment if experiencing an issue in changing an Azure VM’s BootDiagnostic setting.

    ISSUE for

    • Not able to disable/enable BootDiagoistic of an Azure VM

    HOW-TO

    References:

    SAMSPLE STATEMENTS

    The same process applies to enabling BootDiagnostic by specifying a vm object with the associated resource group and an intended storage account in step 4.

    <# 
    Disabling Azure VM BootDiagnostic Using PowerShell 
    
    The following illustrates the process to disable VM BootDiagnostic. 
    The statements are intended to be executed manually and in sequence. 
    #>
     
    # 1. Log in Azure and set the context, as appropriate
    Connect-AzAccountstep 4
    Get-AzContext
    Set-AzContext -Subscription '????' -Tenant '????'
     
    # 2. Specify a target VM 
    $vmName = 'your vm name'
    $vmRG = 'the resource group name of the vm'
     
    # 3. Check the current BootDiagnostics status
    ($VM = Get-AzVM -ResourceGroupName $vmRG -Name $vmName).DiagnosticsProfile.BootDiagnostics
     
    # 4. Disable BootDiagnostic of the VM
    Set-AzVMBootDiagnostic -VM $VM -Disable
     
    # 5. Update the VM settings
    Update-AzVM -ResourceGroupName $vmRG -VM $VM
     
    # 6. Check the current BootDiagnostics status and verify the change made
    ($VM = Get-AzVM -ResourceGroupName $vmRG -Name $vmName).DiagnosticsProfile.BootDiagnostics
     
    # Notice it may take a few minutes for azure portal to reflect 
    # the changes made to BootDiagnostic.
     
    

    SAMPLE SESSION

    • Examine status before making a change

    BootDiagnostic Settig

    • Disable BootDiagnistic

    • Examine status after making the change

    Finding an Azure VM Image Sku Using PowerShell

    <#
    
    The function, azure-vm-image-sku, returns the sku of a user-selected 
    Azure VM image interactively. It calls the function, pick-one-item, 
    which accepts an item-list and returns a selected item interactively.
    
    This script is for demonstrating and learning Azure and PowerShell. 
    The code is not optimized and does not handle all error messages. 
    
    Usage:
    
    # Get a sku in the default text mode
    azure-vm-image-sku 
    
    # Get a sku with GUI
    azure-vm-image-sku -gui $true
    
    # Get a sku with optional switches
    azure-vm-image-sku `
      -region 'targetAzureRegion' `
      -publisher 'targetPublisherName' `
      -offer 'targetOffer' `
      -gui $true
    
    Examples: 
    
    azure-vm-image-sku -region 'south central us' -gui $true
    
    azure-vm-image-sku `
      -region 'south central us' `
      -publisher 'microsoftwindowsserver'
    
    azure-vm-image-sku `
      -region 'south central us' `
      -publisher 'microsoftwindowsserver' `
      -offer 'windowsserver' 
    
    © 2020 Yung Chou. All Rights Reserved.
    
    #>
    
    function pick-one-item {
    
      param (
        [array  ]$thisList = @('East Asia','South Central US', 'West Europe', 'UAE North', 'South Afraica North'), 
        [string ]$itemDescription ='Azure Region', 
        [boolean]$gui = $false
        )
    
      if ($gui) {
    
        $thisOne = $thisList | Out-GridView -Title "$itemDescription List" -PassThru
      
      } else {
      
        if ($thisList.count -eq 1) { $thisOne = $thisList[0] 
        } else {
          
          $i=1; $tempList = @()
    
          foreach ( $item in $thisList )  {
              $tempList+="`n$i.`t$item" 
              $i++
          }
    
          do {
              write-host "`nHere's the $itemDescription list `n$tempList"
              $thePick = Read-Host "`nWhich $itemDEscription"
          } while(1..$tempList.length -notcontains $thePick)
    
          $thisOne = $thisList[($thePick-1)]
        }
      }
    
      write-host "$(get-date -f T) - Selecting '$thisOne' from the $itemDescription list " -f green -b black
    
      return $thisOne
      
    }
    
    function azure-vm-image-sku {
    
      param (
    
        [boolean]$gui = $false, 
        
        [string]$region = (pick-one-item `
          -thisList (Get-AzLocation).DisplayName `
          -itemDescription "Azure region" `
          -gui $gui ),
    
        [string]$publisher = (pick-one-item `
          -thisList (Get-AzVMImagePublisher -Location $region).PublisherName `
          -itemDescription "Azure $region publisher" `
          -gui $gui ),
    
        [string]$offer = (pick-one-item `
          -thisList (Get-AzVMImageOffer -Location $region -PublisherName $publisher).offer `
          -itemDescription "Azure $region $publisher's Offer" `
          -gui $gui ),  
    
        [string]$itemDescription = "Azure $region $publisher $offer Sku"
    
        )
    
      return $sku = (pick-one-item `
        -thisList (Get-AzVMImageSku -Location $region -PublisherName $publisher -Offer $offer).skus `
        -itemDescription $itemDescription `
        -gui $gui )
    
    }
    

    Creating Azure Usage and Quota Report Using PowerShell

    
    write-host "
    
    This script, based on the original script published in the article,
    
    Report Azure resource usage with PowerShell
    https://4sysops.com/archives/report-azure-resource-usage-with-powershell/,
    
    displays interactively the Azure compute, storage, 
    and network quota and usage of an examined region relevant to 
    an Azure subscription. It also generates a text file accordingly. 
    
    © 2020 Yung Chou. All Rights Reserved.
    
    "
    
    #region [Customization]
    
    $region="uksouth"
    
    #endregion
    
    Connect-AzAccount
    
    #region [Needed only if an account owns multiple subscriptions]
    
    # Set the context for subsequent operations
    $context = (Get-AzSubscription | Out-GridView -Title 'Set subscription context' -PassThru)
    Set-AzContext -Subscription $context | Out-Null
    write-host "Azure context set for the subscription, `n$((Get-AzContext).Name)" -f green
    
    #endregion
    
    #region [DO NOT CHANGE]
    
    ($vm = Get-AzVMUsage -Location $region `
    | select @{label='ResourceType';expression={$_.name.LocalizedValue}}, currentvalue, limit) `
    | Out-GridView -Title "Azure $region Region Compute Quota & Usage"
    
    ($storage = Get-AzStorageUsage -Location $region `
    | select @{label='ResourceType';expression={$_.name}}, currentvalue, limit) `
    | Out-GridView -Title "Azure $region Region Storage Account Quota & Usage"
    
    ($network = Get-AzNetworkUsage -Location $region `
    | select @{label='ResourceType';expression={$_.resourcetype}}, currentvalue, limit) `
    | Out-GridView -Title "Azure $region Network Quota & Usage"
    
    $when=get-date -format 'yyyyMMdd-hhmm'
    
    ($usage = @("Azure $region Region Quota and usage, as of $when",$vm,"`n",$storage,"`n",$network) | ft) `
    >> "usage-$region-$when.txt"
    
    #endregion [DO NTO CHANGE]