Uploading a customized RHEL system image to cloud environments

Red Hat Enterprise Linux 8

Uploading customized system images created with Image Builder and uploading them to cloud environments

Red Hat Customer Content Services

Abstract

Red Hat Image Builder bundled with Insights enables you to create customized images and upload the image to the target cloud environments, such as Amazon Web Services, Microsoft Azure and Google Cloud Platform. Learn how to create images and upload them to the target cloud platforms.

This is a beta version!

This document is provided as a preview and only includes or highlights features that are new as part of the public Beta. It is under development and is subject to substantial change. Consider the included information incomplete and use it with caution. This content will later be incorporated into the regular product documentation available at Product Documentation for Red Hat Enterprise Linux 8.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. We are beginning with these four terms: master, slave, blacklist, and whitelist. Because of the enormity of this endeavor, these changes will be implemented gradually over several upcoming releases. For more details, see our CTO Chris Wright’s message.

Providing feedback on Red Hat documentation

We appreciate your input on our documentation. Please let us know how we could make it better. To do so:

  • For simple comments on specific passages:

    1. Make sure you are viewing the documentation in the Multi-page HTML format. In addition, ensure you see the Feedback button in the upper right corner of the document.
    2. Use your mouse cursor to highlight the part of text that you want to comment on.
    3. Click the Add Feedback pop-up that appears below the highlighted text.
    4. Follow the displayed instructions.
  • For submitting more complex feedback, create a Bugzilla ticket:

    1. Go to the Bugzilla website.
    2. As the Component, use Documentation.
    3. Fill in the Description field with your suggestion for improvement. Include a link to the relevant part(s) of documentation.
    4. Click Submit Bug.

Chapter 1. Introducing Red Hat Image Builder on Cloud.RedHat.Com

1.1. Red Hat Image Builder on cloud.redhat.com

Red Hat Image Builder is a tool bundled with Red Hat Insights, within cloud.redhat.com. With Red Hat 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.

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 Red Hat Image Builder on Cloud.RedHat.Com

2.1. Getting access to Red Hat Image Builder on cloud.redhat.com

Follow the steps to access Red Hat Image Builder on cloud.redhat.com.

Prerequisites

Procedure

  1. Access Red Hat Image Builder.
  2. Login with your Red Hat credentials.

You are now able to create and monitor your composes.

Chapter 3. Creating a customized system image with an embed subscription using Red Hat Image Builder

You can create customized system images using Red Hat 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 Red Hat Image Builder

You can create images that have a subscription activation key already embedded and with that, selecting to perform the registration during image creation time.

Prerequisites

Procedure

  1. Access Red Hat Image Builder at cloud.redhat.com. You are redirected to the Red Hat Image Builder dashboard.
  2. Click Create image. A Create image dialog window opens.
  3. In the Image Output window, select the following:

    1. From the dropdown menu, select the Release.
    2. From the Cloud options, select the desired target(s) cloud environment.

      Click Next.

  4. In the Target Environment window, enter the account information related to the chosen cloud or clouds.
  5. In the Registration window, select the option Embed an activation key and register systems on first boot.

    1. Your Organization ID is filled in automatically.
    2. Enter your Activation key and click Next.
  6. Optional: In the Additional packages window, select the packages to add to your image.

    Click Next.

  7. In the Review window, review the information and click Create.

    Red Hat Image Builder builds a RHEL 8.3 image with the options you have chosen. You are redirected to the Red Hat Image Builder Images dashboard, where you can see details such as the Image UUID, the target cloud, the release, and the status of the image creation.

Chapter 4. Adding packages during image creation by Using Red Hat 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 Image Builder, you can add additional packages from the BaseOS and AppStream repositories. Follow the steps in this procedure to add additional packages while creating your customized RHEL 8.3 system image, using Red Hat Image Builder.

Prerequisites

  • You have an account on Red Hat Customer Portal with an Insights subscription.
  • Access to the Red Hat Image Builder dashboard.
  • You have already completed the following steps:

    • Image output
    • Target cloud environment
    • Optionally, Registration

Procedure

  1. In the Additional Package window:

    1. Type the name of the package you want to add to your image in the Available options 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 options dual list box.

    2. Click the package or packages you want to add.

      1. Click the >> button to add all packages shown in the package search results to the Chosen options dual list box.

        Optionally, you can click the > button to add all selected packages.

    3. Once you have finished adding the additional packages, click Next.
  2. In the Review window, review the image creation details. You can verify the list of packages you have added.
  3. Once you finish the review, click Create image to start the image creation process.
  4. Red Hat Image Builder starts the compose of a RHEL 8.3 image for the x86_64 architecture and uploads it to the target cloud environment of your choice.

    The Red Hat 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. Once the status is Ready, it shares the customized RHEL 8.3 system image with the specified account.

    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.

