Azure Classroomnotes 29/Apr/2022

Azure VM Images

  • Generalization:
    • In this VM Image will not have user specific information
    • The user information is set while creating a VM
    • On the first boot you can set the hostname, admin user and other vm specific configuration.
    • These images contain the Azure agent, this aggent will process the parameters and signal back to the platform that the initial configuration has completed. This process is called as provisioning.
    • Provisioning in linux requires
      • Azure Linux Agent
      • Cloud init
  • Specialization:
    • These are the images that are completely configured and do not require VM or special parameters.
    • The platform will turn the VM on and you will need to handle uniqueness within the vm like setting the host name etc.
  • Azure VM Images can be stored in the following two ways
    • Managed Images:
      • Can be used to create multiple VMs, but they have a lot of limitations.
      • Managed Images can be created from a generlized source.
      • They can only be used to create VMs in the same region and they can’t be shared across subscriptions and tenants
    • Azure Compute Gallery
      • This is recommended for creating managing and sharing the images at scale.
      • Azure Compute Gallery helps build structure and organization around your images
        • Supports both Generalized and specialized Images
        • Global replication of Image
        • Versioning and Grouping of images for easier management
        • Sharing across subscriptions and even between tenants using Azure RBAC
      • At a high level, you create a gallery and it is made up of
        • Image definition: container that holds group of images
        • Image version: These are actual images
  • Gen 1 vs Gen 2 VM Refer Here
  • Sources for Creating VM Images

    • VM
    • Create an Image from a disk backup (VM Snapshot)
    • External tools like Packer Refer Here
    • Azure Image Builder
  • Create a VM Image from Azure Portal
  • Now lets create a vm with the vm image
  • Exercise: Create a new resource group and create a windows vm (Windows Server 2016) and install IIS server. Refer Here

    • Store the vm image in the image gallery with new image defintion and version.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

About continuous learner

devops & cloud enthusiastic learner