Tuesday, 21 May 2024

Azure disk-pool

 

az disk-pool


Manage Azure disk pool.

Commands

NameDescriptionTypeStatus
az disk-pool create

Create Disk pool. This Create operation can take 15 minutes to complete. This is expected service behavior.

ExtensionGA
az disk-pool delete

Delete a Disk pool; attached disks are not affected. This delete operation can take 10 minutes to complete. This is expected service behavior.

ExtensionGA
az disk-pool iscsi-target

Manage iSCSI target with a Disk Pool.

ExtensionGA
az disk-pool iscsi-target create

Create an iSCSI Target.

ExtensionGA
az disk-pool iscsi-target delete

Delete an iSCSI Target.

ExtensionGA
az disk-pool iscsi-target list

Get iSCSI Targets in a Disk pool.

ExtensionGA
az disk-pool iscsi-target show

Get an iSCSI Target.

ExtensionGA
az disk-pool iscsi-target update

Update an iSCSI Target.

ExtensionGA
az disk-pool iscsi-target wait

Place the CLI in a waiting state until a condition of the disk-pool iscsi-target is met.

ExtensionGA
az disk-pool list

Gets a list of DiskPools in a resource group. And Gets a list of Disk Pools in a subscription.

ExtensionGA
az disk-pool list-outbound-network-dependency-endpoint

Gets the network endpoints of all outbound dependencies of a Disk Pool.

ExtensionGA
az disk-pool list-skus

Lists available StoragePool resources and skus in an Azure location.

ExtensionGA
az disk-pool list-zones

Lists available Disk Pool Skus in an Azure location.

ExtensionGA
az disk-pool redeploy

Redeploy replaces the underlying virtual machine hosts one at a time. This operation can take 10-15 minutes to complete. This is expected service behavior.

ExtensionGA
az disk-pool show

Get a Disk pool.

ExtensionGA
az disk-pool start

The operation to start a Disk Pool. This start operation can take 10 minutes to complete. This is expected service behavior.

ExtensionGA
az disk-pool stop

Shuts down the Disk Pool and releases the compute resources. You are not billed for the compute resources that this Disk Pool uses. This operation can take 10 minutes to complete. This is expected service behavior.

ExtensionGA
az disk-pool update

Update a Disk pool.

ExtensionGA
az disk-pool wait

Place the CLI in a waiting state until a condition of the disk-pool is met.

ExtensionGA

az disk-pool create

Create Disk pool. This Create operation can take 15 minutes to complete. This is expected service behavior.

Azure CLI



az disk-pool create --disk-pool-name
                    --resource-group
                    --sku
                    --subnet-id
                    [--additional-capabilities]
                    [--availability-zones]
                    [--disks]
                    [--location]
                    [--managed-by]
                    [--managed-by-extended]
                    [--no-wait]
                    [--tags]

Examples

Create or Update Disk pool

Azure CLI
az disk-pool create --location "westus" --availability-zones "1" --disks "/subscriptions/11111111-1111-1111-1111-111111111111/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/vm-name_DataDisk_0" --disks "/subscriptions/11111111-1111-1111-1111-111111111111/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/vm-name_DataDisk_1" --subnet-id "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/myvnet/subnets/mysubnet" --sku name="Basic_V1" tier="Basic" --tags key="value" --name "myDiskPool" --resource-group "myResourceGroup"

Required Parameters

--disk-pool-name --name -n

The name of the Disk Pool.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--sku

Determines the SKU of the Disk Pool.

Usage: --sku name=XX tier=XX

name: Required. Sku name tier: Sku tier.

--subnet-id

Azure Resource ID of a Subnet for the Disk Pool.

Optional Parameters

--additional-capabilities -a

List of additional capabilities for a Disk Pool.

--availability-zones

Logical zone for Disk Pool resource; example: ["1"].

--disks

List of Azure Managed Disks to attach to a Disk Pool.

The order of this parameter is specific customized. Usage: --disks id-value

id: Required. Unique Azure Resource ID of the Managed Disk.

Multiple actions can be specified by using more than one --disks argument.

--location -l

