Buscar

Este contenido no está disponible en el idioma seleccionado.

Chapter 7. Creating RHEL system image and uploading to Microsoft Azure by using Insights image builder

download PDF

You can create customized RHEL system images by using Insights image builder, and upload those images to the Microsoft Azure cloud target environment. Then, you can create a Virtual Machine (VM) from the image you shared with the Microsoft Azure Cloud account.

Warning

Red Hat Hybrid Cloud Console does not support uploading the images that you created for the Microsoft Azure target environment to GovCloud regions.

7.1. Authorizing Insights image builder to push images to Microsoft Azure Cloud

To authorize Insights image builder to push images to the Microsoft Azure cloud, you must:

  • Configure Insights image builder as an authorized application for your tenant GUID
  • Give it the role of Contributor to at least one resource group.

    To authorize Insights image builder as an authorized application, follow the steps:

Prerequisites

  • You have an existing Resource Group in Microsoft Azure portal.
  • You have the User Access Administrator role rights.
  • Your Microsoft Azure subscription has Microsoft.Storage and Microsoft.Compute as a resource provider.

Procedure

  1. Access Insights image builder on a browser.

    The Insights image builder dashboard appears.

  2. Click Create image.

    The Create image dialog wizard opens.

  3. On the Image output page, complete the following steps:

    1. From the Release list, select the Release that you want to use: for example, choose Red Hat Enterprise Linux (RHEL).
    2. From the Select target environments option, select Microsoft Azure.

      Click Next.

  4. On the Target Environment - Microsoft Azure window, to add Insights image builder as an authorized application, complete the following steps:

    1. Insert your Tenant GUID.

      Image builder checks if your Tenant GUID is correctly formatted and the Authorize image builder button becomes available.

    2. Click Authorize image builder to authorize Insights image builder to push images to the Microsoft Azure cloud.

      This redirects you to the Microsoft Azure portal.

      1. Login with your credentials.
      2. Click Accept the Permission requested.
    3. Confirm that Insights image builder is authorized for your tenant.

      1. Search for Azure Active Directory and choose Enterprise applications, from the left menu.
      2. Search for Insights image builder and confirm it is authorized.
    4. Add the Enterprise application as a contributor to your Resource Group.

      1. In the search bar, type Resource Groups and select the first entry under Services. This redirects you to the Resource Groups dashboard.
      2. Select your Resource Group.
      3. On the left menu, click Access control (IAM) to add a permission so the Insights image builder application can access your resource group.
      4. From the menu, click the tab Role assignments.
      5. Click +Add.
      6. From the dropdown menu, choose Add role assignment. A menu appears on the left side.
      7. Insert the following details:

        1. Role: Assign the Contributor role
        2. Assign access to: User, group, service principal. Add members: Click +Select members and type Red Hat in the search bar. Press enter.
        3. Select: Insights image builder application

The Insights image builder application is now authorized to push images to Microsoft Azure cloud.

Note

Even though any user can add an application to the resources group, the application is not able to locate any resource unless the account administrator adds the shared application as a contributor under the IAM section of the resource group. .

Verification

  • From the menu, click the tab Role assignments.

    You can see Insights image builder set as a Contributor of the Resource Group you selected.

7.2. Creating a customized RHEL system image for Microsoft Azure using image builder

After you authorize image builder to push images to Microsoft Azure, create customized system images using image builder and upload those images to Microsoft Azure. For that, follow the steps:

Prerequisites

Procedure

  1. On the Target Environment - Microsoft Azure window, complete the following steps:

    1. Enter your Tenant GUID: you can find your Tenant ID in the Microsoft Azure Active Directory application in Microsoft Azure portal.
    2. Enter your Subscription ID: you can find your Subscription ID account by accessing the Microsoft Azure console.
    3. Enter your Resource group: is the name of your Resource Group in Microsoft Azure portal.

      Click Next.

  2. On the Registration page, select the type of registration that you want to use. You can select from these options:

  3. Click Next.
  4. Optional: On the Packages page, add packages to your image. See Adding packages during image creation by using Insights image builder.
  5. On the Name image page, enter a name for your image and click Next. If you do not enter a name, you can find the image you created by its UUID.
  6. On the Review page, review the details about the image creation and click Create image.

    After you complete the steps in the Create image wizard, the image builder dashboard is displayed.

    Insights image builder starts the compose of a RHEL Azure Disk Image image for the x86_64 architecture, uploads it to the resource group account you specified, and creates a Microsoft Azure Image.

    The Insights image builder Images dashboard opens. You can see details such as the Image UUID, the cloud target environment, the image OS release and the status of the image creation. After the status is Ready, the Azure Disk Image is shared with the specified account.

    On the dashboard, you can see details such as the Image UUID, the cloud target environment, the image OS release and the status of the image creation.

    Possible statuses:

    • Pending: the image upload and cloud registration is being processed.
    • In Progress: the image upload and cloud registration is ongoing.
    • Ready: the image upload and cloud registration is completed
    • Failed: the image upload and cloud registration failed.

      Note

      The image build, upload and cloud registration processes can take up to ten minutes to complete.

Verification

  • Check if the image status is Ready. It means that the image upload and cloud registration completed successfully.

7.3. Accessing your customized RHEL system image from your Microsoft Azure account

After finishing to build and upload the image, and the cloud registration process status is marked as Ready, you can access the Azure Disk Image from your Microsoft Azure account.

Prerequisites

Procedure

  • Access your Microsoft Azure dashboard and navigate to the Resource group page.

Verification

  1. After you access your Microsoft Azure Account, you can see that the image successfully shared with the resource group account you specified.

    Note

    If the image is not visible there, you might have issues with the upload process. Return to the Insights image builder dashboard and check if the image is marked as Ready.

7.4. Creating a VM from the RHEL system image shared with your Microsoft Azure account

You can create a Virtual Machine (VM) from the image you shared with the Microsoft Azure Cloud account by using Insights image builder.

Prerequisites

Procedure

  1. Click + Create VM. You are redirected to the Create a virtual machine dashboard.
  2. In the Basic tab under Project Details, your Subscription and the Resource Group are pre-set.

    Optional: If you want to create a new resource Group:

    1. Click Create new.

      A pop-up prompts you to create the Resource Group Name container.

    2. Insert a name and click OK.

      If you want to keep the Resource Group that is already pre-set.

  3. Under Instance Details, insert:

    1. Virtual machine name
    2. Region
    3. Image
    4. Size: Choose a VM size that better suits your needs.

      Keep the remaining fields as in the default choice.

  4. Under Administrator account, enter the following details:

    1. Username: the name of the account administrator.
    2. SSH public key source: from the drop-down menu, select Generate new key pair.
    3. Key pair name: insert a name for the key pair.
  5. Under Inbound port rules:

    1. Public inbound ports: select Allow selected ports.
    2. Select inbound ports: Use the default set SSH (22).
  6. Click Review + Create. You are redirected to the Review + create tab. You receive a confirmation that the validation passed.
  7. Review the details and click Create.

    To change options, click Previous.

  8. A Generates New Key Pair pop-up opens. Click Download private key and create resources.

    Save the key file in the yourKey.pem file format.

  9. After the deployment is complete, click Go to resource.

    You are redirected to a new window with your VM details.

  10. Select the public IP address on the top right side of the page and copy it to your clipboard.

Verification

Create an SSH connection to connect to the Virtual Machine you created. For that, follow the steps:

  1. Open a terminal.
  2. At your prompt, open an SSH connection to your virtual machine. Replace the IP address with the one from your VM, and replace the path to the .pem file with the path to where the key file was downloaded.

    # ssh -i <yourKey.pem file location> <username>@<IP_address>
    • Add the user name and replace the IP address with the one from your VM.
    • Replace the path to the .pem file with the path to where the key file was downloaded.

      For example:

      # ssh -i ./Downloads/yourKey.pem azureuser@10.111.12.123
  3. You are required to confirm if you want to continue to connect. Type yes to continue.

    As a result, the output image you shared with the Microsoft Azure Storage account is started and ready to be provisioned.

    Note

    The default user is azureuser and the password is azureuser.

Red Hat logoGithubRedditYoutubeTwitter

Aprender

Pruebe, compre y venda

Comunidades

Acerca de la documentación de Red Hat

Ayudamos a los usuarios de Red Hat a innovar y alcanzar sus objetivos con nuestros productos y servicios con contenido en el que pueden confiar.

Hacer que el código abierto sea más inclusivo

Red Hat se compromete a reemplazar el lenguaje problemático en nuestro código, documentación y propiedades web. Para más detalles, consulte el Blog de Red Hat.

Acerca de Red Hat

Ofrecemos soluciones reforzadas que facilitan a las empresas trabajar en plataformas y entornos, desde el centro de datos central hasta el perímetro de la red.

© 2024 Red Hat, Inc.