2.2. Manually uploading VHD images to Microsoft Azure cloud


After you have created your customized VHD image, you can manually upload it to the Microsoft Azure cloud. When you create a .vhd image by using the CLI, RHEL image builder writes temporary files to the /var subdirectory.

To prevent the .vhd image creation from failing, increase the /var subdirectory capacity to at least 15 to 20 GB of free space to ensure availability.

Prerequisites

  • Your system must be set up for uploading Microsoft Azure VHD images.
  • You must have a Microsoft Azure VHD image created by RHEL image builder.

    • In the GUI, use the Azure Disk Image (.vhd) image type.
    • In the CLI, use the vhd output type.

Procedure

  1. Build the image:

    $ image-builder build <image-type>
  2. Push the image to Microsoft Azure and create an instance from it:

    $ az storage blob upload --account-name account_name --container-name container_name --file image_disk.vhd --name image-disk.vhd --type page
  3. After the upload to the Microsoft Azure Blob storage completes, create a Microsoft Azure image from it. Because the images that you create with RHEL image builder generate hybrid images that support both the V1 = BIOS and V2 = UEFI instance types, you can specify the --hyper-v-generation argument. The default instance type is V1.

    $ az image create --resource-group resource_group_name --name image-disk.vhd --os-type linux --location location \
    --source https://$account_name.blob.core.windows.net/container_name/image-disk.vhd
    - Running

Verification

  1. Create an instance either with the Microsoft Azure portal, or a command similar to the following:

    $ az vm create --resource-group resource_group_name --location location --name vm_name --image image-disk.vhd(--admin-username azure-user --generate-ssh-keys*
    - Running
  2. Use your private key by using SSH to access the resulting instance. Log in as azure-user. This username was set on the previous step.
Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。 了解我们当前的更新.

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

Theme

© 2026 Red Hat
返回顶部