Skip to content

Instantly share code, notes, and snippets.

@ncoonrod
Last active March 17, 2022 21:43
Show Gist options
  • Select an option

  • Save ncoonrod/406a85c44154c23322ffaf994b918557 to your computer and use it in GitHub Desktop.

Select an option

Save ncoonrod/406a85c44154c23322ffaf994b918557 to your computer and use it in GitHub Desktop.
Installing RHEL 7.9 in Virtualbox 6.1

Installing RHEL 7.9 in Virtualbox 6.1

Download the trial from: https://access.redhat.com/downloads

Open Virtualbox, create a new Virtual Machine, and select the downloaded iso.

Boot from the ISO, install as normal. Be sure to set a secure root password, and create a new user that has administrative access.

On boot, login using your new user.

Enable Networking

By default, networking will not work with Virtualbox, so we have to enable it:

sudo vi /etc/sysconfig/network-scripts/ifcfg-enp0s3

Search for ONBOOT and set it to yes. It should look like:

ONBOOT=yes

Save and write the file. Then enter:

sudo systemctl restart network

Networking should work now.

Registering the VM

Time to register the machine with Redhat:

sudo subscription-manager register --username YOUR_USERNAME_HERE
sudo subscription-manager attach --auto

Now update your OS:

sudo yum update

Installing Virtualbox Guest Additions

Now to install VirtualBox Guest Additions, be sure to load the cd in Virtualbox VM, then go back into the terminal and enter:

sudo yum install gcc perl bzip2 kernel-headers "kernel-devel-uname-r == $(uname -r)"
sudo yum groupinstall 'Development Tools'
mkdir ~/cdrom
sudo mount /dev/cdrom ~/cdrom
cd ~/cdrom
sudo ./VBoxLinuxAdditions.run

Now reboot the VM. That's it! Be sure to disable root access via SSH.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment