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: articles/virtual-machines/linux/debian-create-upload-vhd.md
+20-27Lines changed: 20 additions & 27 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,8 +6,8 @@ ms.service: virtual-machines
6
6
ms.custom: linux-related-content
7
7
ms.collection: linux
8
8
ms.topic: how-to
9
-
ms.date: 11/10/2021
10
-
ms.author: srijangupta
9
+
ms.date: 05/01/2024
10
+
ms.author: maries
11
11
ms.reviewer: mattmcinnes
12
12
---
13
13
# Prepare a Debian VHD for Azure
@@ -24,23 +24,6 @@ This section assumes that you have already installed a Debian Linux operating sy
24
24
* Do not configure a swap partition on the OS disk. The Azure Linux agent can be configured to create a swap file on the temporary resource disk. More information can be found in the steps below.
25
25
* All VHDs on Azure must have a virtual size aligned to 1MB. When converting from a raw disk to VHD, you must ensure that the raw disk size is a multiple of 1MB before conversion. For more information, see [Linux Installation Notes](create-upload-generic.md#general-linux-installation-notes).
26
26
27
-
## Use Azure-Manage to create Debian VHDs
28
-
There are tools available for generating Debian VHDs for Azure, such as the [azure-manage](https://github.com/credativ/azure-manage) scripts from [Instaclustr](https://www.instaclustr.com/). This is the recommended approach versus creating an image from scratch. For example, to create a Debian 8 VHD run the following commands to download the `azure-manage` utility (and dependencies) and run the `azure_build_image` script:
This creates a VHD `image_buster_azure_amd64.vhd` with a rounded size to be able to copy it successfully to an Azure Disk.
89
+
This creates a VHD `image_[release]_azure_amd64.vhd` with a rounded size to be able to copy it successfully to an Azure Disk.
90
+
91
+
>[!Note]
92
+
> Rather than cloning the salsa repository and building images locally, current stable images can be built and downloaded from [FAI](https://fai-project.org/FAIme/cloud/).
93
+
94
+
After creating a stable Debian vhd image, before uploading verify the following packages are installed:
95
+
* apt-get install hyperv-daemons
96
+
* apt-get install waagent # *optional but recommended for password resets and the use of extensions*
97
+
* apt-get install cloud-init
107
98
108
-
Now we need to create the Azure resources for this image (this uses the `$rounded_size_adjusted` variable, so it should be from within the same shell process from above).
99
+
Then perform a full upgrade:
100
+
* apt-get full-upgrade
109
101
102
+
Now the Azure resources must be created for this image (this uses the `$rounded_size_adjusted` variable, so it should be from within the same shell process from above).
110
103
```
111
104
az group create -l $LOCATION -n $RG
112
105
@@ -149,7 +142,7 @@ az vm create \
149
142
>[!Note]
150
143
> If the bandwidth from your local machine to the Azure Disk is causing a long time to process the upload with azcopy, you can use an Azure VM jumpbox to speed up the process. Here's how this can be done:
151
144
>
152
-
>1. Create a tarball of the VHD on your local machine: `tar -czvf ./image_buster_azure_amd64.vhd.tar.gz ./image_buster_azure_amd64.vhd`.
145
+
>1. Create a tarball of the VHD on your local machine: `tar -czvf ./image_buster_azure_amd64.vhd.tar.gz ./image_[release]_azure_amd64.vhd`.
153
146
>2. Create an Azure Linux VM (distro of your choice). Make sure that you create it with a large enough disk to hold the extracted VHD!
154
147
>3. Download the azcopy utility to the Azure Linux VM. It can be retrieved from [here](../../storage/common/storage-use-azcopy-v10.md#download-azcopy).
155
148
>4. Copy the tarball to the VM: `scp ./image_buster_azure_amd64.vhd.tar.gz <vm>:~`.
0 commit comments