Este contenido no está disponible en el idioma seleccionado.
Creating customized images by using Insights image builder
Creating customized system images with Insights image builder and uploading them to cloud environments
Abstract
Providing feedback on Red Hat documentation
We appreciate your feedback on our documentation. Let us know how we can improve it.
Submitting feedback through Jira (account required)
- Log in to the Jira website.
- Click Create in the top navigation bar.
- Enter a descriptive title in the Summary field.
- Enter your suggestion for improvement in the Description field. Include links to the relevant parts of the documentation.
- Click Create at the bottom of the dialogue.
Chapter 1. Introducing Insights image builder on Red Hat Hybrid Cloud Console
1.1. Insights image builder on Red Hat Hybrid Cloud Console
Insights image builder is a tool bundled with Red Hat Insights, within console.redhat.com. The console experience is also known as the Red Hat Hybrid Cloud Console.
With Insights image builder, RHEL customers can:
- Create customized system images, that can have a subscription activation key already embedded
- Add additional packages to the image during image creation
- Upload the customized images to the targeted clouds such as Amazon Web Services, Microsoft Azure, and Google Cloud Platform
- Download your customized images and upload it to the private VMware vSphere client
- Create customized Bare Metal and Guest images
RHEL customers can create images for a variety of deployment types, built according to the standards that are recommended for each deployment type.
Chapter 2. Accessing Insights image builder on Red Hat Hybrid Cloud Console
2.1. Getting access to Insights image builder on Red Hat Hybrid Cloud Console
Follow the steps to access Insights image builder on Red Hat Hybrid Cloud Console.
Prerequisites
- An account at Red Hat Customer Portal.
- A Red Hat Insights subscription for your account. Red Hat Insights is included with your Red Hat Enterprise Linux subscription.
Procedure
- Access Insights image builder.
- Login with your Red Hat credentials.
You are now able to create and monitor your composes.
Additional resources
Chapter 3. Creating a customized system image with an embed subscription by using Insights image builder
You can create customized system images by using Insights image builder that have a subscription activation key already embedded and upload those images to the cloud target environment.
3.1. Embedding an automatic subscription during the image creation by using Insights image builder
You can create images that have a subscription activation key already embedded in the image. With that, you can perform the registration during the image creation time.
Prerequisites
- An account at Red Hat Customer Portal with an Insights subscription.
- An activation key. For more information about how to locate your key, see What is my organization_id.
Procedure
Access Insights image builder.
The Insights image builder dashboard appears.
Click
.The Create image dialog wizard opens.
On the Image output page, complete the following steps:
- From the Release list, select the Release that you want to use: for example, choose Red Hat Enterprise Linux (RHEL).
From the Select target environments option, select the desired target(s) cloud environment.
Click
.
On the Register page, select the registration method that you want to use. You can select from these options: Automatically register and enable advanced capabilities or Register later.
If you choose the Automatically register and enable advanced capabilities option, you can customize it further by clicking the Show additional connection options:
The Monitor & manage subscriptions and access to Red Hat content radio button enables the following option:
- Enable predictive analytics and management capabilities - to provide actionable intelligence about your Red Hat Enterprise Linux environments, helping to identify and address operational and vulnerability risks before an issue results in downtime.
Enable remote remediations and system management with automation - rhc enables Red Hat Enterprise Linux hosts to connect to Red Hat Insights to use the Red Hat Insights Remediations service.
You can check or clear the checkboxes according to your preferences.
- From the dropdown menu, choose an activation key to use for the image. See Create and manage activation keys. Click .
- If you choose the Register later option, click .
-
On the File system configuration page, define the partitioning of the image. You can select from these options:
Use automatic partitioning
(Recommended) orManually configure
partitions. Click . - Optional: On the Additional Red Hat packages page, add packages to your image. See Adding packages during image creation by using Insights image builder.
- On the Name image page, enter a name for your image and click . If you do not enter a name, you can find the image you created by its UUID.
On the Review page, review the information and click .
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 image for the
x86_64
architecture.The Insights image builder Images dashboard opens. You can see details such as the Image UUID, the cloud target environment, the image operating system release and the status of the image creation.
NoteThe image build, upload, and cloud registration processes can take up to ten minutes to complete.
Additional resources
Chapter 4. Adding packages during image creation by using Insights image builder
You can customize your images during the creation process by adding additional packages from the BaseOS and AppStream RHEL repositories, through the UI. With that, you do not need to install the desired packages on first boot, which can be error-prone.
4.1. Adding additional packages during the image creation
When creating a customized image using Insights image builder, you can add additional packages from the BaseOS
and AppStream
repositories. For that, follow the steps:
Prerequisites
- You have an account on Red Hat Customer Portal with an Insights subscription.
- Access to the Insights image builder dashboard.
You have already completed the following steps:
- Image output
- Target cloud environment
- Optionally, Registration
Procedure
On the Packages page:
Type the name of the package you want to add to your image in the Available packages search bar.
Optionally, you can enter the first two letters of the package name to see the available package options. The packages are listed on the Available packages dual list box.
Click the package or packages you want to add.
Click the Chosen packages dual list box.
button to add all packages shown in the package search results to theOptionally, you can click the
button to add only the selected packages.
- After you have finished adding the additional packages, click .
- On the Name image page, enter a name for your image and click . If you do not enter a name, you can find the image you created by its UUID.
On the Review page, review the details about the image creation and click .
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 image for the
x86_64
architecture.The Insights image builder Images dashboard opens. You can see details such as the Image UUID, the cloud target environment, the image operating system release and the status of the image creation.
NoteThe image build, upload and cloud registration processes can take up to ten minutes to complete.
Chapter 5. Customizing file systems during the image creation
By using Insights image builder you can customize your filesystem layouts to set up the desired partitions and sizes during the image creation process.
The support to customize filesystem partitions is available for all the image types, except for the Bare metal - Installer (.iso)
type.
5.1. Manually configuring partitions during image creation
When creating a customized image with Insights image builder, you can customize the system configuration to use manual or automatic partitioning. Use the automatic partitioning, which is the default. Partitions can still be extended or reordered when using manual partitioning. To manually configure the partitioning of the image you are creating, complete the following steps:
Prerequisites
- You have an account on Red Hat Customer Portal with an Insights subscription.
- You have access to the Insights image builder dashboard.
You have already completed the following steps:
- Image output
- Target cloud environment
- Optionally, Registration
Procedure
On the System Configuration - File system configuration page:
You can select Use automatic partitioning or Manually configure partitions for your image file system.
Click the Manually configure partitions button.
The Configure partitions section opens, showing the configuration based on Red Hat standards and security guides.
From the dropdown menu, provide details to configure the partitions:
For the Mount point field, select one of the following mount point type options:
- /app
- /data
- /home
- /opt
- /srv
- /tmp
- /usr
- /usr/local
- /var
/
You can also add an additional path to the Mount point, such as
/tmp
. For example:/var
as a prefix and/tmp
as an additional path results in/var/tmp
.NoteDepending on the Mount point type you choose, the file system type changes to
xfs
, and so on.
For the Minimum size partition field of the file system, enter the desired minimum partition size. In the Minimum size dropdown menu, you can use common size units such as
GiB
,MiB
, orKiB
. The default unit isGiB
.NoteMinimum size means that image builder can still increase the partition sizes, in case they are too small to create a working image.
To add more partitions, click the
button. Repeat step 2 for each partition.If you see the following error message: “Duplicate partitions: Only one partition at each mount point can be created.”, you can:
- Click the button to remove the duplicated partition.
Choose a new mount point for the partition you want to create.
After you finish the partitioning configuration, click
.
Optional: On the Packages page, add packages to your image.
Click
.- On the Name image page, enter a name for your image and click . If you do not enter a name, you can find the image you created by its UUID.
On the Review page, review the information.
- Click the System Configuration tab to review the file system configuration partitioning.
Click
.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 image for the
x86_64
architecture.The Insights image builder 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.
NoteThe image build, upload and cloud registration processes can take up to ten minutes to complete.
Chapter 6. Creating and uploading a customized RHEL system image to Amazon Web Services by using Insights image builder
You can create customized RHEL system images by using Insights image builder, and upload those images to the Amazon Web Services (AWS) target environment.
Red Hat Hybrid Cloud Console does not support uploading support for uploading the images that you created for the Amazon Web Services (AWS) target environment to GovCloud regions.
6.1. Creating and uploading a customized RHEL system image to AWS by using Insights image builder
Complete the following steps to create customized system images using Insights image builder and upload those images to Amazon Web Services (AWS).
Prerequisites
- You have an AWS account created.
- You have a Red Hat account. Access Portal.
Procedure
Access Insights image builder.
The Insights image builder dashboard appears.
Click
.The Create image dialog wizard opens.
On the Image output page, complete the following steps:
- From the Release list, select the Release that you want to use: for example, choose Red Hat Enterprise Linux (RHEL).
From the Select target environments option, select
Amazon Web Services
as the target environment.Click
.
On the Target Environment - Amazon Web Services page, enter your AWS account ID and click .
You can find your AWS account ID by accessing the option Account on the AWS console.
On the Registration page, select the type of registration that you want to use. You can select from these options:
- Register images with Red Hat: Register and connect image instances, subscriptions and insights with Red Hat. For details on how to embed an activation key and register systems on first boot, see Creating a customized system image with an embed subscription by using Insights image builder.
- Register image instances only: Register and connect only image instances and subscriptions with Red Hat.
- Register later: Register the system after the image creation.
- Click .
- Optional: On the Packages page, add packages to your image. See Adding packages during image creation by using Insights image builder.
- On the Name image page, enter a name for your image and click . If you do not enter a name, you can find the image you created by its UUID.
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 Amazon Machine Image (AMI) for the
x86_64
architecture and uploads it to AWS EC2. Then, it will share theAMI
image with the account you specified.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.
NoteThe 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 is completed successfully.
NoteThe image artifacts are saved for 14 days and expire after that. Ensure that you transfer the image to your account to avoid losing it.
6.2. Accessing your customized RHEL system image for AWS from your account
After the image is built, uploaded, and the cloud registration process status is marked as Ready, you can access the Amazon Web Services (AWS) image you created and shared with your AWS EC2 account.
Prerequisites
- You have access to your AWS Management Console.
Procedure
- Access your AWS account and navigate to Service→EC2.
-
In the upper right menu, verify if you are under the correct region:
us-east-1
. In the left side menu, under Images, click AMIs.
The dashboard with the Owned by me images opens.
From the dropdown menu, choose Private images.
You can see the image successfully shared with the AWS account you specified.
6.3. Launching your customized RHEL system image for AWS from your AWS EC2
You can launch the image you successfully shared with the AWS EC2 account you have specified. To do so, follow the steps:
Prerequisites
- You have access to your customized image on AWS. See Accessing your customized RHEL system image for AWS from your account.
Procedure
- From the list of images, select the image you want to launch.
- On the top of the panel, Launch. You are redirected to the Choose an Instance Type window.
- Choose the instance type according to the resources you need to launch your image. Review and Launch.
- Review your instance launch details. You can edit each section, such as Security, Storage, for example, if you need to make any changes. After you finish the review, click .
To launch the instance, you must select a public key to access it.
Create a new key pair in EC2 and attach it to the new instance.
- From the drop-down menu list, select Create a new key pair.
- Enter the name to the new key pair. It generates a new key pair.
- Click Download Key Pair to save the new key pair on your local system.
Then, you can click
to launch your instance.You can check the status of the instance, it shows as Initializing.
- After the instance status is running, the Connect button turns available.
Click
. A popup window appears with instructions on how to connect by using SSH.- Select the preferred connection method to A standalone SSH client and open a terminal.
In the location you store your private key, make sure that your key is publicly viewable for SSH to work. To do so, run the command:
$ chmod 400 <your-instance-name.pem>
Connect to your instance by using its Public DNS:
$ ssh -i "<_your-instance-name.pem_> ec2-user@<_your-instance-IP-address_>"
- Type yes to confirm that you want to continue connecting.
As a result, you are connected to your instance over SSH.
Verification
- From a terminal, check if you are able to perform any action while connected to your instance by using SSH.
6.4. Copying your customized RHEL system image for AWS to a different region on your AWS EC2
You can copy the image you successfully shared with the Amazon Web Services EC2 to your own account. Doing so, you grant that the image you shared and copied is available until you delete it, instead of expiring after some time. To copy your image to your own account, follow the steps:
Prerequisites
- You have access to your customized image on AWS. See Accessing your customized RHEL system image for AWS from your account
Procedure
- From the list of Public images, select the image you want to copy.
- On the top of the panel, click .
- From the dropdown menu, choose Copy AMI. A popup window appears.
Choose the Destination region and click Copy AMI.
After the copying process is complete, you are provided with the new AMI ID. You can launch a new instance in the new region. See Launching your customized RHEL system image for AWS from your AWS EC2
NoteWhen you copy an image to a different region, it results in a separate and new AMI in the destination region, with a unique AMI ID.
6.5. Sharing your AWS images to a different region
You can share the images you create to different regions and therefore access the same image in more regions, creating more images from a build with the exact same content. After the images status becomes Ready
, you can start your instance to the AWS selected region. To push the image to a different region or regions, follow the steps:
Prerequisites
- You created an AWS image.
Procedure
-
From the
Image Builder
table, select the AWS image you want to upload to a different region. From the
Node options icon (⫶)
, selectShare to new region
. AShare to new region
wizard opens.-
From the
Select region
dropdown menu, choose the region or regions to upload your image. ClickShare
.
-
From the
After the images status becomes Ready
, you can start your new instance to the AWS selected region.
Verification
-
Click the
Node options icon (⫶)
and select an AWS region to start the image. -
The
Image Builder
table shows the image or images build status that you shared to the new region or regions.
Additional resources
Chapter 7. Creating RHEL system image and uploading to Microsoft Azure by using Insights image builder
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.
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
andMicrosoft.Compute
as a resource provider.
Procedure
Access Insights image builder on a browser.
The Insights image builder dashboard appears.
Click
.The Create image dialog wizard opens.
On the Image output page, complete the following steps:
- From the Release list, select the Release that you want to use: for example, choose Red Hat Enterprise Linux (RHEL).
From the Select target environments option, select
Microsoft Azure
.Click
.
On the Target Environment - Microsoft Azure window, to add Insights image builder as an authorized application, complete the following steps:
Insert your Tenant GUID.
Image builder checks if your Tenant GUID is correctly formatted and the Authorize image builder button becomes available.
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.
- Login with your credentials.
- Click Permission requested. the
Confirm that Insights image builder is authorized for your tenant.
-
Search for
Azure Active Directory
and choose Enterprise applications, from the left menu. - Search for Insights image builder and confirm it is authorized.
-
Search for
Add the Enterprise application as a contributor to your
Resource Group
.-
In the search bar, type
Resource Groups
and select the first entry under Services. This redirects you to theResource Groups
dashboard. -
Select your
Resource Group
. - On the left menu, click Insights image builder application can access your resource group. to add a permission so the
- From the menu, click the tab Role assignments.
- Click .
- From the dropdown menu, choose Add role assignment. A menu appears on the left side.
Insert the following details:
-
Role: Assign the
Contributor
role -
Assign access to: User, group, service principal. Add members: Click
+Select members
and type Red Hat in the search bar. Press enter. -
Select:
Insights image builder
application
-
Role: Assign the
-
In the search bar, type
The Insights image builder application is now authorized to push images to Microsoft Azure cloud.
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 theResource 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
- You have created a Microsoft Azure Storage Account.
- You have a Storage Account created.
- You authorized image builder to push images to Microsoft Azure. See Authorizing Insights image builder to push images to Microsoft Azure Cloud.
Procedure
On the Target Environment - Microsoft Azure window, complete the following steps:
- Enter your Tenant GUID: you can find your Tenant ID in the Microsoft Azure Active Directory application in Microsoft Azure portal.
- Enter your Subscription ID: you can find your Subscription ID account by accessing the Microsoft Azure console.
Enter your Resource group: is the name of your Resource Group in Microsoft Azure portal.
Click
.
On the Registration page, select the type of registration that you want to use. You can select from these options:
- Register images with Red Hat: Register and connect image instances, subscriptions and insights with Red Hat. For details on how to embed an activation key and register systems on first boot, see Creating a customized system image with an embed subscription by using Insights image builder .
- Register image instances only: Register and connect only image instances and subscriptions with Red Hat.
- Register later: Register the system after the image creation.
- Click .
- Optional: On the Packages page, add packages to your image. See Adding packages during image creation by using Insights image builder.
- On the Name image page, enter a name for your image and click . If you do not enter a name, you can find the image you created by its UUID.
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 thex86_64
architecture, uploads it to the resource group account you specified, and creates aMicrosoft 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.
NoteThe 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.
Additional resources
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
- You have access to your Microsoft Azure dashboard.
Procedure
- Access your Microsoft Azure dashboard and navigate to the Resource group page.
Verification
After you access your Microsoft Azure Account, you can see that the image successfully shared with the resource group account you specified.
NoteIf 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
- You must have a Microsoft Azure Storage Account created.
- You must have uploaded the required image to the Microsoft Azure Cloud account.
Procedure
- Click Create a virtual machine dashboard. . You are redirected to the
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:
Click
.A pop-up prompts you to create the Resource Group Name container.
Insert a name and click
.If you want to keep the Resource Group that is already pre-set.
Under Instance Details, insert:
- Virtual machine name
- Region
- Image
Size: Choose a VM size that better suits your needs.
Keep the remaining fields as in the default choice.
Under Administrator account, enter the following details:
- Username: the name of the account administrator.
- SSH public key source: from the drop-down menu, select Generate new key pair.
- Key pair name: insert a name for the key pair.
Under Inbound port rules:
- Public inbound ports: select Allow selected ports.
- Select inbound ports: Use the default set SSH (22).
- Click Review + create tab. You receive a confirmation that the validation passed. . You are redirected to the
Review the details and click
.To change options, click
.A Generates New Key Pair pop-up opens. Click .
Save the key file in the yourKey.pem file format.
After the deployment is complete, click
.You are redirected to a new window with your VM details.
- 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:
- Open a terminal.
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
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.
NoteThe default user is
azureuser
and the password isazureuser
.
Chapter 8. Creating and uploading a customized RHEL system image to GCP by using Insights image builder
You can create customized RHEL system images by using Insights image builder and upload those images to the Google Cloud Platform (GCP) target environment.
You can deploy the images you created with the image builder tool in the GCP environment only by using the gcloud
CLI tool.
Red Hat Hybrid Cloud Console does not support uploading support for uploading the images that you created for the Google Cloud Platform (GCP) target environment to GovCloud regions.
8.1. Creating a customized RHEL system image for Google Cloud Platform by using Insights image builder
You can create customized system images by using Insights image builder and upload those images to Google Cloud Platform. Then, you can start an instance from the image you uploaded.
Prerequisites
- You have a valid Google account to share your image.
- You have a Red Hat account. Access Portal.
- You have access to the Insights image builder.
Procedure
Access Insights image builder.
The Insights image builder dashboard appears.
Click
.The Create image dialog wizard opens.
On the Image output page, complete the following steps:
- From the dropdown menu, select the Release: Red Hat Enterprise Linux (RHEL).
From the Select target environments option, select
Google Cloud Platform
.Click
.
On the Target environment- Google Cloud Platform window, select a valid account type to share your image with: a Google account, a Service account or a domain name.
-
Google account: A Google account which interacts with Google Cloud, for example:
alice@gmail.com
. -
Service account: An application account, for example:
myapp@appspot.gserviceaccount.com
. -
Google group: A named collection of Google accounts and service accounts, for example:
admins@example.com
. -
Google workspace domain/Cloud identity domain: A virtual group of all the Google accounts in a named organization. For example, the domain name
mycompany.com
.
-
Google account: A Google account which interacts with Google Cloud, for example:
Enter the account email address or domain name, depending on the type of target environment you chose.
Click
.On the Registration page, select the type of registration that you want to use. You can select from these options:
- Register images with Red Hat: Register and connect image instances, subscriptions and insights with Red Hat. For details on how to embed an activation key and register systems on first boot, see Creating a customized system image with an embed subscription by using Insights image builder.
- Register image instances only: Register and connect only image instances and subscriptions with Red Hat.
- Register later: Register the system after the image creation.
- Click .
- Optional: On the Packages page, add packages to your image. See Adding packages during image creation by using Insights image builder.
- On the Name image page, enter a name for your image and click . If you do not enter a name, you can find the image you created by its UUID
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 to compose the RHEL image for the
x86_64
architecture and upload it to Google Cloud Platform. Then, it shares the image with the account you specified.On the dashboard you can see details such as, the Image UUID, the cloud target environment, the image operating system release and the status of the image creation. After the new image displays a Ready status in the Status column, Insights image builder shares the image with the account you specified.
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.
NoteThe image build, upload and cloud registration processes can take up to ten minutes to complete.
Verification
Check the status in the Images Dashboard. Click the image name to expand and show details.
The Ready status indicates that the image has been successfully created and shared with the Google account.
- In addition, the window shows the number of days until image expiration.
You can check which account the image is shared with.
NoteThe image artifacts are saved for 14 days and expire after that. Ensure that you transfer the image to your account to avoid losing it.
8.2. Creating a VM instance using your GCE image
After the image is built, uploaded and the cloud registration process status is marked as Ready, you can create a Virtual Machine (VM) instance using the GCE image.
Prerequisites
- You have the universally unique identifier (UUID) of the image you created.
- You have access to the Image-builder service API endpoint.
- You have access to your project details at Google Cloud Platform.
- You can access Google Cloud Shell from your browser.
Procedure
- From the Insights image builder dashboard, copy the image UUID of the image you created.
- Access /composes/{composeId} API endpoint.
- Click the Try it Out button to activate the composeId string path.
-
Enter the UUID into the
composes/{composeId}
field in the API endpoint. Click Execute. The API endpoint generates a response in the Response body, for example:
{ "image_status": { "status": "success", "upload_status": { "options": { "image_name": "composer-api-03f0e19c-0050-4c8a-a69e-88790219b086", "project_id": "red-hat-image-builder" }, "status": "success", "type": "gcp" } } }
- From the Response body field, copy the image_name and project_id to access the image from the Google Cloud Platform environment.
- From your browser, access Google Cloud Shell.
Set your Google Cloud Platform Project ID as the default GCP project. You can find the Product ID of your project by accessing the Google Cloud Platform dashboard.
$ gcloud config set project PROJECT_ID
- In the Authorize Cloud Shell window prompt, click to allow this and future calls that require your credentials.
Create a VM instance with the image by using the gcloud command in the Google Cloud Shell:
$ gcloud compute instances create INSTANCE_NAME \ --image-project PROJECT_ID_FROM_RESPONSE \ --image IMAGE_NAME \ --zone GCP_ZONE
Where:
- INSTANCE_NAME is the name you give to your instance;
- PROJECT_ID_FROM_RESPONSE is the project_id generated by Response body;
- IMAGE_NAME is the image_name generated by Response body;
- GCP_ZONE is the GCP zone in which the instance will be created.
Verification
Verify that Compute Engine created the VM:
$ gcloud compute instances describe INSTANCE_NAME
Connect to the VM instance through SSH:
$ gcloud compute ssh --project=PROJECT_ID --zone=ZONE INSTANCE_NAME
Additional resources
8.3. Copying the GCE image to your project group
After the image is built, uploaded and the cloud registration process status is marked as Ready, you can create a Virtual Machine (VM) instance using the GCE image.
Prerequisites
- The universally unique identifier (UUID) of the image you created.
- Access to the Image-builder service API endpoint.
- Access to the Google Cloud Shell from your browser.
Procedure
- From the Image Builder dashboard, copy the UUID image of the image you created.
- Access /composes/{composeId} API endpoint.
- Click the Try it Out button to activate the composeId string path.
-
Enter the UUID into the
composes/{composeId}
field in the API endpoint. Click Execute. The API endpoint generates a response in the Response body, for example:
{ "image_status": { "status": "success", "upload_status": { "options": { "image_name": "composer-api-03f0e19c-0050-4c8a-a69e-88790219b086", "project_id": "red-hat-image-builder" }, "status": "success", "type": "gcp" } } }
From the Response body field, copy the image_name and project_id to access the image from the Google Cloud Platform environment. From the Response body:
"image_name": "composer-api-03f0e19c-0050-4c8a-a69e-88790219b086", "project_id": "red-hat-image-builder"
- From your browser, access Google Cloud Shell.
Set your Google Cloud Platform Project ID as the default GCP project. You can find the Product ID of your project by accessing the Google Cloud Platform dashboard.
$ gcloud config set project PROJECT_ID
- In the Authorize Cloud Shell window prompt, click Authorize to allow this and future calls that require your credentials.
Copy the image to your project by using the gcloud command:
$ gcloud compute images create MY_IMAGE_NAME \ --source-image-project red-hat-image-builder \ --source-image IMAGE_NAME
Where:
- MY_IMAGE_NAME is the name you give to your instance;
- red-hat-image-builder is the project_id generated by Response body;
- IMAGE_NAME is the image_name generated by Response body;
Verification
Confirm that the image has been successfully copied to your project:
- Using the Google Cloud Platform UI, by accessing the Compute Engine / Images section.
Using the
gcloud
tool, by running the command in Google Cloud Shell:$ gcloud compute images list --no-standard-images
Additional resources
Chapter 9. Creating and uploading a customized RHEL VMDK system image to vSphere
You can create customized RHEL system images by using Insights image builder and upload those images to the VMware vSphere client.
9.1. Creating a customized RHEL VMDK system image by using Insights image builder
With Insights image builder, you can create customized system images in the Open virtualization format (.ova
) or in the Virtual disk (.vmdk
) format. You can upload these images to VMware vSphere.
You can import the Virtual disk (.vmdk
) format only with the govc
client. As for the Open virtualization format (.ova
), you can import it by using both the vSphere GUI and govc
clients.
The Open virtualization format (.ova
) is a .vmdk
image with additional metadata about the virtual hardware, when imported it creates a VM. After importing the .ova
image into vSphere, you can configure the VM with any additional hardware, such as network, disks and CD-ROM.
Procedure
Access Insights image builder on the browser.
The Insights image builder dashboard appears.
Click
.The Create image dialog wizard opens.
On the Image output page, complete the following steps:
- From the Release list, select the Release that you want to use: for example, choose Red Hat Enterprise Linux (RHEL).
-
From the Select target environments option, select
VMware
. Select one of the options:
-
Open virtualization format (
.ova
) Virtual disk (
.vmdk
) formatClick
.
-
Open virtualization format (
On the Registration page, select the type of registration that you want to use. You can select from these options:
- Register images with Red Hat - Register and connect image instances, subscriptions and insights with Red Hat. For details on how to embed an activation key and register systems on first boot, see Creating a customized system image with an embed subscription by using Insights image builder.
- Register image instances only - Register and connect only image instances and subscriptions with Red Hat.
- Register later - Register the system after the image creation.
- Click .
- Optional: On the Packages page, add packages to your image. See Adding packages during image creation by using Insights image builder.
- On the Name image page, enter a name for your image and click . If you do not enter a name, you can find the image you created by its UUID.
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.
When the new image displays a Ready status in the Status column, click Download .vmdk in the Instance column.
The .vmdk image is saved to your system and is ready for deployment.
NoteThe
.vmdk
images are available for 6 hours and expire after that. Ensure that you download the image to avoid losing it.
Additional resource
9.2. Deploying VMDK images to vSphere by using the GUI
After creating your Open virtualization format (.ova
) image, you can deploy it to VMware vSphere by using the vSphere GUI client. It will create a VM which can be customized further before booting.
The GUI wizard does not support cloud-init
.
Prerequisite
- You logged in to the vSphere UI in a browser.
-
You downloaded your (
.ova
) image.
Procedure
- In the vSphere Client, from the Actions menu, select Deploy OVF Template.
- On the Deploy OVF Template page, complete the settings for each configuration option and click .
Click
. The.ova
image starts to be deployed.After the image deployment is complete, you have a new virtual machine (VM) from the
.ova
image.In the deployed image page, perform the following steps:
- From the Actions menu, select Edit Setting.
On the Virtual Hardware tab, configure resources such as CPU, memory, add a new network adapter, between others of your choice.
On the CD/DVD drive 1 option, attach a CD or DVD Drive that contains a
cloud-init.iso
, to provision a user on startup.The VM is now ready to boot with the username and password from the
cloud-init.iso
file.
Additional resources
- Deploy an OVF or OVA Template
- The govc documentation
- The VMware - cloud init 22.2 documentation
9.3. Deploying VMDK images to vSphere by using the CLI
After creating your image, you can deploy it to VMware vSphere by using the CLI. Then, you can create a VM and login into it.
The GUI wizard does not support cloud-init
.
Prerequisites
You configured the
govc
VMware CLI tool client.To use the
govc
VMware CLI tool client, you must set the following values in the environment:GOVC_URL GOVC_DATACENTER GOVC_FOLDER GOVC_DATASTORE GOVC_RESOURCE_POOL GOVC_NETWORK
Procedure
-
Access the directory where you downloaded your
.vmdk
image. Create a file named
metadata.yaml
. Add the following information to this file:instance-id: cloud-vm local-hostname: vmname
Create a file named
userdata.yaml
. Add the following information to the file:#cloud-config users: - name: admin sudo: "ALL=(ALL) NOPASSWD:ALL" ssh_authorized_keys: - ssh-rsa AAA...fhHQ== your.email@example.com
-
ssh_authorized_keys
is your SSH public key. You can find your SSH public key in~/.ssh/id_rsa.pub
.
-
Export the
metadata.yaml
anduserdata.yaml
files to the environment, compressed withgzip
, encoded inbase64
as follows. They will be used in further steps.export METADATA=$(gzip -c9 <metadata.yaml | { base64 -w0 2>/dev/null || base64; }) \ USERDATA=$(gzip -c9 <userdata.yaml | { base64 -w0 2>/dev/null || base64; })
Launch the image on vSphere with the
metadata.yaml
anduserdata.yaml
files:Import the
.vmdk
image in to vSphere:$ govc import.vmdk ./composer-api.vmdk foldername
Create the VM in vSphere without powering it on:
govc vm.create \ -net.adapter=vmxnet3 \ -m=4096 -c=2 -g=rhel8_64Guest \ -firmware=bios -disk=”foldername/composer-api.vmdk” \ -disk.controller=ide -on=false \ vmname
Change the VM to add
ExtraConfig
variables, thecloud-init
config:govc vm.change -vm vmname \ -e guestinfo.metadata="${METADATA}" \ -e guestinfo.metadata.encoding="gzip+base64" \ -e guestinfo.userdata="${USERDATA}" \ -e guestinfo.userdata.encoding="gzip+base64"
Power-on the VM:
govc vm.power -on vmname
Retrieve the VM IP address:
HOST=$(govc vm.ip vmname)
Use SSH to log in to the VM, using the user-data specified in
cloud-init
file configuration:$ ssh admin@HOST
Additional resources
- The govc documentation
- The VMware - cloud init 22.2 documentation
Chapter 10. Creating a customized RHEL Guest image by using Insights image builder
You can create customized RHEL guest system images by using Insights image builder. You can then download these images to create virtual machines from these guest images according to your requirements.
10.1. Creating a customized RHEL Guest system image by using Insights image builder
Complete the following steps to create customized RHEL Guest .qcow2
images by using Insights image builder.
Procedure
Access Insights image builder in your browser.
You are redirected to the Insights image builder dashboard.
Click Create image.
The Create image wizard opens.
On the Image output page, complete the following steps:
- From the Releases list, select the release of Red Hat Enterprise Linux (RHEL) that you want to use to create the image.
From the Select target environments options, select Virtualization - Guest image.
Click
.
On the Registration page, select the type of registration that you want to use. You can select from these options:
- Register images with Red Hat: Register and connect image instances, subscriptions and insights with Red Hat. For details on how to embed an activation key and register systems on first boot, see Creating a customized system image with an embed subscription by using Insights image builder.
- Register image instances only: Register and connect only image instances and subscriptions with Red Hat.
- Register later: Register the system after the image creation.
- Click .
- Optional: On the Packages page, add packages to your image. See Adding packages during image creation by using Insights image builder.
- On the Name image page, enter a name for your image and click . If you do not enter a name, you can find the image you created by its UUID.
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.
When the new image displays a Ready status in the Status column, click Download .qcow2 image in the Instance column.
The
.qcow2
image is saved to your system and is ready for deployment.NoteThe
.qcow2
images are available for 6 hours and expire after that. Ensure that you download the image to avoid losing it.
10.2. Creating a virtual machine from the customized RHEL Guest system image
You can create a virtual machine (VM) from the QCOW2 image that you created by using Insights image builder.
Prerequisites
- You created and downloaded a QCOW2 image by using Insights image builder.
Procedure
- Access the directory where you downloaded your QCOW2 image.
Create a file named
meta-data
. Add the following information to this file:instance-id: nocloud local-hostname: vmname
Create a file named
user-data
. Add the following information to the file:#cloud-config user: admin password: password chpasswd: {expire: False} ssh_pwauth: True ssh_authorized_keys: - ssh-rsa AAA...fhHQ== your.email@example.com
-
ssh_authorized_keys
is your SSH public key. You can find your SSH public key in~/.ssh/id_rsa.pub
.
-
Use the
genisoimage
command to create an ISO image that includes theuser-data
andmeta-data
files.# genisoimage -output cloud-init.iso -volid cidata -joliet -rock user-data meta-data I: -input-charset not specified, using utf-8 (detected in locale settings) Total translation table size: 0 Total rockridge attributes bytes: 331 Total directory bytes: 0 Path table size(bytes): 10 Max brk space used 0 183 extents written (0 MB)
Create a new VM from the KVM Guest Image using the
virt-install
command. Include the ISO image you created on step 4 as an attachment to the VM image.# virt-install \ --memory 4096 \ --vcpus 4 \ --name myvm \ --disk composer-api.qcow2,device=disk,bus=virtio,format=qcow2 \ --disk cloud-init.iso,device=cdrom \ --os-variant rhel8 \ --virt-type kvm \ --graphics none \ --import
Where,
- --graphics none - indicates that it is a headless RHEL Virtual Machine.
- --vcpus 4 - indicates that it uses 4 virtual CPUs.
- --memory 4096 - indicates that it uses 4096 MB RAM.
The VM installation starts:
Starting install... Connected to domain myvm ... [ OK ] Started Execute cloud user/final scripts. [ OK ] Reached target Cloud-init target. Red Hat Enterprise Linux 8 (Ootpa) Kernel 4.18.0-221.el8.x86_64 on an x86_64
Additional resources
Chapter 11. Creating a customized RHEL bare metal image by using Insights image builder
You can create customized RHEL ISO system images by using the Insights image builder. You can then download these images and install them on a bare metal system according to your requirements.
11.1. Creating a customized RHEL ISO system image by using Insights image builder
Complete the following steps to create customized RHEL ISO images by using the Insights image builder.
Procedure
Access Insights image builder on the browser.
The Insights image builder dashboard opens.
Click Create image.
The Create image dialog wizard opens.
On the Image output page, complete the following steps:
- From the Release list, select the Release that you want to use: for example, choose Red Hat Enterprise Linux (RHEL).
- From the Select target environments option, select Bare metal - Installer.
- Click .
On the Registration page, select the type of registration that you want to use. You can select from these options:
- Register images with Red Hat: Register and connect image instances, subscriptions and insights with Red Hat. For details on how to embed an activation key and register systems on first boot, see Creating a customized system image with an embed subscription by using Insights image builder.
- Register image instances only: Register and connect only image instances and subscriptions with Red Hat.
- Register later:- Register the system after the image creation.
- Click .
- Optional: On the Packages page, add packages to your image. See Adding packages during image creation by using Insights image builder.
- On the Name image page, enter a name for your image and click . If you do not enter a name, you can find the image you created by its UUID.
-
On the Review page, review the details about the image creation and click Create image. Your image is created as a
.iso
image. When the new image displays a Ready status in the Status column, click Download .iso image.
The
.iso
image is saved to your system and is ready for deployment.NoteThe
.iso
images are available for 6 hours and expire after that. Ensure that you download the image to avoid losing it.
11.2. Installing the customized RHEL ISO system image to a bare metal system
You can create a virtual machine (VM) from the ISO image that you created using the Insights image builder.
Prerequisites
- You created and downloaded an ISO image by using Insights image builder.
- A 8 GB USB flash drive.
Procedure
- Access the directory where you downloaded your ISO image.
- Place the bootable ISO image file on a USB flash drive.
- Connect the USB flash drive to the port of the computer you want to boot.
- Boot the ISO image from the USB flash drive.
Perform the steps to install the customized bootable ISO image.
The boot screen shows you the following options:
- Install Red Hat Enterprise Linux 8
- Test this media & install Red Hat Enterprise Linux 8
Additional resources
Chapter 12. Locating the images you created by using Insights image builder
By accessing the Insights image builder dashboard, you are able to locate the images built for you.
12.1. Locating your customized images in the Insights image builder dashboard
After your customized images are uploaded to the cloud or clouds, you can still locate these images and, if they are still valid, you have the option to copy them and also launch them directly from the dashboard.
To locate your images in the image builder dashboard, complete the following steps:
Prerequisites
- You have an account on Red Hat Customer Portal with an Insights subscription.
- You have access to the Insights image builder dashboard.
- You created images by using Insights image builder.
Procedure
Access the Insights image builder dashboard.
You are redirected to the Insights image builder dashboard and can see all the images that were built for you.
Locate your image by name.
- Type your image name in the search bar on the top left menu.
If your image exists, image details appear, showing: the Image name, Creation date, Release version, cloud Target, and image Status.
You can also see information about any customizations applied to the image, such as packages and file system configuration.
Under Uploads, you can find the uploaded images.
For Amazon Web Services images:
- After the image status is marked as Ready, click the Launch instance link. You are redirected to the image on AWS from where you can launch the instance. See Launching your customized RHEL system image for AWS from your AWS EC2.
For Google Cloud Platform images:
- After the image status is marked as Ready, click the copy symbol. You can create a Virtual Machine (VM) instance using the GCE image. See Creating a VM instance using your GCE image.
For Microsoft Azure images:
- After the image status is marked as Ready, click the View uploaded image link. You are redirected to the image on Microsoft Azure from where you can view the uploaded image from your Microsoft Azure account. See Creating a VM from the customized RHEL system image you shared with the Microsoft Azure account.
For VMware images:
- After the image status is marked as Ready, click the Download .vmdk link. The image is saved to your system and is ready for deployment. See Deploying VMDK images to vSphere by using the GUI.
For Guest images images:
- After the image status is marked as Ready, click the Download .qcow2 image. The image is saved to your system and is ready for deployment. See Creating a Virtual Machine from the customized RHEL Guest system image.
For Bare metal images images:
After the image status is marked as Ready, click the Download .iso image. The image is saved to your system and is ready for deployment. See Installing the customized RHEL ISO system image to a bare metal system.
Note- The image artifacts for public clouds, such as GCP, and AWS are saved for 14 days and expire after that. Ensure to transfer the image to your account to avoid losing it.
- The private clouds images, such as VMware, Guest-image, and Installer images are available for 6 hours and expire after that. Ensure to download the image to avoid losing it.
Chapter 13. Creating a new image from an existing customized build by using Insights image builder
You can recreate an existing customized RHEL image by using Insights image builder. It recreates the exact image you want to recreate, but the new image is recreated with a different UUID. Additionally, the new image fetches the package updates and refreshes the content with those updates. You can customize this new image with additional customizations according to your requirements.
13.1. Creating a new image from an existing build
To recreate a new image from an existing compose, follow the steps:
Prerequisites
- You created an image and customized it according to your requirements.
Procedure
-
From the
Image Builder
dashboard, select the image you want to create an image from. From the
Node options
icon (⫶), selectRecreate image
. TheCreate image
wizard opens.NoteIf the image status is
Expired
, click directly the button.- Optional: If you want to make any modifications to the image, such as adding new packages, navigate to the appropriate step using the menu on the left to make the customizations. Click .
-
On the
Review
page, click .
The Insights image builder Images dashboard opens. The image build starts to recreate the image. You can see details such as the Image name, UUID, the cloud target environment, the image operating system release and the status of the image creation.
Verification
-
From the
Status
column, check if the image isReady
. -
Optional: Click
Image details
to display additional information about the recreated image.