Location. Values from: az account list-locations. You can configure the default location using az configure --defaults location=<location>.

--managed-by

Azure resource id. Indicates if this resource is managed by another Azure resource.

--managed-by-extended

List of Azure resource ids that manage this resource.

--no-wait

Do not wait for the long-running operation to finish.

default value: False
--tags

Space-separated tags: key[=value] [key[=value] ...]. Use "" to clear existing tags.

Global Parameters

az disk-pool delete

Delete a Disk pool; attached disks are not affected. This delete operation can take 10 minutes to complete. This is expected service behavior.

Azure CLIaz disk-pool delete [--disk-pool-name]
                    [--ids]
                    [--no-wait]
                    [--resource-group]
                    [--subscription]
                    [--yes]

Examples

Delete Disk pool


az disk-pool delete --name "myDiskPool" --resource-group "myResourceGroup"

Optional Parameters

--disk-pool-name --name -n

The name of the Disk Pool.

--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

--no-wait

Do not wait for the long-running operation to finish.

default value: False
--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--yes -y

Do not prompt for confirmation.

default value: False
Global Parameters

az disk-pool list

Gets a list of DiskPools in a resource group. And Gets a list of Disk Pools in a subscription.

Azure CLI
az disk-pool list [--resource-group]

Examples

List Disk Pools

Azure CLI
az disk-pool list --resource-group "myResourceGroup"

List Disk Pools by subscription

Azure CLI
az disk-pool list

Optional Parameters

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Global Parameters

az disk-pool list-outbound-network-dependency-endpoint

Gets the network endpoints of all outbound dependencies of a Disk Pool.

Azure CLIaz disk-pool list-outbound-network-dependency-endpoint --disk-pool-name
                                                       --resource-group

Examples

Get Disk Pool outbound network dependencies

Azure CLI
az disk-pool list-outbound-network-dependency-endpoint --name "SampleAse" --resource-group "Sample-WestUSResourceGroup"

Required Parameters

--disk-pool-name --name -n

The name of the Disk Pool.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Global Parameters

az disk-pool list-skus

Lists available StoragePool resources and skus in an Azure location.

Azure CLI
az disk-pool list-skus --location

Examples

List Disk Pool Skus

Azure CL
az disk-pool list-skus --location "eastus"

Required Parameters

--location -l

Location. Values from: az account list-locations. You can configure the default location using az configure --defaults location=<location>.

Global Parameters

az disk-pool list-zones

Lists available Disk Pool Skus in an Azure location.

Azure CLI
az disk-pool list-zones --location

Examples

List Disk Pool Zones

Azure CLI
az disk-pool list-zones --location "eastus"

Required Parameters

--location -l

Location. Values from: az account list-locations. You can configure the default location using az configure --defaults location=<location>.

Global Parameters

az disk-pool redeploy

Redeploy replaces the underlying virtual machine hosts one at a time. This operation can take 10-15 minutes to complete. This is expected service behavior.

Azure CLI
az disk-pool redeploy [--disk-pool-name]
                      [--ids]
                      [--no-wait]
                      [--resource-group]
                      [--subscription]

Examples

Redeploy Disk Pool

Azure CLI
az disk-pool redeploy --name "myDiskPool" --resource-group "myResourceGroup"

Optional Parameters

--disk-pool-name --name -n

The name of the Disk Pool.

--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

--no-wait

Do not wait for the long-running operation to finish.

default value: False
--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

Global Parameters

az disk-pool show

Get a Disk pool.

Azure CLI
az disk-pool show [--disk-pool-name]
                  [--ids]
                  [--resource-group]
                  [--subscription]

Examples

Get Disk pool

Azure CLI
az disk-pool show --name "myDiskPool" --resource-group "myResourceGroup"

Optional Parameters

--disk-pool-name --name -n

The name of the Disk Pool.

--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

Global Parameters

az disk-pool start

The operation to start a Disk Pool. This start operation can take 10 minutes to complete. This is expected service behavior.

Azure CLI
az disk-pool start [--disk-pool-name]
                   [--ids]
                   [--no-wait]
                   [--resource-group]
                   [--subscription]

Examples

