Skip to content

Commit 3e40fa3

Browse files
Merge pull request #17842 from v-sissondan/image-source-path
Add correct quotes for imageSourcePath variable
2 parents e839fa5 + f94c22a commit 3e40fa3

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

azure-local/manage/virtual-machine-image-storage-account.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ ms.topic: how-to
77
ms.service: azure-local
88
ms.custom:
99
- devx-track-azurecli
10-
ms.date: 03/21/2025
10+
ms.date: 05/02/2025
1111
---
1212

1313
# Create Azure Local VM image using image in Azure Storage account
@@ -61,10 +61,12 @@ $resource_group = "<Resource group>"
6161
$location = "<Location for your Azure Local>"
6262
$osType = "<OS of source image>"
6363
$imageName = "<VM image name>"
64-
$imageSourcePath = "<path to the source image in the Storage account>"
65-
64+
$imageSourcePath = '"<path to the source image in the Storage account>"'
6665
```
6766

67+
> [!NOTE]
68+
> For `$imageSourcePath`, the string must be escaped by double quotes, then enclosed by single quotes as follows: `'""'`
69+
6870
The parameters are described in the following table:
6971

7072
| Parameter | Description |
@@ -73,7 +75,7 @@ The parameters are described in the following table:
7375
| `resource_group` | Resource group for Azure Local that you associate with this image. |
7476
| `location` | Location for your Azure Local instance. For example, this could be `eastus`. |
7577
| `imageName` | Name of the VM image created starting with the image in your local share. <br> **Note**: Azure rejects all the names that contain the keyword Windows. |
76-
| `imageSourcePath`| Path to the Blob SAS URL of the image in the Storage account. For more information, see instructions on how to [Get a blob SAS URL of the image in the Storage account](/azure/applied-ai-services/form-recognizer/create-sas-tokens#use-the-azure-portal). <br> **Note**: Make sure that all the Ampersands in the path are escaped with double quotes and the entire path string is wrapped within single quotes. |
78+
| `imageSourcePath`| Path to the Blob SAS URL of the image in the Storage account. For more information, see instructions on how to [Get a blob SAS URL of the image in the Storage account](/azure/applied-ai-services/form-recognizer/create-sas-tokens#use-the-azure-portal). <br> **Note**: Make sure that all ampersands (&) in the path are escaped with double quotes and the entire path string is then enclosed within single quotes. |
7779
| `os-type` | Operating system associated with the source image. This can be Windows or Linux. |
7880

7981
Here's a sample output:
@@ -84,7 +86,7 @@ PS C:\Users\azcli> $resource_group = "mylocal-rg"
8486
PS C:\Users\azcli> $location = "eastus"
8587
PS C:\Users\azcli> $osType = "Windows"
8688
PS C:\Users\azcli> $imageName = "mylocal-storacctimage"
87-
PS C:\Users\azcli> $imageSourcePath = 'https://vmimagevhdsa1.blob.core.windows.net/vhdcontainer/Windows_InsiderPreview_ServerStandard_en-us_VHDX_25131.vhdx?sp=r"&"st=2022-08-05T18:41:41Z"&"se=2022-08-06T02:41:41Z"&"spr=https"&"sv=2021-06-08"&"sr=b"&"sig=X7A98cQm%2FmNRaHmTbs9b4OWVv%2F9Q%2FJkWDBHVPyAc8jo%3D'
89+
PS C:\Users\azcli> $imageSourcePath = '"https://vmimagevhdsa1.blob.core.windows.net/vhdcontainer/Windows_InsiderPreview_ServerStandard_en-us_VHDX_25131.vhdx?sp=r"&"st=2022-08-05T18:41:41Z"&"se=2022-08-06T02:41:41Z"&"spr=https"&"sv=2021-06-08"&"sr=b"&"sig=X7A98cQm%2FmNRaHmTbs9b4OWVv%2F9Q%2FJkWDBHVPyAc8jo%3D"'
8890
```
8991

9092
### Create VM image from image in Azure Storage account

0 commit comments

Comments
 (0)