Skip to content

Commit 7d38b91

Browse files
author
Jill Grant
authored
Merge pull request #281022 from roygara/sasBk
Staging draft.
2 parents 6520d85 + 216b032 commit 7d38b91

File tree

5 files changed

+40
-14
lines changed

5 files changed

+40
-14
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
title: include file
3+
description: include file
4+
author: roygara
5+
ms.service: azure-disk-storage
6+
ms.topic: include
7+
ms.date: 08/15/2024
8+
ms.author: rogarana
9+
ms.custom: include file
10+
---
11+
> [!IMPORTANT]
12+
> On February 15th, 2025, the Shared Access Signature (SAS) access time for disks and snapshots will be limited to a maximum of 60 days. Trying to generate a SAS with an expiration longer than 60 days results in an error. Any existing disk or snapshot SAS created with an expiration longer than 60 days may stop working 60 days after the date of creation and will result in a 403 error during authorization.
13+
14+
If a managed disk or snapshot SAS's expiration is longer than 60 days, revoke its access, and generate a new SAS that requests access for 60 days (5,184,000 seconds) or less. Improve your overall security by using SAS with shorter expiration dates. Make these changes before February 15, 2025 to prevent service interruption. The following links can be used to find, revoke, and request a new SAS.
15+
16+
- To check if a disk has an active SAS, you can either use the [REST API](/rest/api/compute/disks/get?view=rest-compute-2024-03-01&tabs=HTTP#diskstate), the [Azure CLI](/cli/azure/disk?view=azure-cli-latest#az-disk-show), or the [Azure PowerShell module](/powershell/module/az.compute/get-azdisk?view=azps-12.0.0), and examine the **DiskState** property.
17+
- To revoke a SAS, you can use either the [REST API](/rest/api/compute/disks/revoke-access?view=rest-compute-2024-03-01&tabs=HTTP), the [Azure CLI](/cli/azure/disk?view=azure-cli-latest#az-disk-revoke-access), or the [Azure PowerShell module](/powershell/module/az.compute/revoke-azdiskaccess?view=azps-12.0.0).
18+
- To create a SAS, you can use either the [REST API](/rest/api/compute/disks/grant-access?view=rest-compute-2024-03-01&tabs=HTTP), the [Azure CLI](/cli/azure/disk?view=azure-cli-latest), or the [Azure PowerShell module](/powershell/module/az.compute/grant-azdiskaccess?view=azps-12.2.0&viewFallbackFrom=azps-12.0.0), and set the access duration to 5,184,000 seconds or less.

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

Lines changed: 12 additions & 10 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: 10/17/2023
7+
ms.date: 08/15/2024
88
ms.topic: how-to
99
ms.service: azure-disk-storage
1010
ms.custom: devx-track-azurecli, linux-related-content
@@ -54,7 +54,7 @@ If you'd prefer to upload disks through a GUI, you can do so using Azure Storage
5454
- If you intend to upload a VHD from on-premises: A fixed size VHD that [has been prepared for Azure](../windows/prepare-for-upload-vhd-image.md), stored locally.
5555
- Or, a managed disk in Azure, if you intend to perform a copy action.
5656

57-
To upload your VHD to Azure, you'll need to create an empty managed disk that is configured for this upload process. Before you create one, there's some additional information you should know about these disks.
57+
To upload your VHD to Azure, you need to create an empty managed disk that is configured for this upload process. Before you create one, there's some additional information you should know about these disks.
5858

5959
This kind of managed disk has two unique states:
6060

@@ -66,7 +66,7 @@ This kind of managed disk has two unique states:
6666
6767
## Create an empty managed disk
6868

69-
Before you can create an empty standard HDD for uploading, you'll need the file size of the VHD you want to upload, in bytes. To get that, you can use either `wc -c <yourFileName>.vhd` or `ls -al <yourFileName>.vhd`. This value is used when specifying the **--upload-size-bytes** parameter.
69+
Before you can create an empty standard HDD for uploading, you need the file size of the VHD you want to upload, in bytes. To get that, you can use either `wc -c <yourFileName>.vhd` or `ls -al <yourFileName>.vhd`. This value is used when specifying the **--upload-size-bytes** parameter.
7070

7171
Create an empty standard HDD for uploading by specifying both the **-–for-upload** parameter and the **--upload-size-bytes** parameter in a [disk create](/cli/azure/disk#az-disk-create) cmdlet:
7272

@@ -90,7 +90,7 @@ If you would like to upload a different disk type, replace **standard_lrs** with
9090

9191
### (Optional) Grant access to the disk
9292

93-
If you're using Microsoft Entra ID to secure uploads, you'll need to [assign RBAC permissions](../../role-based-access-control/role-assignments-cli.md) to grant access to the disk and generate a writeable SAS.
93+
If you're using Microsoft Entra ID to secure uploads, you need to [assign RBAC permissions](../../role-based-access-control/role-assignments-cli.md) to grant access to the disk and generate a writeable SAS.
9494

9595
```azurecli
9696
az role assignment create --assignee "{assignee}" \
@@ -100,9 +100,11 @@ az role assignment create --assignee "{assignee}" \
100100

101101
### Generate writeable SAS
102102

103-
Now that you've created an empty managed disk that is configured for the upload process, you can upload a VHD to it. To upload a VHD to the disk, you'll need a writeable SAS, so that you can reference it as the destination for your upload.
103+
Now that you've created an empty managed disk that is configured for the upload process, you can upload a VHD to it. To upload a VHD to the disk, you need a writeable SAS, so that you can reference it as the destination for your upload.
104104

105-
To generate a writable SAS of your empty managed disk, replace `<yourdiskname>`and `<yourresourcegroupname>`, then use the following command:
105+
[!INCLUDE [disks-sas-change](../includes/disks-sas-change.md)]
106+
107+
To generate a writable SAS of your empty managed disk, replace `<yourdiskname>` and `<yourresourcegroupname>`, then use the following command:
106108

107109
```azurecli
108110
az disk grant-access -n <yourdiskname> -g <yourresourcegroupname> --access-level Write --duration-in-seconds 86400
@@ -122,13 +124,13 @@ Now that you have a SAS for your empty managed disk, you can use it to set your
122124

123125
Use AzCopy v10 to upload your local VHD or VHDX file to a managed disk by specifying the SAS URI you generated.
124126

125-
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.
127+
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'll have a throughput of up to 60 MiB/s. But, if you have a size that equates to S70, you'll have a throughput of up to 500 MiB/s.
126128

127129
```bash
128130
AzCopy.exe copy "c:\somewhere\mydisk.vhd""sas-URI" --blob-type PageBlob
129131
```
130132

131-
After the upload is complete, and you no longer need to write any more data to the disk, revoke the SAS. Revoking the SAS will change the state of the managed disk and allow you to attach the disk to a VM.
133+
After the upload is complete, and you no longer need to write any more data to the disk, revoke the SAS. Revoking the SAS changes the state of the managed disk and allow you to attach the disk to a VM.
132134

133135
Replace `<yourdiskname>`and `<yourresourcegroupname>`, then use the following command to make the disk usable:
134136

@@ -140,7 +142,7 @@ az disk revoke-access -n <yourdiskname> -g <yourresourcegroupname>
140142

141143
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).
142144

143-
The following script will do this for you, the process is similar to the steps described earlier, with some differences since you're working with an existing disk.
145+
The following script does this for you. The process is similar to the steps described earlier, with some differences since you're working with an existing disk.
144146

145147
> [!IMPORTANT]
146148
> You need to add an offset of 512 when you're providing the disk size in bytes of a managed disk from Azure. This is because Azure omits the footer when returning the disk size. The copy will fail if you don't do this. The following script already does this for you.
@@ -178,4 +180,4 @@ az disk revoke-access -n $targetDiskName -g $targetRG
178180

179181
Now that you've successfully uploaded a VHD to a managed disk, you can attach the disk as a [data disk to an existing VM](add-disk.md) or [attach the disk to a VM as an OS disk](upload-vhd.md#create-the-vm), to create a new VM.
180182

181-
If you've additional questions, see the [uploading a managed disk](../faq-for-disks.yml#uploading-to-a-managed-disk) section in the FAQ.
183+
If you've more questions, see the [uploading a managed disk](../faq-for-disks.yml#uploading-to-a-managed-disk) section in the FAQ.

articles/virtual-machines/linux/download-vhd.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ ms.service: azure-disk-storage
77
ms.custom: devx-track-azurecli, linux-related-content
88
ms.collection: linux
99
ms.topic: how-to
10-
ms.date: 10/17/2023
10+
ms.date: 07/16/2024
1111
---
1212

1313
# Download a Linux VHD from Azure
@@ -57,6 +57,8 @@ Your snapshot will be created shortly, and can then be used to download or creat
5757

5858
To download the VHD file, you need to generate a [shared access signature (SAS)](../../storage/common/storage-sas-overview.md?toc=/azure/virtual-machines/windows/toc.json) URL. When the URL is generated, an expiration time is assigned to the URL.
5959

60+
[!INCLUDE [disks-sas-change](../includes/disks-sas-change.md)]
61+
6062
# [Portal](#tab/azure-portal)
6163

6264
1. On the menu of the page for the VM, select **Disks**.

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

Lines changed: 4 additions & 2 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: 10/17/2023
6+
ms.date: 08/15/2024
77
ms.topic: how-to
88
ms.service: azure-disk-storage
99
ms.tgt_pltfrm: linux
@@ -145,7 +145,9 @@ If you would like to upload a different disk type, replace **Standard_LRS** with
145145

146146
Now that you've created an empty managed disk that is configured for the upload process, you can upload a VHD to it. To upload a VHD to the disk, you'll need a writeable SAS, so that you can reference it as the destination for your upload.
147147

148-
To generate a writable SAS of your empty managed disk, replace `<yourdiskname>`and `<yourresourcegroupname>`, then use the following commands:
148+
[!INCLUDE [disks-sas-change](../includes/disks-sas-change.md)]
149+
150+
To generate a writable SAS of your empty managed disk, replace `<yourdiskname>` and `<yourresourcegroupname>`, then use the following commands:
149151

150152
```powershell
151153
$diskSas = Grant-AzDiskAccess -ResourceGroupName '<yourresourcegroupname>' -DiskName '<yourdiskname>' -DurationInSecond 86400 -Access 'Write'

articles/virtual-machines/windows/download-vhd.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ author: roygara
55
ms.author: rogarana
66
ms.service: azure-disk-storage
77
ms.topic: how-to
8-
ms.date: 10/17/2023
8+
ms.date: 08/15/2024
99
---
1010

1111
# Download a Windows VHD from Azure
@@ -66,6 +66,8 @@ Your snapshot will be created shortly, and can then be used to download or creat
6666

6767
To download the VHD file, you need to generate a [shared access signature (SAS)](../../storage/common/storage-sas-overview.md?toc=/azure/virtual-machines/windows/toc.json) URL. When the URL is generated, an expiration time is assigned to the URL.
6868

69+
[!INCLUDE [disks-sas-change](../includes/disks-sas-change.md)]
70+
6971
# [Portal](#tab/azure-portal)
7072

7173
1. On the page for the VM, click **Disks** in the left menu.

0 commit comments

Comments
 (0)