# Import Flight Solo Image to Azure

Several different cloud hosting services can use the downloaded Flight Solo image. This page shall describe how to do it with Azure. This only needs to be done once, and then the imported image can be used any number of times.

  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.

  2. Get the Flight Solo image from here.

  3. If you don't already have one, create a storage account:

az storage account create --name "storageAccountName" --resource-group "resourceGroupName"
  1. Check the storage account (either on the azure portal or CLI) to see if it has any containers, if there aren't any, create one:
az storage container create --name "containerName" --account-name "storageAccountName" --resource-group "resourceGroupName"
  1. Upload the raw Flight Solo image as a storage blob to the container:
az storage blob upload --account-name "storageAccountName" \
                       --container-name "containerName" \
                       --type page \
                       --file FLIGHT-SOLO-IMAGE_azure.raw \
                       --name FLIGHT-SOLO-IMAGE_azure.vhd
  1. 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 "resourceGroupName" \
    --name FLIGHT-SOLO-IMAGE_azure \
    --os-type Linux \
    --hyper-v-generation V2 \
    --source  https://clusternameimages.blob.core.windows.net/images/FLIGHT-SOLO-IMAGE_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
  1. Set the options for source and target resource group, regions and source image.
az image copy --source-resource-group "sourceResourceGroup "
              --source-object-name "myImage" \
              --target-location "uksouth" "westeurope" \
              --target-resource-group "targetResourceGroup" \
  1. After a short wait, the source image will have the name sourceImage-region and be in the target resource group.