Chapter 5. Creating and uploading a customized RHEL system image to Amazon Web Service using Red Hat Image Builder

The ability to create customized RHEL system images by using Red Hat Image Builder and upload those images to the Amazon Web Services (AWS) target environment is available.

5.1. Creating and uploading a customized RHEL system image to AWS using Image Builder

Follow the steps to create customized system images using Red Hat Image Builder and upload those images to Amazon Web Services (AWS).

Prerequisites

Procedure

  1. Access Red Hat Image Builder on the browser of your choice.

    You are redirected to the Red HatImage Builder dashboard.

  2. Click Create image.

    A Create a new image dialog window opens.

  3. In the Image output window:

    1. From the dropdown menu, select the Release: Red Hat Enterprise Linux (RHEL) 8.3.
    2. Select Amazon Web Services as the target environment.

      Click Next.

  4. In the Target Environment- Upload to AWS window, enter your AWS account ID.

    Click Next.

Your image will be uploaded to Amazon Web Services and shared with the account ID you entered. You can find your AWS account ID by accessing the option My account on the AWS console. Click Next.

  1. In the Registration window, you have the option to:

  2. Optional: In the Additional package window, add packages to your image. See Chapter 4, Adding packages during image creation by Using Red Hat Image Builder.
  3. In the Review window, review the details about the image creation and click Create.

    Red Hat Image Builder starts the compose of a RHEL 8.3 AMI image for the x86_64 architecture and uploads it to AWS EC2. Then, it will share the AMI with the account you specified.

    The Red Hat 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. Once the status is Ready, the Azure Disk Image is shared with the specified account.

    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 is completed successfully.

5.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

Procedure

  1. Access your AWS account and navigate to Service→EC2.
  2. In the upper right menu, verify if you are under the correct region: us-east-1.
  3. In the left side menu, under Images, click AMIs.

    The dashboard with the Owned by me images opens.

  4. From the dropdown menu, choose Private images.

    You can see the image successfully shared with the AMI account you specified.

5.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

Procedure

  1. From the list of images, select the image you want to launch.
  2. On the top of the panel, click Launch. You are redirected to the Choose an Instance Type window.
  3. Choose the instance type according to the resources you need to launch your image. Click Review and Launch.
  4. Review your instance launch details. You can edit each section, such as Security, Storage, for example, if you need to make any change. Once you finish the review, click Launch.
  5. 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.

    1. From the drop-down menu list, select Create a new key pair.
    2. Enter the name to the new key pair. It generates a new key pair.
    3. Click Download Key Pair to save the new key pair on your local system.
  6. Then, you can click Launch Instance to launch your instance.

    You can check the status of the instance, it shows as Initializing.

  7. Once the instance status is running, the Connect button turns available.
  8. Click Connect. A popup window appears with instructions on how to connect using SSH.

    1. Select the preferred connection method to A standalone SSH client and open a terminal.
    2. 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>
    3. Connect to your instance using its Public DNS:

      $ ssh -i "<_your-instance-name.pem_"> ec2-user@<_your-instance-IP-address_>
    4. Type yes to confirm that you want to continue connecting.

As a result, you are connected to your instance using SSH.

Verification

  • From a terminal, check if you are able to perform any action while connected to your instance using SSH.

5.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

Procedure

  1. From the list of Public images, select the image you want to copy.
  2. On the top of the panel, click Actions.
  3. From the dropdown menu, choose Copy AMI. A popup window appears.
  4. Choose the Destination region and click Copy AMI.

Once the copying process is complete, you are provided with the new AMI ID. You can launch a new instance in the new region. See Section 5.3, “Launching your customized RHEL system image for AWS from your AWS EC2”

Note

When 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.

Chapter 6. Creating and uploading a customized RHEL system image to Microsoft Azure using Red Hat Image Builder

The ability to create customized RHEL system images using Red Hat Image Builder and upload those images to the Microsoft Azure cloud target environment is available.

6.1. Authorizing Red Hat Image Builder to push images to Microsoft Azure Cloud

To authorize Red Hat Image Builder to push images to the Microsoft Azure cloud, you must configure Red Hat Image Builder as an authorized application and give it the role of Contributor; for that, follow the steps:

Prerequisites

  • You have a Storage account created in Microsoft Azure.
  • You have an existing resource group in Azure portal.