Start Disk Pool

Azure CLI
az disk-pool start --name "myDiskPool" --resource-group "myResourceGroup"

Optional Parameters

--disk-pool-name --name -n

The name of the Disk Pool.

--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

--no-wait

Do not wait for the long-running operation to finish.

default value: False
--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

Global Parameters

az disk-pool stop

Shuts down the Disk Pool and releases the compute resources. You are not billed for the compute resources that this Disk Pool uses. This operation can take 10 minutes to complete. This is expected service behavior.

Azure CLI
az disk-pool stop [--disk-pool-name]
                  [--ids]
                  [--no-wait]
                  [--resource-group]
                  [--subscription]

Examples

Deallocate Disk Pool

Azure CLI
az disk-pool stop --name "myDiskPool" --resource-group "myResourceGroup"

Optional Parameters

--disk-pool-name --name -n

The name of the Disk Pool.

--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

--no-wait

Do not wait for the long-running operation to finish.

default value: False
--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

Global Parameters

az disk-pool update

Update a Disk pool.

Azure CLI
az disk-pool update [--disk-pool-name]
                    [--disks]
                    [--ids]
                    [--managed-by]
                    [--managed-by-extended]
                    [--no-wait]
                    [--resource-group]
                    [--sku]
                    [--subscription]
                    [--tags]

Examples

Update Disk pool

Azure CLI
az disk-pool update --name "myDiskPool" --disks "/subscriptions/11111111-1111-1111-1111-111111111111/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/vm-name_DataDisk_0" --disks "/subscriptions/11111111-1111-1111-1111-111111111111/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/vm-name_DataDisk_1" --sku name="Basic_B1" tier="Basic" --tags key="value" --resource-group "myResourceGroup"

Optional Parameters

--disk-pool-name --name -n

The name of the Disk Pool.

--disks

List of Azure Managed Disks to attach to a Disk Pool.

The order of this parameter is specific customized. Usage: --disks id-value

id: Required. Unique Azure Resource ID of the Managed Disk.

Multiple actions can be specified by using more than one --disks argument.

--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

--managed-by

Azure resource id. Indicates if this resource is managed by another Azure resource.

--managed-by-extended

List of Azure resource ids that manage this resource.

--no-wait

Do not wait for the long-running operation to finish.

default value: False
--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--sku

Determines the SKU of the Disk Pool.

Usage: --sku name=XX tier=XX

name: Required. Sku name tier: Sku tier.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--tags

Space-separated tags: key[=value] [key[=value] ...]. Use "" to clear existing tags.

Global Parameters

az disk-pool wait

Place the CLI in a waiting state until a condition of the disk-pool is met.

Azure CLI
az disk-pool wait [--created]
                  [--custom]
                  [--deleted]
                  [--disk-pool-name]
                  [--exists]
                  [--ids]
                  [--interval]
                  [--resource-group]
                  [--subscription]
                  [--timeout]
                  [--updated]

Examples

Pause executing next line of CLI script until the disk-pool is successfully created.

Azure CLI
az disk-pool wait --name "myDiskPool" --resource-group "myResourceGroup" --created

Pause executing next line of CLI script until the disk-pool is successfully updated.

Azure CLI
az disk-pool wait --name "myDiskPool" --resource-group "myResourceGroup" --updated

Pause executing next line of CLI script until the disk-pool is successfully deleted.

Azure CLI
az disk-pool wait --name "myDiskPool" --resource-group "myResourceGroup" --deleted

Optional Parameters

--created

Wait until created with 'provisioningState' at 'Succeeded'.

default value: False
--custom

Wait until the condition satisfies a custom JMESPath query. E.g. provisioningState!='InProgress', instanceView.statuses[?code=='PowerState/running'].

--deleted

Wait until deleted.

default value: False
--disk-pool-name --name -n

The name of the Disk Pool.

--exists

Wait until the resource exists.

default value: False
--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

--interval

Polling interval in seconds.

default value: 30
--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--timeout

Maximum wait in seconds.

default value: 3600
--updated

Wait until updated with provisioningState at 'Succeeded'.

default value: False

