Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


Panel

In this section:

Table of Contents


Spacevars
0company
provides a Share Access Signature (SAS) URL with Read permission to share the 
Spacevars
0product
image between regions in Azure. This section describes how to access and use the 
Spacevars
0product
images
.

Info
titleNote

Before you use the commands below, refer to Install Azure CLI. on Instantiate Standalone SBC on Azure.

Create a Storage Blob from the SAS URL

To create a storage blob from the SA URL:

  1. Create a storage account.
    Syntax

    Code Block
    az storage account create --name <account name> 
                              --resource-group <resource group name> 
                              --kind storageV2


    Example

    Code Block
    az storage account create --name ribbonsharedimages --resource-group resource-group-name --kind storageV2


  2. Create a container to store the blob.
    Syntax

    Code Block
    az storage container create --name <container name> 
                                --account-name <account name> 
                                --public-access off


    Example

    Code Block
    az storage container create --name ribbon-sbc-container --account-name ribbonsharedimages --public-access off


  3. Start creating the blob.
    Syntax

    Code Block
    az storage blob copy start --destination-blob <blob name> 
                               --destination-container <container name> 
                               --account-name <account name> 
                               --source-uri "<SAS URL>"


    Info
    titleNote

    Enclose SAS URL within double quotation marks "".


    Example

    Code Block
    az storage blob copy start --destination-blob "rbbn-sbc-v09.01.00.vhd" --destination-container "ribbon-sbc-container" --account-name "ribbonsharedimages" --source-uri "https://rbbncustomerimagestorage.blob.core.windows.net/swe-initial-image-share/example-sbc.vhd?sp=r&st=2020-09-15T08:08:34Z&se=2020-09-15T16:08:34Z&spr=https&sv=2019-12-12&sr=b&sig=CdK%2FYi3sWlU2ydLdMxrijrv%2FraQ1aGaOWf7FGk%3D"


  4. Check the status of blob creation.

    Info

    This takes time due to the size of the file. Wait for the status to indicate "success" before you continue.


    Syntax

    Code Block
    az storage blob show --name <blob name>
                         --container-name <container name>
                         --account-name <account name>
                         --query [properties.copy] -o table


    Example

    Code Block
    az storage blob show --name "rbbn-sbc-v09.01.00.vhd" --container-name "ribbon-sbc-container" --account-name "ribbonsharedimages" --query [properties.copy] -o table


Create a Snapshot from the Storage Blob

To create a snapshot from the storage blob:

Info
titleNote
  • Use the full "Storage Id" that is extracted from the Storage Account created.
  • The "source-storage-account-id" is not mandatory. Only use the option if required.


Syntax

Code Block
az snapshot create --name <snapshot name>
                   --resource-group <resource group name>
                   --source <blob URL>
                   [--source-storage-account-id <full storage id> ]


Example

Code Block
az snapshot create --name rbbn-sbc-v09.01.00.snap
                   --resource-group example-resource-group
                   --source "https://ribbonsharedimages.blob.core.windows.net/ribbon-sbc-container/rbbn-sbc-v09.01.00.vhd"
                   --source-storage-account-id /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/RBBN-SBC-RG/providers/Microsoft.Storage/storageAccounts/rbbnsbcstore


Info
titleNote

Ensure that the blob URL follows the format, where the URL can be extracted from the .vhd of the blob created:

https://<account_name>.blob.core.windows.net/<container_name>/<blob_name>name>

Create an Image from the Storage Blob

To create an image from the storage blob:

Syntax

Code Block
az image create --name <image name>
                --resource-group <resource group name>
                --os-type Linux
                --source <blob URL>


Example

Code Block
az image create --name rbbn-sbc-v09.01.00.img --resource-group example-resource-group --os-type Linux --source "https://ribbonsharedimages.blob.core.windows.net/ribbon-sbc-container/rbbn-sbc-v09.01.00.vhd"


Info
titleNote

Ensure that the blob URL follows the format, where the URL can be extracted from the .vhd of the blob created:

https://<account_name>.blob.core.windows.net/<container_name>/<blob_name>name>

Copy Images between Regions

To copy images between regions:

  1. Install the Azure image copy extension.

    Code Block
    az extension add --name image-copy-extension


  2. Copy image from one region to another.
    Syntax

    Code Block
    az image copy --source-resource-group <resource-group>
                  --source-object-name <image name>
                  --target-location <space separated list of regions>
                  --target-resource-group <target resource group>
                  --cleanup


    Example

    Code Block
    az image copy --source-resource-group mySources-rg --source-object-name myImage --target-location uksouth northeurope --target-resource-group "images-repo-rg" --cleanup


    Info
    titleNote

    Ensure that the target location is a single word and in lowercase version. For example: "eastus", and not East US.