Chapter 1. Pushing VHD images to Microsoft Azure cloud using the GUI image builder tool
You can create
.vhd images using image builder. Then, you can push the
.vhd images to a Blob Storage of the Microsoft Azure Cloud service provider.
- You have root access to the system.
- You have opened the image builder interface of the RHEL web console in a browser.
- You created a blueprint. See Creating an image builder blueprint in the web console interface.
- You have a Microsoft Storage Account created.
- You have a writable Blob Storage prepared.
blueprint name, click the Images tab .
Click Create Image to create your customized image.
A pop-up window opens.
From the "Type drop-down menu list, select the
Azure Disk Image (.vhd)image.
- Check the Upload to Microsoft Azure check box to upload your image to the Microsoft Azure Cloud and click Next.
To authenticate your access to Microsoft Azure, type your "Storage account" and "Storage access key" in the corresponding fields. Click Next.
You can find your Microsoft Storage account details in the Settings→Access Key menu list.
- Type a "Image name" to be used for the image file that will be uploaded and the Blob "Storage container" in which the image file you want to push the image into. Click Next.
Review the information you provided and click Finish.
Optionally, you can click Back to modify any incorrect detail.
- From the "Type drop-down menu list, select the
When the image creation process starts, a small pop-up on the upper right side displays with the message:
Image creation has been added to the queue.
After the image process creation is complete, click the blueprint you created the image from. In the
Imagestab, you can see the Image build complete status for the image you created.
- To access the image you pushed into Microsoft Azure Cloud, access the Microsoft Azure portal.
- On the search bar, type Images and select the first entry under Services. You are redirected to the Image dashboard.
Click +Add. You are redirected to the Create an Image dashboard.
Insert the below details:
- Name: Choose a name for your new image.
- Resource Group: Select a resource group.
- Location: Select the location that matches the regions assigned to your storage account. Otherwise you will not be able to select a blob.
OS Type: Set the operating system type to Linux.
- VM Generation: Keep the VM generation set on Gen 1.
Storage Blob: Click Browse on the right of Storage blob input. Use the dialog to find the image you uploaded earlier.
Keep the remaining fields as in the default choice.
- Click Create to create the image. After the image is created, you can see the message Successfully created image in the upper right corner.
- Click Refresh to see your newly created image and open it.
- Click + Create VM. You are redirected to the Create a virtual machine dashboard.
Project Details, your
Resource Groupare already pre-set.
If you want to create a new
Click Create new.
A pop-up prompts you to create the Resource Group Name container.
Insert a name and click OK.
If you want to keep the already pre-set Resource Group:
Under Instance Details, enter:
- Virtual machine name
- Image: The image you created is pre-selected by default.
Size: Choose a VM size that better suits your needs.
Keep the remaining fields default.
Under Administrator account, enter the below details:
- Username: the name of the account administrator.
SSH public key source: from the drop-down menu, select Generate new key pair.
You can either use the key pair you already have or you can create a new key pair. Alternatively, you can use
image builderto add a user to the image with a preset public key. See Creating a user account with SSH key for more details.
- Key pair name: insert a name for the key pair.
Under Inbound port rules, select values for each of the fields:
- Public inbound ports: Allow selected ports.
- Select inbound ports: Use the default set SSH (22).
- Click Review + Create. You are redirected to the Review + create tab and receive a confirmation that the validation passed.
Review the details and click Create.
Optionally, you can click Previous to fix previous options selected.
A generates new key pair window opens. Click Download private key and create resources.
Save the key file as "yourKey.pem".
- After the deployment is complete, click Go to resource.
- You are redirected to a new window with your VM details. Select the public IP address on the upper right side of the page and copy it to your clipboard.
Now, to create an SSH connection with the VM to connect to the Virtual Machine.
- Open a terminal.
At your prompt, open an SSH connection to your VM. Replace the IP address with the one from your VM, and replace the path to the .pem with the path to where the key file was downloaded.
# ssh -i ./Downloads/yourKey.pem firstname.lastname@example.org
You are required to confirm if you want to continue to connect. Type
As a result, the output image you pushed to the Microsoft Azure Storage Blob is ready to be provisioned.