Installing Red Hat Enterprise Linux (RHEL) 9 in VirtualBox

Installing Red Hat Enterprise Linux (RHEL) 9 in VirtualBox

Installing Red Hat Enterprise Linux (RHEL) 9 in VirtualBox involves several steps: creating a virtual machine, configuring the VM settings, and performing the RHEL installation. This detailed guide will walk you through the process.

1. Prerequisites

2. Create a New Virtual Machine

2.1 Open VirtualBox and Create a New VM

  1. Open VirtualBox and click on New to create a new virtual machine.
  2. Name and Operating System:
    • Name: Give your VM a name, e.g., “RHEL9”.
    • Type: Linux.
    • Version: Red Hat (64-bit).
  3. Click Next.

2.2 Memory Size

  • Allocate memory (RAM) to your VM. A minimum of 2 GB is recommended, but 4 GB or more is preferred for better performance.
  • Click Next.

2.3 Hard Disk

  • Create a Virtual Hard Disk:
    • Select Create a virtual hard disk now.
    • Click Create.
  • Hard Disk File Type:
    • Select VDI (VirtualBox Disk Image).
    • Click Next.
  • Storage on Physical Hard Disk:
    • Choose Dynamically allocated.
    • Click Next.
  • File Location and Size:
    • Set the disk size to at least 20 GB.
    • Click Create.

3. Configure VM Settings

3.1 Adjust General Settings

  1. Select the VM (RHEL9) in VirtualBox and click Settings.
  2. System:
    • Under the Motherboard tab, ensure the Floppy device is unchecked.
    • Under the Processor tab, allocate 2 or more CPUs if available.
    • Enable Enable PAE/NX.
  3. Display:
    • Under the Screen tab, allocate at least 128 MB of Video Memory.
    • Enable 3D Acceleration if desired.
  4. Storage:
    • Select the Empty CD/DVD drive under the Controller: IDE.
    • Click the disk icon and choose Choose a disk file.
    • Locate and select the RHEL 9 ISO file.
  5. Network:
    • Under the Adapter 1 tab, select Attached to: NAT or Bridged Adapter for internet access.
  6. Click OK to save the settings.

4. Install Red Hat Enterprise Linux 9

4.1 Start the VM

  1. Select the VM (RHEL9) in VirtualBox and click Start.
  2. The VM will boot from the RHEL 9 ISO. Select Install Red Hat Enterprise Linux 9 from the boot menu and press Enter.

4.2 Begin Installation

  1. Language Selection:
    • Choose your language and click Continue.
  2. Installation Summary:
    • Localization:
      • Keyboard: Choose the desired keyboard layout.
      • Language Support: Confirm the selected language.
      • Time & Date: Set your time zone.
    • Software:
      • Installation Source: Should be set to the local media (the ISO).
      • Software Selection: Choose the base environment, e.g., Server with GUI, and any additional components you need.
    • System:
      • Installation Destination: Select the virtual hard disk and choose Automatic partitioning.
      • Kdump: Leave it enabled unless you have a specific reason to disable it.
      • Network & Hostname: Configure the network connection and set the hostname.
  3. Click Begin Installation.

4.3 Configure User Settings

  • While the installation is in progress, set the Root Password and create a user account with administrative privileges.

5. Complete Installation

  1. Once the installation is complete, click Reboot.
  2. Remove the ISO from the virtual CD/DVD drive in VirtualBox.
  3. The VM will reboot into your new RHEL 9 installation.

6. Post-Installation Steps

6.1 Update the System

  • Open a terminal and update the system:bash

sudo dnf update -y

6.2 Install VirtualBox Guest Additions

  1. Insert Guest Additions CD Image:
    • In the VirtualBox VM window, go to Devices > Insert Guest Additions CD Image.
  2. Mount the CD Image:

sudo mount /dev/cdrom /mnt

3. Run the Installer:

sudo /mnt/VBoxLinuxAdditions.run

4. Reboot the VM:

sudo reboot

By following these steps, you should have a fully functional RHEL 9 installation in VirtualBox. This setup provides a flexible environment for testing, development, or learning purposes.

Comments

No comments yet. Why don’t you start the discussion?

Leave a Reply

Your email address will not be published. Required fields are marked *