Skip to content

Commit 3958da1

Browse files
Merge pull request #248770 from roygara/vhdx
VHDX changes
2 parents 0b1062d + 87b253d commit 3958da1

File tree

2 files changed

+20
-26
lines changed

2 files changed

+20
-26
lines changed

articles/virtual-machines/linux/disks-upload-vhd-to-managed-disk-cli.md

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: Learn how to upload a VHD to an Azure managed disk and copy a manag
44
services: "virtual-machines,storage"
55
author: roygara
66
ms.author: rogarana
7-
ms.date: 08/16/2023
7+
ms.date: 08/25/2023
88
ms.topic: how-to
99
ms.service: azure-disk-storage
1010
ms.custom: devx-track-azurecli
@@ -14,7 +14,7 @@ ms.custom: devx-track-azurecli
1414

1515
**Applies to:** :heavy_check_mark: Linux VMs :heavy_check_mark: Windows VMs :heavy_check_mark: Flexible scale sets
1616

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.
1818

1919
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.
2020

@@ -70,16 +70,21 @@ Create an empty standard HDD for uploading by specifying both the **-–for-uplo
7070

7171
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.
7272

73-
> [!TIP]
73+
> [!IMPORTANT]
7474
> If you're creating an OS disk, add `--hyper-v-generation <yourGeneration>` to `az disk create`.
7575
>
7676
> 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.
7780
7881
```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+
7984
az disk create -n <yourdiskname> -g <yourresourcegroupname> -l <yourregion> --os-type Linux --for-upload --upload-size-bytes 34359738880 --sku standard_lrs
8085
```
8186

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**.
8388

8489
### (Optional) Grant access to the disk
8590

@@ -129,14 +134,6 @@ Replace `<yourdiskname>`and `<yourresourcegroupname>`, then use the following co
129134
az disk revoke-access -n <yourdiskname> -g <yourresourcegroupname>
130135
```
131136

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-
140137
## Copy a managed disk
141138

142139
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).

articles/virtual-machines/windows/disks-upload-vhd-to-managed-disk-powershell.md

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Upload a VHD to Azure or copy a disk across regions - Azure PowerShell
33
description: Learn how to upload a VHD to an Azure managed disk and copy a managed disk across regions, using Azure PowerShell, via direct upload.
44
author: roygara
55
ms.author: rogarana
6-
ms.date: 03/31/2023
6+
ms.date: 08/25/2023
77
ms.topic: how-to
88
ms.service: azure-disk-storage
99
ms.tgt_pltfrm: linux
@@ -14,7 +14,7 @@ ms.custom: references_regions, devx-track-azurepowershell
1414

1515
**Applies to:** :heavy_check_mark: Windows VMs
1616

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 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.
1818

1919
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.
2020

@@ -43,7 +43,7 @@ For detailed steps on assigning a role, see [Assign Azure roles using Azure Powe
4343

4444
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.
4545

46-
Generally, you should use [Add-AzVHD](#use-add-azvhd). However, if you need 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.
4747

4848
For guidance on how to copy a managed disk from one region to another, see [Copy a managed disk](#copy-a-managed-disk).
4949

@@ -119,20 +119,25 @@ Now, on your local shell, create an empty standard HDD for uploading by specifyi
119119

120120
Replace `<yourdiskname>`, `<yourresourcegroupname>`, and `<yourregion>` then run the following commands:
121121

122-
> [!TIP]
122+
> [!IMPORTANT]
123123
> If you're creating an OS disk, add `-HyperVGeneration '<yourGeneration>'` to `New-AzDiskConfig`.
124124
>
125125
> 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.
126129
127130
```powershell
128131
$vhdSizeBytes = (Get-Item "<fullFilePathHere>").length
129132
133+
## For Ultra Disks or Premium SSD v2, add -LogicalSectorSize and specify either 4096 or 512, depending on if you're using a VHDX or a VHD
134+
130135
$diskconfig = New-AzDiskConfig -SkuName 'Standard_LRS' -OsType 'Windows' -UploadSizeInBytes $vhdSizeBytes -Location '<yourregion>' -CreateOption 'Upload'
131136
132137
New-AzDisk -ResourceGroupName '<yourresourcegroupname>' -DiskName '<yourdiskname>' -Disk $diskconfig
133138
```
134139

135-
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**.
136141

137142
### Generate writeable SAS
138143

@@ -150,7 +155,7 @@ $disk = Get-AzDisk -ResourceGroupName '<yourresourcegroupname>' -DiskName '<your
150155

151156
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.
152157

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.
154159

155160
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.
156161

@@ -166,14 +171,6 @@ Replace `<yourdiskname>`and `<yourresourcegroupname>`, then run the following co
166171
Revoke-AzDiskAccess -ResourceGroupName '<yourresourcegroupname>' -DiskName '<yourdiskname>'
167172
```
168173

169-
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-
177174
## Copy a managed disk
178175

179176
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

Comments
 (0)