Procedure

  1. Access Red Hat Image Builder on the browser of your preference. This redirects you to the Red hat Image Builder dashboard.
  2. Click Create image.
  3. In the Image output window:

    1. From the dropdown menu, select the Release: Red Hat Enterprise Linux (RHEL) 8.3.
    2. Select Microsoft Azure as the Target environment.
    3. Click Next.
  4. In the Target Environment - Upload to Microsoft Azure window:

    1. Click Authorize Image Builder on Azure to authorize Red Hat Image Builder to push images to the Microsoft Azure cloud.

      1. Click the Authorize Image Builder on Azure link. This redirects you to the Microsoft Azure portal.
      2. Login with your credentials.
      3. You are required to accept the Permission requested. Click Accept.
      4. Type Resources Group in the search bar and select the first entry under Services. This redirects you to the Resources Group dashboard.
      5. Select your Resource Group. This redirects you to the Resource Group dashboard.
      6. On the left menu, click Access control (IAM) to add a permission so the Red Hat Image Builder application can access your resources group.
      7. From the menu, click the tab *Role assignments.
      8. Click +Add.
      9. From the dropdown menu, choose Add role assignment. A menu appears on the left side.
      10. Insert the following details:

        1. Role: Assign the role Contributor
        2. Assign access to: User, group, service principal
        3. Select: Image Builder application

With the previous configuration, you assign the role to your Resource Group and thus authorizing the Red Hat Image Builder application to push images to Microsoft Azure cloud.

Note

Even though any user can add an application to the resources group/ project, the application is not able to see any resource unless the account administrator adds the shared application to the IAM.

Verification

  • From the menu, click the tab Role assignments.

    You can see Red Hat Image Builder set as a Contributor of the Resource Groups you selected.

6.2. Creating a customized RHEL system image for Microsoft Azure using Image Builder

Follow the steps in this procedure to create customized system images using Image Builder and upload those images to Microsoft Azure.

Prerequisites

Procedure

  1. Access Red Hat Image Builder on the browser of your choice.

    You are redirected to the Red Hat Image Builder dashboard.

  2. Click Create image.
  3. In the Image output window:

    1. From the dropdown menu, select the Release: Red Hat Enterprise Linux (RHEL) 8.3.
    2. Select Microsoft Azure as the Target environment.

      Click Next.

  4. In the Target Environment - Upload to Microsoft Azure window:

    1. Click Authorize Image Builder on Azure to authorize Red Hat Image Builder to push images to the Microsoft Azure cloud. See Section 6.1, “Authorizing Red Hat Image Builder to push images to Microsoft Azure Cloud” for details.

      Note

      Ensure you completed the steps from the previous section, otherwise Red Hat Image Builder will not be able to upload an image into your Microsoft Azure account.

  5. Under Destination, enter the following details:

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

      Click Next.

  6. In the Registration window, you have the option to:

  7. Optional: In the Additional package window, add packages to your image. See Chapter 4, Adding packages during image creation by Using Red Hat Image Builder.
  8. In the Review window, review the details about the image creation and click Create.

    Red Hat Image Builder starts the compose of a RHEL 8.3 Azure Disk Image image for the x86_64 architecture, uploads it to the resource group account you specified, and creates an Azure Image.

    The Red Hat 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. Once the status is Ready, the Azure Disk Image is shared with the specified account.

    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 is completed successfully.

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

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

Prerequisites

Procedure

  1. Access your Microsoft Azure dashboard and navigate to the Resource group page.
  2. On the overview menu, you can see the image you uploaded is available.

Verification

  1. Once you access your Microsoft Azure Account, you should be able to see the image successfully shared with the resource group account you specified.

    1. If the image is not visible there, you may have issues with the upload process. Return to the Red Hat Image Builder dashboard and check if the image is marked as Ready.

6.4. Creating a Virtual Machine from the customized RHEL system image you shared with the Microsoft Azure account

This section describes steps to create a Virtual Machine (VM) from the image you shared with the Microsoft Azure Cloud account by using Red Hat 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 defaults 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 will receive a confirmation that the validation passed.
  7. Review the details and click Create.

    Optionally, you can click Previous if you want to change the previous options.

  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. Once 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

To connect to the Virtual Machine you created, create an SSH connection. Now, to create an SSH connection with the VM to connect to the Virtual Machine.

  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 Azure Storage account is started and ready to be provisioned.

Chapter 7. Creating and uploading a customized RHEL system image to GCP using Red Hat Image Builder

The ability to create customized RHEL system images by using Red Hat Image Builder and upload those images to the Google Cloud Platform target environment is available.

7.1. Creating a customized RHEL system image for Google Cloud Platform using Red Hat Image Builder

You can create customized system images by using Red Hat Image Builder and upload those images to Google Cloud Platform so that you can start an instance from the image you uploaded.

