Importing Flight Solo Image to Azure
Prepare Azure Account
- 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
Create a resource group for the storage account
az resource group create MY_RESOURCE_GROUP_NAME
Create a storage account
az storage account create --name "MY_STORAGE_ACCOUNT_NAME" --resource-group "MY_RESOURCE_GROUP_NAME"
Create a storage container
az storage container create --name "MY_CONTAINER_NAME" --account-name "MY_STORAGE_ACCOUNT_NAME" --resource-group "MY_RESOURCE_GROUP_NAME"
- Download the Flight Solo Azure image here
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
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
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:
Install the Azure CLI image copy extension.
az extension add --name image-copy-extension
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
After a short wait, the source image will have the name
SOURCE_OBJECT_NAME-regionand be in the target resource group