Az104 — Azure Virtual Hard Drive(VHD)

Setumo Raphela
2 min readNov 19, 2020

· A virtual hard disk is conceptually similar to a physical hard disk.

· You can use a VHD to host the operating system and run a virtual machine.

· A VHD can also hold databases and other user-defined folders, files, and data.

· A VHD can hold anything that you can store on a physical hard disk.

· A virtual machine can contain multiple VHDs.

· Typically, a virtual machine has an operating system VHD on which the operating system is installed.

· It also has one or more data VHDs that contain the applications and other user-specific data used by the virtual machine.

· The VHDs for a typical virtual machine image contain a preconfigured version of an operating system.

· The tools for preparing a virtual machine for generalization vary according to the operating system that’s being installed and configured.

o For Windows, use the Microsoft System Preparation (Sysprep) tool.

o For Linux, use the Windows Azure Linux Agent (waagent) tool.

· After you have generalized the virtual machine, you can create an image.

· The image will include all of the disks associated with the virtual machine.

· You can create an image from the generalized virtual machine by using the Azure portal, the Azure CLI, or PowerShell.

· When you create a virtual machine image in this way, the original virtual machine becomes unusable. You can’t restart it.

· When you deploy an application across a scale set, you need a mechanism that updates your application consistently, across all instances in the scale set.

· You achieve this outcome by using a custom script extension.

· An Azure custom script extension downloads and runs a script on an Azure VM.

· It can automate the same tasks on all the VMs in a scale set.

· The VMs are updated according to the upgrade policy for the scale set.

· You specify this policy when you first create the scale set.

· The upgrade policy can have one of the following three modes:

  • Automatic:
  • The scale set doesn’t define when the VMs are upgraded.
  • They could all update at the same time, causing a service outage.
  • Rolling:
  • The scale set rolls out the update in batches across the VMs in the scale set.
  • An optional pause can minimize or eliminate a service outage.
  • In this mode, machines in the scale set might run different versions of the app for a short time.
  • This mode requires that you either add a health probe to the scale set or apply the application health extension to the scale set.
  • Manual:
  • Existing VMs in the scale set aren’t updated.
  • All changes must be done manually.
  • This mode is the default.

--

--

Setumo Raphela

Entrepreneur | Data Scientist | AI | Jet Skier | Author |Oracle