Prerequisites

  • You have a valid Google account to share the image with.
  • You have a Red Hat account. Access Portal.
  • You have access to the Red Hat Image Builder.

Procedure

  1. Access Red Hat Image Builder on the browser of your preference.
  2. Click the Create image button.
  3. In the Image output window:

    1. From the dropdown menu, select the Release: Red Hat Enterprise Linux (RHEL) 8.3.
    2. Select Google Cloud Platform as the Target environment.

      Click Next.

  4. In the Target environment- Google Cloud Platform window, select a valid account type to share your image with, and Google account, Service account or 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.
  5. Enter the account email address or domain name, depending on the type of target environment you chose.

    Click Next.

  6. Un the Registration window, you have the option to:

  7. Optional: In the Additional package window, add packages to your image. See Chapter 4, Adding packages during image creation by Using Red Hat Image Builder.
  8. In the Review window, review the details about the image creation and click Create.

    Red Hat Image Builder starts to compose the RHEL 8.3 image for the x86_64 architecture and upload it to Google Cloud Platform. Then, it will share the image with the account you specified.

    You are redirected to the Red Hat Image Builder Images dashboard, where 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, Red Hat 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.

      Note

      The 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 to 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.

7.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

  1. From the Red Hat Image Builder dashboard, copy the image UUID of the image you created.
  2. Access /composes/{composeId} API endpoint.
  3. Click the Try it Out button to activate the composeId string path.
  4. Enter the UUID into the composes/{composeId} field in the API endpoint.
  5. 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"
        }
      }
    }
  6. From the Response body field, copy the image_name and project_id to access the image from the Google Cloud Platform environment.
  7. From your browser, access Google Cloud Shell.
  8. 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
  9. In the Authorize Cloud Shell window prompt, click Authorize to allow this and future calls that require your credentials.
  10. 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

  1. Verify that Compute Engine created the VM:

    $ gcloud compute instances describe INSTANCE_NAME
  2. Connect to the VM instance via SSH:

    $ gcloud compute ssh --project=PROJECT_ID --zone=ZONE INSTANCE_NAME

7.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

  1. From the Image Builder dashboard, copy the UUID image of the image you created.
  2. Access /composes/{composeId} API endpoint.
  3. Click the Try it Out button to activate the composeId string path.
  4. Enter the UUID into the composes/{composeId} field in the API endpoint.
  5. 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"
        }
      }
    }
  6. From the Response body field, copy the image_name and project_id to access the image from the Google Cloud Platform environment.
  7. From your browser, access Google Cloud Shell.
  8. 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
  9. In the Authorize Cloud Shell window prompt, click Authorize to allow this and future calls that require your credentials.
  10. Copy the image to your project by using the gcloud command:

    $ gcloud compute images create MY_IMAGE_NAME \
      --source-image-project PROJECT_ID_FROM_RESPONSE \
      --source-image IMAGE_NAME

    Where:

    • MY_IMAGE_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;

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

Legal Notice

Copyright © 2021 Red Hat, Inc.
The text of and illustrations in this document are licensed by Red Hat under a Creative Commons Attribution–Share Alike 3.0 Unported license ("CC-BY-SA"). An explanation of CC-BY-SA is available at http://creativecommons.org/licenses/by-sa/3.0/. In accordance with CC-BY-SA, if you distribute this document or an adaptation of it, you must provide the URL for the original version.
Red Hat, as the licensor of this document, waives the right to enforce, and agrees not to assert, Section 4d of CC-BY-SA to the fullest extent permitted by applicable law.
Red Hat, Red Hat Enterprise Linux, the Shadowman logo, the Red Hat logo, JBoss, OpenShift, Fedora, the Infinity logo, and RHCE are trademarks of Red Hat, Inc., registered in the United States and other countries.
Linux® is the registered trademark of Linus Torvalds in the United States and other countries.
Java® is a registered trademark of Oracle and/or its affiliates.
XFS® is a trademark of Silicon Graphics International Corp. or its subsidiaries in the United States and/or other countries.
MySQL® is a registered trademark of MySQL AB in the United States, the European Union and other countries.
Node.js® is an official trademark of Joyent. Red Hat is not formally related to or endorsed by the official Joyent Node.js open source or commercial project.
The OpenStack® Word Mark and OpenStack logo are either registered trademarks/service marks or trademarks/service marks of the OpenStack Foundation, in the United States and other countries and are used with the OpenStack Foundation's permission. We are not affiliated with, endorsed or sponsored by the OpenStack Foundation, or the OpenStack community.
All other trademarks are the property of their respective owners.