Skip to content

Generate and Create a Management Console AMI

This topic provides step-by-step instructions for creating the MC AMI.

There are two ways to generate the MC AMI:

  • Install the Management Console after the VMDK import

  • Install the Management Console during VMDK generation

Install the Management Console after the VMDK Import

In this approach, there are detailed steps to first create a VMDK file with Rocky Linux installed, upload it to an S3 bucket, import it as an AMI, and then launch an EC2 instance. After launching the instance, install and configure the Management Console (MC) on the EC2 instance.

Step 1: Generate VMDK for Rocky Linux 8

  1. Download and install the VirtualBox from VirtualBox.org.

  2. Create a New Virtual Machine:

    1. Open the VirtualBox, and then click New.

    2. Provide name for the VM (e.g., RockyLinux810).

    3. Select Linux as the Type and Red Hat 8.x (64-bit) as the Version.

    4. Click Next.

  3. Allocate Resources:

    1. Allocate resources (e.g., Memory: 12288 MB, CPU: 4).

    2. Click Next.

  4. Create a Virtual Hard Disk:

    1. Select Create a virtual hard disk now.

    2. Choose VMDK (Virtual Machine Disk) as the file type.

    3. Set the disk size (e.g., 62 GB).

    4. Click Finish.

  5. Download the Rocky Linux ISO from Official Rocky Linux page.
    reference: Rocky Linux 8.10 ISO.

  6. Mount the ISO File:

    1. Select the VM and click Settings.

    2. Go to the Storage tab.

    3. Click on the empty CD/DVD drive.

    4. Select Choose a disk file.

    5. Browse to the downloaded Rocky Linux ISO file and select it.

    6. Click OK.

  7. Start the VM and Install Rocky Linux:

    1. Select the VM and click Start. The VM will boot from the ISO file.

    2. Follow the installation prompts to install the Rocky Linux.

    3. Choose your language, keyboard layout, and other preferences.

    4. During the installation process, you will be prompted to create a user.

      1. Enter the following details:

        • Full Name: admin

        • Username: admin

        • Password: ManagementConsole2015

        • Confirm Password: ManagementConsole2015

      2. Select the Make this user an administrator checkbox, and then click Next.

    5. Choose your destination (the virtual hard disk) for installation.

    6. Click Begin Installation.

    7. Click Reboot system

  8. Log in to Rocky Linux:

    1. Log in with your created user account credentials.

    2. Verify that Rocky Linux is installed successfully.

  9. Prepare VMDK for Export:

    1. Shut down the VM.

    2. Select the VM and click FileExport Appliance

    3. Select the Rocky Linux VM and change the file extension from .ova to .ovf

      alt text

    4. Choose the destination for the exported files.

    5. Locate the VMDK file in the specified file location.

Creating and Using the Rocky Linux VMDK

Generating the VMDK is a one-time task (Step 1: Generate VMDK for Rocky Linux 8). After creation, upload the VMDK to Amazon S3 and import it as a base Rocky Linux AMI. You can then use this base AMI to install different MC versions. A new VMDK is only required if you change the operating system version—for example, when migrating from Rocky Linux 8 to Rocky Linux 9.

Step 2: Upload the VMDK to S3

  1. Open the AWS Management Console, and navigate to the S3 service.

  2. Create a new bucket (or use an existing one) to store the VMDK file.

  3. Upload the VMDK file to the S3 bucket. (Uploading may take 5-10 minutes.)

Step 3: Import VMDK to Create a Base AMI

  1. Open the AWS Management Console, and navigate to the EC2 Image builder service.

  2. In the left-hand menu, select ImagesImport Image.

  3. Click the Import Image button.

  4. Provide name, version and select the Base Image operating system as Red Enterprise Linux 8.

  5. Browse the VMDK file in s3 or enter the s3 VMDK URL.

  6. Attach the existing IAM role or create a new one which has access to import the VMDK.

  7. Start the import process and Import the Rocky Linux VMDK. (Import process will take about 5-10 mintues.)

Step 4: Launch EC2 Instance from Base AMI

  1. After the import is complete, locate the newly created AMI in the AMIs section.

  2. Select the AMI, and then click Launch Instance.

  3. Configure the instance details:

    • Instance Type: t3.xlarge
    • Security Group: ensure appropriate rules (e.g., allow SSH, HTTP, HTTPS). Refer to System Configuration
    • Key Pair: select or create a key pair for SSH access.
  4. Launch the instance. (It will take about 2-5 mintues.)

Step 5: Install MC RPM and Configure Instance

  1. Connect to the EC2 Instance:

    1. Open the AWS Management Console.

    2. Navigate to the EC2 service.

    3. Select the running instance and click Connect.

    4. Follow the instructions to connect to the instance via SSH.

  2. Install MC RPM:

    1. Upload the MC RPM package 24.05 or latest and required dependencies to the instance by using WinSCP or SFTP.

    2. Connect to the instance via SSH.

    3. Run following command

      sudo dnf update
      

    4. Install the MC RPM package. Refer to MC Installation Using RPM.

  3. Execute firewall commands required for Management Console. Refer to Moving Between IPv4 and IPv6.

  4. After Installation, verify if MC is up and running in the IP address provided by the instance.

Step 6: Create a New AMI from the Configured Instance

  1. In the EC2 Management Console, select the running instance.

  2. Click ActionsImage and templatesCreate image.

  3. Provide the name and details to create the image. This will create a new AMI with MC installed. (This process will take 5 minutes).

Note: Copy AMI to Other Regions and Make Public