A Step-by-Step Guide For Creating a Azure Disk Pool Account

 

A Step-by-Step Guide For Creating a Azure Disk Pool Account



What is Azure Disk Pool?

Azure Disk Pool is a feature in Microsoft Azure that allows you to create a pool of managed disks that can be shared across multiple virtual machines. This feature is designed to help you save costs and simplify management by reducing the number of managed disks required for your virtual machines. With Azure Disk Pool, you can manage a group of disks as a single unit, making it easier to manage and monitor your storage resources. By sharing disks across multiple VMs, you can reduce the I/O load on individual disks and improve overall performance. Additionally, you can easily scale up or down your storage resources by adding or removing disks from the pool.

Azure Disk Pools: Cost-Effective and Efficient Storage Management

Azure Disk Pools is a new feature in Azure that allows you to create pools of managed disks that can be shared across multiple virtual machines. This feature is designed to help you save costs and simplify management by reducing the number of managed disks required for your virtual machines.

Benefits of Azure Disk Pools

One of the main benefits of using Azure Disk Pools is cost savings. Instead of creating and managing individual disks for each VM, you can create a pool of disks and share them across multiple VMs. This can help you save money by reducing the number of managed disks you need to pay for and reducing the storage costs associated with managing individual disks.

Another benefit of Azure Disk Pools is simplified management. With disk pools, you can manage a group of disks as a single unit, making it easier to manage and monitor your storage resources. This can help you simplify your operations and reduce the time and effort required to manage your storage infrastructure.

Azure Disk Pools also provides improved performance and scalability. By sharing disks across multiple VMs, you can reduce the I/O load on individual disks and improve overall performance. Additionally, you can easily scale up or down your storage resources by adding or removing disks from the pool.

How to create an Azure Disk Pool

