5.5. Uploading VHD images to Azure
This describes steps to upload an VHD image to Azure.
Prerequisites
- Your system must be set up for uploading Azure VHD images.
-
You must have an Azure VHD image created by Image Builder. Use the
vhd
output type in CLI or Azure Disk Image (.vhd) in GUI when creating the image.
Procedure
Push the image to Azure and create an instance from it:
$ VHD=25ccb8dd-3872-477f-9e3d-c2970cd4bbaf-disk.vhd $ az storage blob upload --account-name $ACCOUNT --container-name $CONTAINER --file $VHD --name $VHD --type page ...
Once the upload to the Azure BLOB completes, create an Azure image from it:
$ az image create --resource-group $GROUP --name $VHD --os-type linux --location eastus --source https://$ACCOUNT.blob.core.windows.net/$CONTAINER/$VHD - Running ...
Create an instance either with the Azure portal, or a command similar to the following:
$ az vm create --resource-group $GROUP --location eastus --name $VHD --image $VHD --admin-username azure-user --generate-ssh-keys - Running ...
-
Use your private key via SSH to access the resulting instance. Log in as
azure-user
.