Complete steps 7 and 8 only if you need to copy the AMI to other regions and make it public.

Step 7: Copy AMI to Multiple Regions:

  1. In the EC2 Management Console, navigate to the AMIs section.

  2. Select the newly created AMI.

  3. Click ActionsCopy AMI.

  4. Choose the target region and start the copying process.

  5. Repeat this process for each desired AWS region.

Step 8: Make AMIs Public:

  1. In the EC2 Management Console, navigate to the AMIs section.

  2. Select each AMI (in each region) that you want to make public.

  3. Click ActionsModify Image Permissions.

  4. Set the image to public.

Note: If you encounter any issues in AMI generation

If you encounter any issues in AMI generation with Amazon S3 access and Amazon EC2 instance launch, verify that the required permissions are correctly configured.

Install the Management Console during VMDK generation

This approach installs the MC on Rocky Linux during VMDK creation. After you create the VMDK, upload it to an S3 bucket and import it as an AMI. Use this AMI to launch an EC2 instance with the MC already installed and configured.

Step 1: Generate VMDK for Rocky Linux and Install MC

  1. Download and install the VirtualBox from VirtualBox.org.

  2. Create a New Virtual Machine:

    1. Open VirtualBox and click New.

    2. Name the VM (e.g., RockyLinux810).

    3. Select Linux as the Type and Red Hat 8.x (64-bit) as the Version.

    4. Click Next.

  3. Allocate Resources:

    1. Allocate resources (e.g., Memory: 12288 MB, CPU: 4)

    2. Click Next.

  4. Create a Virtual Hard Disk:

    1. Select Create a virtual hard disk now.

    2. Choose VMDK as the file type.

    3. Set the disk size (e.g., 62 GB).

    4. Click Next.

  5. Download the Rocky Linux ISO from the official page: Rocky Linux 8.10 ISO.

  6. Mount the ISO File:

    1. Select the VM and click Settings.

    2. Go to the Storage tab.

    3. Click on the empty CD/DVD drive.

    4. Select Choose a disk file.

    5. Browse to the downloaded Rocky Linux ISO file and select it.

    6. Click OK.

  7. Start the VM and Install Rocky Linux:

    1. Select the VM and click Start. The VM will boot from the ISO file.

    2. Follow the installation prompts to install Rocky Linux.

    3. Choose your language, keyboard layout, and other preferences.

    4. During the installation process, you will be prompted to create a user.

      1. Enter the following details:

        • Username: admin

        • Password: ManagementConsole2015

        • Confirm Password: ManagementConsole2015

    5. Select the Make this user an administrator checkbox, and then click Next.

    6. Choose your installation destination (the virtual hard disk).

    7. Click Begin Installation.

    8. Click Reboot system.

  8. Install MC in Rocky Linux:

    1. After you install Rocky Linux, sign in with the user account you created.

    2. If you aren't already connected to the internet, connect to the internet.

    3. Upload the MC RPM package above 24.05 and required dependencies to the VM using WinSCP or SFTP.

    4. Connect to the VM by using SSH or the VirtualBox console.

    5. Run the following command:

      sudo dnf update
      

    6. Install the MC RPM above 24.05 package. Refer to MC Installation Using RPM.

    7. Configure firewall rules required for the MC. Refer to Moving Between IPv4 and IPv6.

  9. Prepare VMDK for Export:

    1. Shut down the VM.

    2. Select the VM and click FileExport Appliance.

    3. Select the Rocky Linux VM and change the file extension from .ova to .ovf.

    4. Choose the destination for the exported files.

    5. Locate the VMDK file in the specified file location.

Step 2: Upload VMDK to S3

  1. Open the AWS Management Console, and navigate to the S3 service.

  2. Create a new bucket (or use an existing one) to store the VMDK file.

  3. Upload the VMDK file to the S3 bucket. (This process takes about 5–10 minutes.)

Step 3: Import VMDK to Create a Base AMI

  1. Open the AWS Management Console.

  2. Navigate to the EC2 Image builder service.

  3. In the left-hand menu, select ImagesImport Image.

  4. Click the Import Image button.

  5. Provide the necessary details for the import, such as the source URL (S3 bucket link) and the format (VMDK).

  6. Attach the existing IAM role or create a new one which has access to import the VMDK.

  7. Start the import process for the Rocky Linux VMDK. (This process takes about 5–10 minutes.)

Step 4: Launch EC2 Instance from Base AMI

  1. After the import is complete, locate the newly created AMI in the AMIs section.

  2. Select the AMI and click Launch Instance.

  3. Configure the instance details:

    • Instance Type: t3.xlarge

    • Security Group: Ensure appropriate rules (e.g., allow SSH, HTTP, HTTPS). Reference: System Configuration.

    • Key Pair: Select or create a key pair for SSH access.

  4. Launch the instance. (This process takes about 2-5 minutes.)

Step 5: Verify MC Installation on EC2 Instance

  1. Connect to the EC2 Instance:

    1. Open the AWS Management Console.

    2. Navigate to the EC2 service.

    3. Select the running instance and click Connect.

    4. Follow the instructions to connect to the instance via SSH.

  2. Verify MC Installation:

    1. Verify that the Management Console is running.

    2. Execute firewall commands required for Management Console. Refer to Moving Between IPv4 and IPv6.

    3. Verify that the Management Console is running by using the IP address provided by the instance.

    Note: Copy AMI to Other Regions and Make Public

    If you need to copy the AMI to different regions and make it public, refer to step 7 and 8.