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/includes/disks-sas-change.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,4 +15,4 @@ Review all your calls that generate a managed disk or snapshot SAS to ensure tha
15
15
16
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
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 5184000 seconds or less.
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.
@@ -54,7 +54,7 @@ If you'd prefer to upload disks through a GUI, you can do so using Azure Storage
54
54
- 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.
55
55
- Or, a managed disk in Azure, if you intend to perform a copy action.
56
56
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.
58
58
59
59
This kind of managed disk has two unique states:
60
60
@@ -66,7 +66,7 @@ This kind of managed disk has two unique states:
66
66
67
67
## Create an empty managed disk
68
68
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.
70
70
71
71
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:
72
72
@@ -90,7 +90,7 @@ If you would like to upload a different disk type, replace **standard_lrs** with
90
90
91
91
### (Optional) Grant access to the disk
92
92
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.
94
94
95
95
```azurecli
96
96
az role assignment create --assignee "{assignee}" \
@@ -100,7 +100,7 @@ az role assignment create --assignee "{assignee}" \
100
100
101
101
### Generate writeable SAS
102
102
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.
@@ -124,13 +124,13 @@ Now that you have a SAS for your empty managed disk, you can use it to set your
124
124
125
125
Use AzCopy v10 to upload your local VHD or VHDX file to a managed disk by specifying the SAS URI you generated.
126
126
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 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.
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.
134
134
135
135
Replace `<yourdiskname>`and `<yourresourcegroupname>`, then use the following command to make the disk usable:
136
136
@@ -142,7 +142,7 @@ az disk revoke-access -n <yourdiskname> -g <yourresourcegroupname>
142
142
143
143
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).
144
144
145
-
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.
146
146
147
147
> [!IMPORTANT]
148
148
> 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.
@@ -180,4 +180,4 @@ az disk revoke-access -n $targetDiskName -g $targetRG
180
180
181
181
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.
182
182
183
-
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.
0 commit comments