How to Install Red Hat Enterprise Linux 9 on Oracle VirtualBox: A Simple Guide for Everyone

This guide makes installing Red Hat Enterprise Linux 9 (RHEL 9) on Oracle VirtualBox easy for everyone, whether you’re new to Linux or an IT pro. We’ll also explain why Rocky Linux 9, a free alternative that works the same as RHEL 9, is a great choice. The steps are clear, straightforward, and written in plain English for an international audience. Let’s get started!

What Is RHEL 9 and Why Use It?

RHEL 9 is a powerful operating system used for servers, workstations, and learning Linux. It’s stable, secure, and has tools for running apps and containers. VirtualBox lets you test RHEL 9 on your computer without changing your main system.

Rocky Linux 9 is a free version of RHEL 9, offering the same features without needing a paid account. We recommend using Rocky Linux 9 for this guide because it’s cost-free and identical to RHEL 9.

What You Need

Before starting, make sure you have:

  • A computer with 8 GB RAM (16 GB is better), 20 GB free disk space, and a 64-bit processor.
  • Oracle VirtualBox installed (download from virtualbox.org).
  • An internet connection for downloading files and updates.
  • For RHEL 9: A free Red Hat account from developers.redhat.com.
  • For Rocky Linux 9: No account needed; download the ISO from rockylinux.org.

Step-by-Step Installation

Step 1: Download the ISO File

  1. For RHEL 9:
    • Go to developers.redhat.com, sign in or create a free account.
    • Find Red Hat Enterprise Linux 9 in the Downloads section and download the RHEL 9.3 Binary DVD ISO (x86_64).
  2. For Rocky Linux 9 (Recommended):
    • Visit rockylinux.org and download the Rocky Linux 9 DVD ISO (x86_64). No account needed.
  3. Check the ISO:
    • Make sure the ISO file isn’t broken by checking its SHA256 checksum:
      • On Linux, open a terminal and type:sha256sum /path/to/rhel-9.3-x86_64-dvd.iso # or Rocky-9.3-x86_64-dvd.iso
      • On Windows, use:certutil -hashfile C:\path\to\rhel-9.3-x86_64-dvd.iso SHA256 # or Rocky-9.3-x86_64-dvd.iso
      • Compare the result with the checksum on the Red Hat or Rocky Linux website.

Step 2: Set Up VirtualBox

  1. Install VirtualBox:
    • Download and install VirtualBox from virtualbox.org if you haven’t already.
  2. Create a Virtual Machine (VM):
    • Open VirtualBox and click New.
    • Name your VM (e.g., “RHEL 9” or “Rocky 9”).
    • Set Type to “Linux” and Version to “Red Hat (64-bit).”
    • Give it 4–8 GB RAM and a 20 GB virtual hard disk (choose VDI, dynamically allocated).
  3. Adjust Settings:
    • Select your VM, click Settings:
      • System: Check “Enable EFI” and assign 2 or more CPU cores.
      • Storage: Under “Controller: IDE,” click the disk icon, select “Choose a disk file,” and pick your RHEL 9 or Rocky Linux 9 ISO from your hard drive.
      • Network: Set Adapter 1 to “NAT” for internet.
      • Display: Set video memory to 128 MB.
    • Click OK to save.

Step 3: Install the Operating System

  1. Start the VM:
    • Select your VM and click Start. It should boot from the ISO.
    • Choose Install Red Hat Enterprise Linux 9 or Install Rocky Linux 9.
  2. Use the Installer:
    • Select your language and keyboard, then click Continue.
    • In the Installation Summary:
      • Time & Date: Choose your timezone.
      • Keyboard: Check or add your keyboard layout.
      • Installation Destination: Select your virtual disk and choose Automatic partitioning (or Custom if you’re experienced).
      • Network & Hostname: Turn on networking and set a name (e.g., “rhel9-test”).
      • Software Selection: Pick “Server with GUI” for a desktop or “Minimal Install” for a basic server.
    • Set a root password and create a user account. Check “Make this user administrator” for full control.
  3. Start Installation:
    • Click Begin Installation. This takes 10–20 minutes.
  4. Reboot:
    • Click Reboot System. Before restarting, go to Settings > Storage and remove the ISO.

Step 4: Set Up After Installation

  1. Log In:
    • Sign in with your user account or root.
  2. Register (RHEL 9 Only):
    • For RHEL 9, run these commands to get updates:sudo subscription-manager register sudo subscription-manager attach --auto
    • For Rocky Linux 9, skip this step—updates are free.
  3. Update the System:
    • Run:sudo dnf update -y
  4. Add Useful Tools:
    • Install helpful software:sudo dnf install vim curl git -y
  5. Install Cockpit (Optional):
    • Add a web-based control panel:sudo dnf install cockpit -y sudo systemctl enable --now cockpit.socket
    • Open a browser and go to https://<your-vm-ip>:9090.

Troubleshooting Problems

If something goes wrong, try these fixes:

  • “No bootable medium found!”:
    • Check Settings > Storage to ensure the ISO is attached. Make sure the optical drive is first in Settings > System > Boot Order.
  • “Requires x86-64 CPU”:
    • Ensure Version is “Red Hat (64-bit)” in Settings > General. Turn on VT-x/AMD-V in your computer’s BIOS.
  • Black Screen or Won’t Boot:
    • Verify the ISO checksum. Try turning EFI on or off in Settings > System. Add more RAM or CPUs.
  • ISO Not Working:
    • If your DVD ISO on your hard drive fails, confirm it’s attached in Settings > Storage. Re-download if the checksum is wrong. Use a simple file path (e.g., C:\ISOs\Rocky-9.3-x86_64-dvd.iso).

Why Use Rocky Linux 9?

Rocky Linux 9 is free and works exactly like RHEL 9 because it’s built from the same code. You get the same tools, commands, and stability without needing a Red Hat account. It’s perfect for learning, testing, or running servers, and it’s supported by a friendly community. For this guide, we suggest using Rocky Linux 9’s ISO to save money and get the same experience.

Wrapping Up

You’ve installed RHEL 9 or Rocky Linux 9 on VirtualBox—great job! Now you can explore Linux, run containers with Podman, or set up a web server. Both systems are powerful and easy to use in VirtualBox.

Check out our guides on Setting Up a Web Server or visit docs.rockylinux.org. Share your setup on X or leave a comment below. Download our checklist to stay on track!

SUBSCRIBE OUR NEWSLETTER
I agree to have my personal information transfered to MailChimp ( more information )
Join us by subscribing to our newsletter and learn IT subjects for free
We hate spam. Your email address will not be sold or shared with anyone else.

Leave a Comment

Scroll to Top