Skip to content

Importing Flight Solo Image to Azure

Prepare Azure Account

Prerequisites

  1. Start by installing the Azure Command Line Interface(CLI), as using it is the simplest way to import a raw image. Alternatively you can follow these instructions using the Azure Cloud Shell.

Create Storage Account

  1. Create a resource group for the storage account

    az resource group create MY_RESOURCE_GROUP_NAME
    

  2. Create a storage account

    az storage account create --name "MY_STORAGE_ACCOUNT_NAME" --resource-group "MY_RESOURCE_GROUP_NAME"
    

  3. Create a storage container

    az storage container create --name "MY_CONTAINER_NAME" --account-name "MY_STORAGE_ACCOUNT_NAME" --resource-group "MY_RESOURCE_GROUP_NAME"
    

Import Image

  1. Download the Flight Solo Azure image here
  2. Upload the raw Flight Solo image as a storage blob to the container

    az storage blob upload --account-name "MY_STORAGE_ACCOUNT_NAME" \
                           --container-name "MY_CONTAINER_NAME" \
                           --type page \
                           --file Flight_Solo_VERSION_azure.raw \
                           --name Flight-Solo_VERSION_azure.vhd
    

  3. Finally, create an Azure image from the storage blob (Make sure to get the correct source from the uploaded storage blob)

    az image create --resource-group "MY_RESOURCE_GROUP_NAME" \
        --name Flight_Solo_VERSION_azure \
        --os-type Linux \
        --hyper-v-generation V2 \
        --source  https://MY_STORAGE_ACCOUNT_NAME.blob.core.windows.net/MY_CONTAINER_NAME/Flight_Solo_VERSION_azure.vhd
    

Changing regions

The storage blob will be placed in the region of the storage account and container it is created in, and an image made from it must go into a resource group with the same region.

In case this region is the wrong one, it can be changed after the image is created:

  1. Install the Azure CLI image copy extension.

    az extension add --name image-copy-extension
    

  2. Set the options for source and target resource group, regions and source image.

    az image copy --source-resource-group "MY_RESOURCE_GROUP_NAME"
                  --source-object-name "Flight_Solo_VERSION_azure" \
                  --target-location "uksouth" "westeurope" \
                  --target-resource-group "MY_RESOURCE_GROUP_NAME" \
                  --cleanup
    

  3. After a short wait, the source image will have the name SOURCE_OBJECT_NAME-region and be in the target resource group