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/disks-upload-vhd-to-managed-disk-cli.md
+9-12Lines changed: 9 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ description: Learn how to upload a VHD to an Azure managed disk and copy a manag
4
4
services: "virtual-machines,storage"
5
5
author: roygara
6
6
ms.author: rogarana
7
-
ms.date: 08/16/2023
7
+
ms.date: 08/25/2023
8
8
ms.topic: how-to
9
9
ms.service: azure-disk-storage
10
10
ms.custom: devx-track-azurecli
@@ -14,7 +14,7 @@ ms.custom: devx-track-azurecli
14
14
15
15
**Applies to:**:heavy_check_mark: Linux VMs :heavy_check_mark: Windows VMs :heavy_check_mark: Flexible scale sets
16
16
17
-
This article explains how to either upload a VHD from your local machine to an Azure managed disk or copy a managed disk to another region, using AzCopy. This process, direct upload, enables you to upload a VHD up to 32 TiB in size directly into a managed disk. Currently, direct upload is supported for standard HDD, standard SSD, and premium SSD managed disks. It isn't supported for ultra disks, yet.
17
+
This article explains how to either upload a VHD from your local machine to an Azure managed disk or copy a managed disk to another region, using AzCopy. This process, direct upload, enables you to upload a VHD up to 32 TiB in size directly into a managed disk. Currently, direct upload is supported for Ultra Disks, Premium SSD v2, Premium SSD, Standard SSD, and Standard HDD.
18
18
19
19
If you're providing a backup solution for IaaS VMs in Azure, you should use direct upload to restore customer backups to managed disks. When uploading a VHD from a source external to Azure, speeds depend on your local bandwidth. When uploading or copying from an Azure VM, your bandwidth would be the same as standard HDDs.
20
20
@@ -70,16 +70,21 @@ Create an empty standard HDD for uploading by specifying both the **-–for-uplo
70
70
71
71
Replace `<yourdiskname>`, `<yourresourcegroupname>`, `<yourregion>` with values of your choosing. The `--upload-size-bytes` parameter contains an example value of `34359738880`, replace it with a value appropriate for you.
72
72
73
-
> [!TIP]
73
+
> [!IMPORTANT]
74
74
> If you're creating an OS disk, add `--hyper-v-generation <yourGeneration>` to `az disk create`.
75
75
>
76
76
> If you're using Azure AD to secure disk uploads, add `-dataAccessAuthmode 'AzureActiveDirectory'`.
77
+
> When uploading to an Ultra Disk or Premium SSD v2 you need to select the correct sector size of the target disk. If you're using a VHDX file with a 4k logical sector size, the target disk must be set to 4k. If you're using a VHD file with a 512 logical sector size, the target disk must be set to 512.
78
+
>
79
+
> VHDX files with logical sector size of 512k aren't supported.
77
80
78
81
```azurecli
82
+
##For Ultra Disk or Premium SSD v2, add --logical-sector-size and specify either 512 or 4096, depending on if you're using a VHD or VHDX
83
+
79
84
az disk create -n <yourdiskname> -g <yourresourcegroupname> -l <yourregion> --os-type Linux --for-upload --upload-size-bytes 34359738880 --sku standard_lrs
80
85
```
81
86
82
-
If you would like to upload either a premium SSD or a standard SSD, replace **standard_lrs** with either **premium_LRS** or **standardssd_lrs**. Ultra disks are not supported for now.
87
+
If you would like to upload either a premium SSD or a standard SSD, replace **standard_lrs** with either **premium_LRS** or **standardssd_lrs**.
83
88
84
89
### (Optional) Grant access to the disk
85
90
@@ -129,14 +134,6 @@ Replace `<yourdiskname>`and `<yourresourcegroupname>`, then use the following co
129
134
az disk revoke-access -n <yourdiskname> -g <yourresourcegroupname>
130
135
```
131
136
132
-
Ultra disk and Premium SSD v2 disk support both 4k sector size and 512e sector size (512-byte-emulation). When importing a VHD or VHDX file from on-premises to Azure, it is important to make sure the file format is compatible to target disk's sector size. Follow guidelines below to align the sector size of target disk with your VHD or VHDX file.
133
-
134
-
- Import a VHDX file with 4k logical sector size: Sector size of the target disk should be 4k
135
-
136
-
- Import a VHD file with 512 logical sector size: Sector size of the target disk should be 512e
137
-
138
-
Note that the import of VHDX file with logical sector size of 512k is not supported.
139
-
140
137
## Copy a managed disk
141
138
142
139
Direct upload also simplifies the process of copying a managed disk. You can either copy within the same region or cross-region (to another region).
This article explains how to either upload a VHD from your local machine to an Azure managed disk or copy a managed disk to another region, using the Azure PowerShell module. The process of uploading a managed disk, also known as direct upload, enables you to upload a VHD up to 32 TiB in size directly into a managed disk. Currently, direct upload is supported for standard HDD, standard SSD, and premium SSDs. It isn't supported for ultra disks, yet.
17
+
This article explains how to either upload a VHD from your local machine to an Azure managed disk or copy a managed disk to another region, using the Azure PowerShell module. The process of uploading a managed disk, also known as direct upload, enables you to upload a VHD up to 32 TiB in size directly into a managed disk. Currently, direct upload is supported for Ultra Disks, Premium SSD v2, Premium SSD, Standard SSD, and Standard HDD.
18
18
19
19
If you're providing a backup solution for IaaS VMs in Azure, you should use direct upload to restore customer backups to managed disks. When uploading a VHD from a source external to Azure, speeds depend on your local bandwidth. When uploading or copying from an Azure VM, your bandwidth would be the same as standard HDDs.
20
20
@@ -43,7 +43,7 @@ For detailed steps on assigning a role, see [Assign Azure roles using Azure Powe
43
43
44
44
There are two ways you can upload a VHD with the Azure PowerShell module: You can either use the [Add-AzVHD](/powershell/module/az.compute/add-azvhd) command, which will automate most of the process for you, or you can perform the upload manually with AzCopy.
45
45
46
-
Generally, you should use [Add-AzVHD](#use-add-azvhd). However, if youneed to upload a VHD that is larger than 50 GiB, consider [uploading the VHD manually with AzCopy](#manual-upload). VHDs 50 GiB and larger upload faster using AzCopy.
46
+
For Premium SSDs, Standard SSDs, and Standard HDDs, you should generally use [Add-AzVHD](#use-add-azvhd). However, if you're uploading to an Ultra Disk, or a Premium SSD v2, or if you need to upload a VHD that is larger than 50 GiB, you must [upload the VHD or VHDX manually with AzCopy](#manual-upload). VHDs 50 GiB and larger upload faster using AzCopy and Add-AzVhd doesn't currently support uploading to an Ultra Disk or a Premium SSD v2.
47
47
48
48
For guidance on how to copy a managed disk from one region to another, see [Copy a managed disk](#copy-a-managed-disk).
49
49
@@ -119,20 +119,25 @@ Now, on your local shell, create an empty standard HDD for uploading by specifyi
119
119
120
120
Replace `<yourdiskname>`, `<yourresourcegroupname>`, and `<yourregion>` then run the following commands:
121
121
122
-
> [!TIP]
122
+
> [!IMPORTANT]
123
123
> If you're creating an OS disk, add `-HyperVGeneration '<yourGeneration>'` to `New-AzDiskConfig`.
124
124
>
125
125
> If you're using Azure AD to secure your uploads, add `-dataAccessAuthMode 'AzureActiveDirectory'` to `New-AzDiskConfig`.
126
+
> When uploading to an Ultra Disk or Premium SSD v2 you need to select the correct sector size of the target disk. If you're using a VHDX file with a 4k logical sector size, the target disk must be set to 4k. If you're using a VHD file with a 512 logical sector size, the target disk must be set to 512.
127
+
>
128
+
> VHDX files with logical sector size of 512k aren't supported.
If you would like to upload either a premium SSD or a standard SSD, replace **Standard_LRS** with either **Premium_LRS** or **StandardSSD_LRS**. Ultra disks aren't currently supported.
140
+
If you would like to upload either a premium SSD or a standard SSD, replace **Standard_LRS** with either **Premium_LRS** or **StandardSSD_LRS**.
Now that you have a SAS for your empty managed disk, you can use it to set your managed disk as the destination for your upload command.
152
157
153
-
Use AzCopy v10 to upload your local VHD or VHDX file to a managed disk by specifying the SAS URI you generated.
158
+
Use AzCopy v10 to upload your local VHD or VHDX file to a managed disk by specifying the SAS URI you generated.
154
159
155
160
This upload has the same throughput as the equivalent [standard HDD](../disks-types.md#standard-hdds). For example, if you have a size that equates to S4, you will have a throughput of up to 60 MiB/s. But, if you have a size that equates to S70, you will have a throughput of up to 500 MiB/s.
156
161
@@ -166,14 +171,6 @@ Replace `<yourdiskname>`and `<yourresourcegroupname>`, then run the following co
Ultra disk and Premium SSD v2 disk support both 4k sector size and 512e sector size (512-byte-emulation). When importing a VHD or VHDX file from on-premises to Azure, it is important to make sure the file format is compatible to target disk's sector size. Follow guidelines below to align the sector size of target disk with your VHD or VHDX file.
170
-
171
-
- Import a VHDX file with 4k logical sector size: Sector size of the target disk should be 4k
172
-
173
-
- Import a VHD file with 512 logical sector size: Sector size of the target disk should be 512e
174
-
175
-
Note that the import of VHDX file with logical sector size of 512k is not supported.
176
-
177
174
## Copy a managed disk
178
175
179
176
Direct upload also simplifies the process of copying a managed disk. You can either copy within the same region or copy your managed disk to another region.
0 commit comments