1. Log in to the Azure portal (https://portal.azure.com/):

create an Azure Disk Pool

2. In the Azure portal, click the "Create a resource" button (+) on the left-hand side of the screen.

create an Azure Disk Pool

3. In the search box, type "Disk Pool" and select "Disk Pool" from the list of available resources.

create an Azure Disk Pool

4. Click on the "Create" button to begin creating the Disk Pool account

create an Azure Disk Pool

5. In the "Basics" tab, provide a name for your Disk Pool account and select the subscription, resource group, and location for the account.

create an Azure Disk Pool

6. In the "Configuration" tab, select the type of disk pool you want to create. You can choose between "Ultra Disk Storage" or "Premium SSD Storage".

7. In the "Review + create" tab, review your settings and click the "Create" button to create your Disk Pool account.

Mastering Azure's Compute Gallery and VM Image Creation

 

Mastering Azure's Compute Gallery and VM Image Creation




Azure Compute Gallery is a service in Microsoft Azure that allows you to create, manage, and share custom virtual machine (VM) images with ease. This write-up will guide you through the process of creating an Azure Compute Gallery step by step.

Prerequisites
Before you begin, ensure that you have the following prerequisites in place:

Azure Subscription: You need an active Azure subscription. If you don't have one, you can sign up for a free trial at Azure Portal.

Azure Resource Group: Create an Azure Resource Group to organize and manage your gallery resources.

Virtual Machine: An existing Azure virtual machine that you want to capture an image from.

Step 1: Create a Gallery

  • Log in to the Azure Portal.

In the left-hand menu, click on Create a resource.

Create a resource

  • In the search bar, type "Compute Gallery" and select it from the search results.

Compute Gallery

  • Click the Create button.

Create button

  • Fill in the required details:
  1. Subscription: Select your Azure subscription.

Azure subscription

  1. Resource group: Choose the resource group you created earlier.Resource group
  2. Gallery name: Choose a unique name for your gallery.

Gallery name

  1. Region: Choose the Azure region where you want to deploy the gallery.

Region

  • Click the 'Next + Sharing method' button.

Next + Sharing method

  • Sharing method: On the sharing method page, leave it on default which is the Role based access control(RBAC). Role-Based Access Control (RBAC) in Azure is a security mechanism that regulates access to resources. It employs roles with specific permissions, which are assigned to users, groups, or applications through role assignments. RBAC functions across various levels like management groups, subscriptions, resource groups, and resources themselves. It prioritizes least privilege and can be managed through the Azure Portal, PowerShell, CLI, or templates. Regular audits are important for maintaining security and compliance.

Sharing method.

  • Click the 'Next: Tag' button.

Next: Tag

Leave the Tags on default or you can create a Tag or you can assign tags based on your preference. Click the Review + create button to review your settings. Make sure everything is configured correctly.

Next: Tag

  • Finally, click the Create button to create the gallery once validation is passed.

click the Create button

Once your deployment is completed, you have successfully created an Azure Compute Gallery. Click on the 'Go to resource' button to access your newly deployed compute gallery.

Go to resource

Go to resource

Step 2: Capturing an Azure Virtual Machine Image to Compute Gallery

Prepare the Virtual Machine
Before capturing the VM image, ensure that your VM is in a suitable state:

  • Stop the VM: It's recommended to stop the VM to ensure a consistent state during the capture process. You can stop it from the Azure Portal.

  • Deallocate the VM: If you are capturing an image from a VM that is not in a deallocated state, you can deallocate it from the Azure Portal to avoid additional charges. Azure deallocates VM automatically during this process if you don't do it manually.

Step 3: Capture the VM Image

In the Azure Portal, navigate to the Virtual machines section.

Select the VM you want to capture an image from.

VM

In the VM's overview page, under Settings, click on Capture. This action initiates the image capture process.

click on Capture

Provide the required information:

  • Image target gallery: Select the Azure Compute Gallery where you want to store this image.

Image target gallery

  • Operating system state: choose one out of the two option Generalized and Specialized, In the context of Azure Virtual Machine (VM) image capture, "Generalized" and "Specialized" refer to two different states of the VM:

Generalized: When a VM is in a "Generalized" state, it has been prepared to be a reusable image. In this state, any specific configuration and unique information, such as the computer name, have been removed or generalized. This process typically involves running the "Sysprep" tool on a Windows VM or executing similar steps on a Linux VM. After this, the VM is often shut down. Generalized VMs are suitable for creating custom images that can be used to deploy multiple VM instances with the same base configuration.

Specialized: A VM in a "Specialized" state is one that hasn't undergone the generalization process. It's in a specific, unique configuration with potentially personalized settings and data. Specialized VMs are typically used for ongoing production purposes and are not intended to be used as a template for creating new VM instances.

When capturing an image of an Azure VM, it's essential to generalize the VM first if you want to create a reusable image. Specialized VMs, on the other hand, are kept as-is for ongoing operations. Understanding and appropriately managing the state of your VMs is crucial for efficient image management in Azure. Here we picked Specialized since we are having an ongoing operation and want to have the ease of not authenticating when we scale.

Target VM image definition:

  • Target VM image definition: Click on 'Create New'.

Target VM image definition:

  • VM Image definition name: Choose a unique name for your captured image. Leave other fields as default and click 'Ok'.

VM Image definition name

  • Image version: Provide a version number and an optional description for this image version. Versioning in VM image capture is the practice of maintaining multiple snapshots or versions of a virtual machine image in Azure. Instead of overwriting the original image, each change or update creates a new version. This allows for flexible deployment, enabling you to choose specific image versions when creating VM instances. It's essential for managing changes and ensuring the ability to revert to known, stable configurations when needed.

Image version

  • Replication: This refers to the process of duplicating the VM's virtual hard disk (VHD) to create a copy of the VM's entire state, including the operating system, installed software, and data. Here we are replicating just 1 image of our VM and our storage option is Zone Redundant. Configure the target region(s) where this image version will be available.

Replication

  • Click 'Review + create' to review your settings. Ensure that everything is configured correctly.

Review + create

  • Finally, click 'Create' to start the image capture process. The VM will be deallocated, and Azure will capture an image of it.

Create

Once the process is complete, the captured image will be stored in your specified Azure Compute Gallery. Once deployment is complete you can now 'Go to resource'.

Go to resource

Tadaa! 🎉This is our captured VM Image in our compute gallery.

Tadaa!