You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/learning-paths/servers-and-cloud-computing/azure-vm/_index.md
+7-8Lines changed: 7 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,24 +1,23 @@
1
1
---
2
-
title: Create Azure Linux 3.0 custom Arm VM
2
+
title: Create an Azure Linux 3.0 virtual machine with Cobalt 100 processors
3
3
4
4
draft: true
5
5
cascade:
6
6
draft: true
7
7
8
8
minutes_to_complete: 120
9
9
10
-
who_is_this_for: This Learning Path helps developers create a custom Azure Linux 3.0 virtual machine for Arm and utilize the default software stack provided by Microsoft.
10
+
who_is_this_for: This Learning Path explains how to create a virtual machine on Azure running Azure Linux 3.0 on Cobalt 100 processors.
11
11
12
12
13
13
learning_objectives:
14
-
- Use the qemu-img utility to create a raw disk image, boot a VM with Aarch64 ISO to install the OS onto that disk, and convert the raw disk image into VHD
15
-
- Upload the VHD to Azure and use the Azure Shared Image Gallery to create a custom image.
16
-
- Use Azure CLI to create Azure Linux 3.0 VM for Arm, using the custom image from Azure SIG.
14
+
- Use QEMU to create a raw disk image, boot a VM using an Aarch64 ISO, install the OS, and convert the raw disk image to VHD format.
15
+
- Upload the VHD file to Azure and use the Azure Shared Image Gallery (SIG) to create a custom image.
16
+
- Use the Azure CLI to create an Azure Linux 3.0 VM for Arm, using the custom image from the Azure SIG.
17
17
18
18
prerequisites:
19
-
- A [Microsoft Azure](https://azure.microsoft.com/) account with permission to create resources, including Cobalt 100 (Arm64) instances (Dpsv6).
20
-
- A local Linux machine with [QEMU](https://www.qemu.org/download/) installed to emulate Aarch64.
21
-
- An [Azure CLI](https://learn.microsoft.com/en-us/cli/azure/install-azure-cli) installed and authenticated on your local machine.
19
+
- A [Microsoft Azure](https://azure.microsoft.com/) account with permission to create resources, including instances using Cobalt 100 processors.
20
+
- A local Linux machine with [QEMU](https://www.qemu.org/download/) and the [Azure CLI](/install-guides/azure-cli/) installed and authenticated.
title: Create custom Azure Linux 3.0 Arm image for the VM
2
+
title: Create an Azure Linux image for Arm
3
3
weight: 3
4
4
5
5
### FIXED, DO NOT MODIFY
6
6
layout: learningpathall
7
7
---
8
8
9
-
## Roadmap to the Azure Linux 3.0 Arm VM image
9
+
You can view the Azure Linux 3.0 project on [GitHub](https://github.com/microsoft/azurelinux). There are links to the ISO downloads in the project README.
10
10
11
-
In this learning path, we will start by [downloading the Aarch64 ISO of Azure Linux 3.0](https://github.com/microsoft/azurelinux#iso). Using qemu-img, we’ll create a raw disk image and boot a virtual machine with the ISO to install the OS onto the disk. Once the installation is complete, we will convert the raw disk to a fixed-size VHD, upload it to Azure Blob Storage, and then use the Azure CLI to create a custom Arm image. This custom image will enable us to launch Azure Linux 3.0 virtual machines on Arm-based infrastructure, even though the Azure Marketplace currently provides this image only for x64 systems.
11
+
Using QEMU, you can create a raw disk image and boot a virtual machine with the ISO to install the OS onto the disk.
12
12
13
-
Next, switch to a Linux-based environment and proceed with the following steps.
13
+
Once the installation is complete, you can convert the raw disk to a fixed-size VHD, upload it to Azure Blob Storage, and then use the Azure CLI to create a custom Arm image.
14
+
15
+
## Download and create a virtual disk file
16
+
17
+
Use `wget` to download the Azure Linux ISO image file.
VHD files have 512 bytes of footer attached at the end. The “force_size” flag ensures that the exact virtual size specified is used for the final VHD file (in our case, 32 GiB). Without this, qemu-img may round the size or adjust for footer overhead (especially when converting from raw to VHD). “force_size” forces the final image to match the original size. This flag helps make the final VHD size a clean, whole number in MB or GiB, which Azure requires.
63
-
{{% /notice %}}
58
+
## Convert the raw disk to VHD Format
64
59
65
-
#### 6. Set environment variables
66
-
Below uploading the VHD file to Azure Blob storage, set the Environment Variables for the Azure CLI.
60
+
Now that the raw disk image is ready to be used, convert the image to fixed-size VHD, making it compatible with Azure.
67
61
68
62
```bash
69
-
RESOURCE_GROUP="MyCustomARM64Group"
70
-
LOCATION="centralindia"
71
-
STORAGE_ACCOUNT="mycustomarm64storage"
72
-
CONTAINER_NAME="mycustomarm64container"
73
-
VHD_NAME="azurelinux-arm64.vhd"
74
-
GALLERY_NAME="MyCustomARM64Gallery"
75
-
IMAGE_DEF_NAME="MyAzureLinuxARM64Def"
76
-
IMAGE_VERSION="1.0.0"
77
-
PUBLISHER="custom"
78
-
OFFER="custom-offer"
79
-
SKU="custom-sku"
80
-
OS_TYPE="Linux"
81
-
ARCHITECTURE="Arm64"
82
-
HYPERV_GEN="V2"
83
-
STORAGE_ACCOUNT_TYPE="Standard_LRS"
84
-
VM_NAME="MyAzureLinuxARMVM"
85
-
ADMIN_USER="azureuser"
86
-
VM_SIZE="Standard_D4ps_v6"
63
+
qemu-img convert -f raw -o subformat=fixed,force_size -O vpc azurelinux-arm64.raw azurelinux-arm64.vhd
87
64
```
88
65
89
66
{{% notice Note %}}
90
-
You can modify the values of these environment variables—such as RESOURCE_GROUP, VM_NAME, LOCATION, and others—based on your naming preferences, region, and resource requirements.
67
+
VHD files have 512 bytes of footer attached at the end. The `force_size` flag ensures that the exact virtual size specified is used for the final VHD file. Without this, QEMU may round the size or adjust for footer overhead (especially when converting from raw to VHD). The `force_size` flag forces the final image to match the original size. This flag helps make the final VHD size a clean, whole number in MB or GiB, which is required for Azure.
91
68
{{% /notice %}}
92
69
93
-
#### 7. Create a Resource Group on Azure
94
-
After [installing the Azure CLI](https://learn.microsoft.com/en-us/cli/azure/install-azure-cli?view=azure-cli-latest), create a new resource group.
95
-
96
-
```bash
97
-
$ az group create --name "$RESOURCE_GROUP" --location "$LOCATION"
98
-
```
99
-
100
-
#### 8. Create Azure Blob Storage on Azure
101
-
102
-
```bash
103
-
$ az storage account create \
104
-
--name "$STORAGE_ACCOUNT"\
105
-
--resource-group "$RESOURCE_GROUP"\
106
-
--location "$LOCATION"\
107
-
--sku Standard_LRS \
108
-
--kind StorageV2
109
-
```
110
-
111
-
#### 9. Create Blob Container in the Blob Storage Account
112
-
113
-
```bash
114
-
$ az storage container create \
115
-
--name "$CONTAINER_NAME"\
116
-
--account-name "$STORAGE_ACCOUNT"
117
-
```
118
-
119
-
#### 10. Upload VHD to the Blob container created in step 9
120
-
121
-
```bash
122
-
$ az storage blob upload \
123
-
--account-name "$STORAGE_ACCOUNT"\
124
-
--container-name "$CONTAINER_NAME"\
125
-
--name "$VHD_NAME"\
126
-
--file ./azurelinux-arm64.vhd
127
-
```
128
-
129
-
This successfully uploads the VHD to the Azure Blob Storage account. Confirm the same after visiting the blob storage of your Azure account.
130
-
131
-
Now, let’s create a custom VM image from this VHD, using Azure Shared Image Gallery.
Azure Linux 3.0 is Microsoft's in-house, lightweight Linux distribution optimized for running cloud-native workloads on Azure. Designed with performance, security, and reliability in mind, it is fully supported by Microsoft and tailored for containers, microservices, and Kubernetes. With native support for Arm64 (Aarch64) architecture, Azure Linux 3.0 enables efficient execution of workloads on energy-efficient ARM-based infrastructure, making it a powerful choice for scalable and cost-effective cloud deployments.
11
+
Azure Linux 3.0 is a Linux distribution developed and maintained by Microsoft, specifically designed for use on the Azure cloud platform. It is optimized for running cloud-native workloads, such as containers, microservices, and Kubernetes clusters, and emphasizes performance, security, and reliability. Azure Linux 3.0 provides native support for the Arm (AArch64) architecture, enabling efficient, scalable, and cost-effective deployments on Arm-based infrastructure within Azure.
12
12
13
-
As of now, the Azure Marketplace offers official VM images of Azure Linux 3.0 only for x64-based architectures, published by Ntegral Inc. However, native Arm64 (Aarch64) images are not yet officially available. This learning path bridges that gap by guiding developers through the process of building a custom Arm VM image using the Azure Linux 3.0 ISO. By the end of this path, you'll be able to deploy and run Azure Linux 3.0 VMs on Arm-based Azure infrastructure with confidence.
13
+
Currently, Azure Linux 3.0 is not available as a ready-made virtual machine image for Arm-based VMs in the Azure Marketplace. Only x86_64 images, published by Ntegral Inc., are offered. This means you cannot directly create an Azure Linux 3.0 VM for Arm from the Azure portal or CLI.
14
14
15
+
However, you can still run Azure Linux 3.0 on Arm-based Azure VMs by creating your own disk image. Using QEMU, an open-source machine emulator and virtualizer, you can build a custom Azure Linux 3.0 Arm image locally. After building the image, you can upload it to your Azure account as a managed disk or custom image. This process allows you to deploy and manage Azure Linux 3.0 VMs on Arm infrastructure, even before official images are available.
16
+
17
+
This Learning Path guides you through the steps to build an Azure Linux 3.0 disk image with QEMU, upload it to Azure, and prepare it for use in creating virtual machines.
18
+
19
+
Following this process, you'll be able to create and run Azure Linux 3.0 VMs on Arm-based Azure infrastructure.
20
+
21
+
To get started install the dependencies on your local Linux machine. The instructions work for both Arm or x86 running Ubuntu.
You also need to install the Azure CLI. Refer to [How to install the Azure CLI](https://learn.microsoft.com/en-us/cli/azure/install-azure-cli?view=azure-cli-latest). You can also use the [Azure CLI install guide](/install-guides/azure-cli/) for Arm Linux systems.
28
+
29
+
Make sure the CLI is working by running the version command and confirm the version is printed.
30
+
31
+
```bash
32
+
az version
33
+
```
34
+
35
+
You should see an output similar to:
36
+
37
+
```output
38
+
{
39
+
"azure-cli": "2.61.0",
40
+
"azure-cli-core": "2.61.0",
41
+
"azure-cli-telemetry": "1.1.0",
42
+
"extensions": {}
43
+
}
44
+
```
45
+
46
+
Continue to learn how to prepare the Azure Linux disk image.
0 commit comments