Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 35 additions & 35 deletions docs/guides/virtualization/vbox-rocky.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,32 +8,32 @@ tags:
- virtualization
---

# Rocky on VirtualBox
# Rocky on VirtualBox®

## Introduction

VirtualBox® is a powerful virtualization product for both enterprise and home use. Once in a while, someone posts that they are having trouble getting Rocky Linux to run in VirtualBox®. It has been tested multiple times going back to the release candidate, and works just fine. The problems people usually report often involve video.
VirtualBox® is a powerful virtualization product for both enterprise and home use. Once in a while, someone posts that they are having trouble getting Rocky Linux to run in VirtualBox®. Testing and running VirtualBox® going back to the release candidate, works fine. The problems people usually report often involve video.

This document is an attempt to give a step-by-step set of instructions for getting Rocky Linux up and running in VirtualBox®. The machine used to build this documentation was running Linux but, you can use any of the supported operating systems.
This document is an attempt to give a step-by-step set of instructions for getting Rocky Linux up and running in VirtualBox®. The machine used to build this documentation ran Linux but you can use any of the supported operating systems.

## Prerequisites

* A machine (Windows, Mac, Linux, Solaris) with available memory, and hard disk space to build and run the VirtualBox® instance.
* VirtualBox® installed on your machine. You can find that [here](https://www.virtualbox.org/wiki/Downloads).
* A copy of the Rocky Linux [DVD ISO](https://rockylinux.org/download) for your architecture. (x86_64 or ARM64).
* Ensure that your OS is 64 bit and that hardware virtualization is turned on in your BIOS.
* Ensure that your OS is 64 bit and that hardware virtualization is on in your BIOS.

!!! Note

Hardware virtualization is 100% necessary in order to install a 64 bit OS. If your configuration screen shows only 32-bit options, then you need to stop and fix this before continuing.
Hardware virtualization is 100% necessary in order to install a 64 bit OS. If your configuration screen shows only 32-bit options, you must stop and fix this before continuing.

## Preparing The VirtualBox® Configuration
## Preparing the VirtualBox® configuration

Once you have VirtualBox® installed, the next step is to start it. With no images installed you will get a screen that looks something like this:

![VirtualBox Fresh Install](../images/vbox-01.png)

First, we need to tell VirtualBox® what our OS is going to be:
First, you need to tell VirtualBox® what your OS is going to be:

* Click "New" (saw tooth icon).
* Type a name. Example: "Rocky Linux 8.5".
Expand All @@ -44,51 +44,51 @@ Once you have VirtualBox® installed, the next step is to start it. With no i

![Name And Operating System](../images/vbox-02.png)

Next, we need to allocate some RAM for this machine. By default, VirtualBox® will automatically fill this to 1024 MB. That will not be optimum for any modern OS, including Rocky Linux. If you've got memory to spare, allocate 2 to 4 GB (2048 MB or 4096 MB) — or more. Keep in mind that VirtualBox® is only going to use this memory while the virtual machine is running.
Next, you need to allocate some RAM for this machine. By default, VirtualBox® will automatically fill this to 1024 MB. That will not be optimum for any modern OS, including Rocky Linux. If you have memory to spare, assign 2 to 4 GB (2048 MB or 4096 MB) — or more. VirtualBox&reg will only use this memory during virtual machine operation.

There's no screenshot for this one, just change the value based on your available memory. Use your best judgement.
No screenshot for this one, just change the value based on your available memory. Use your best judgment.

Now we need to set up the hard disk size. By default, VirtualBox® will automatically fill the "Create a virtual hard disk now" radio button.
You need to set up the hard disk size. By default, VirtualBox® will automatically fill the "Create a virtual hard disk now" radio button.

![Hard Disk](../images/vbox-03.png)

* Click "Create"

You will get a dialog box for creating various virtual hard disk types, and there are several hard disk types listed here. See the Oracle VirtualBox documentation for [more information](https://docs.oracle.com/en/virtualization/virtualbox/6.0/user/vdidetails.html) about selecting virtual hard disk types. For the purpose of this document, just keep the default (VDI):
You will get a dialog box for creating various virtual hard disk types. Several hard disk types are here. See the Oracle VirtualBox documentation for [more information](https://docs.oracle.com/en/virtualization/virtualbox/6.0/user/vdidetails.html) about selecting virtual hard disk types. For this document, keep the default (VDI):

![Hard Disk File Type](../images/vbox-04.png)

* Click "Next"

The next screen deals with the storage on the physical hard disk. There are two options. "Fixed Size" will be slower to create, faster to use, but less flexible in terms of space (if you need more space, you are stuck with what you created).
The next screen deals with the storage on the physical hard disk. Two options exist. "Fixed Size" will be slower to create, faster to use, but less flexible in terms of space (if you need more space, you cannot grow past what you created).

The default option, "Dynamically Allocated", will be faster to create, slower to use, but will give you the option to grow if your disk space needs to change. For the purpose of this document, we are just accepting the default of "Dynamically allocated."
The default option, "Dynamically Allocated", will be faster to create and slower to use, but will allow you to grow if your disk space needs to change.

![Storage On Physical Hard Disk](../images/vbox-05.png)

* Click "Next"

VirtualBox® now gives you the option to specify where you want the virtual hard disk file to be located as well as the option to expand the default 8 GB virtual hard disk space. This option is good, because 8 GB of hard disk space isn't enough to install, much less use, any of the GUI install options. Set this to 20 GB (or more) depending on what you want to use the virtual machine for, and how much free disk space you have available:
VirtualBox® now gives you the option to specify where you want the virtual hard disk file located. An option to expand the default 8 GB virtual hard disk space is also here. This option is good, because 8 GB of hard disk space is not enough to install any GUI install options, much less use. Set this to 20 GB (or more) depending on what you want to use the virtual machine for, and how much disk space you have available:

![File Location And Size](../images/vbox-06.png)

* Click "Create"

We've finished the basic configuration. You should have a screen that looks something like this:
You have finished the basic configuration. You will have a screen that looks something like this:

![Basic Configuration Complete](../images/vbox-07.png)

## Attaching The ISO Image
## Attaching the ISO image

Our next step is to attach the ISO image that you downloaded earlier as a virtual CD ROM device. Click on the "Settings" (gear icon) and you should get the following screen:
The next step is to attach the ISO image that you downloaded as a virtual CD ROM device. Click on the "Settings" (gear icon) and you will get the following screen:

![Settings](../images/vbox-08.png)

* Click the "Storage" item in the left-hand menu.
* Click the "Storage" item in the left menu.
* Under "Storage Devices" in the middle section, click the CD icon that says "Empty".
* Under "Attributes" on the right-hand side, click the CD icon.
* Under "Attributes" on the right side, click the CD icon.
* Select "Choose/Create a Virtual Optical Disk".
* Click the "Add" button (plus sign icon) and navigate to where your Rocky Linux ISO image is stored.
* Click the "Add" button (plus sign icon) and navigate to where your Rocky Linux ISO image is.
* Select the ISO and click "Open".

You should now have the ISO added to the available devices like this:
Expand All @@ -103,21 +103,21 @@ The Rocky Linux ISO image now shows selected under the "Controller:IDE" in the m

* Click "OK"

### Video Memory for Graphical Installations
### Video memory for graphical installations

VirtualBox® sets up 16 MB of memory to use for video. That is fine if you are planning on running a bare-bones server without a GUI, but as soon as you add graphics, that's not enough. Users who keep this setting often see a hanging boot screen that never finishes, or other errors.
VirtualBox® sets up 16 MB of memory to use for video. That is fine if you plan to run a bare-bones server without a GUI, but as soon as you add graphics that is not enough. Users who keep this setting often see a hanging boot screen that never finishes, or other errors.

If you are going to be running Rocky Linux with a GUI, you should allocate enough memory to easily run the graphics. If your machine is a bit thin on memory, adjust this value upwards 16 MB at a time until things run smoothly. Your host machine's video resolution is also a factor that you need to consider.
If running Rocky Linux with a GUI, assign enough memory to run the graphics. If your machine is a bit thin on memory, adjust this value upwards of 16 MB until things run smoothly. Your host machine's video resolution is also a factor that you need to consider.

Think carefully about what you want your Rocky Linux virtual machine to do, and try to allocate video memory that is compatible with your host machine and your other requirements. You can find more information on display settings from [Oracle's official documentation](https://docs.oracle.com/en/virtualization/virtualbox/6.0/user/settings-display.html).

If you've got plenty of memory, you can set this value to the maximum of 128 MB. To fix this before we start the virtual machine, click on the "Settings" (gear icon) and you should get the same settings screen that we got when attaching our ISO image (above).
If you have plenty of memory, you can set this value to the maximum of 128 MB. To fix this before you start the virtual machine, click on the "Settings" (gear icon) and you should get the same settings screen that you got when attaching our ISO image (above).

This time:

* Click on "Display" on the left-hand side.
* In the "Screen" tab on the right-hand side, you'll notice the "Video Memory" option with the default set to 16 MB.
* Change this to the value that you want. You can adjust this upwards by coming back to this screen anytime. In our example, we are selecting 128 MB now.
* Click on "Display" on the left side.
* In the "Screen" tab on the right side, you will notice the "Video Memory" option with the default set to 16 MB.
* Change this to the value that you want. You can adjust this upwards by coming back to this screen anytime. In this example, it is 128 MB.

!!! Tip

Expand All @@ -129,34 +129,34 @@ Your screen should look something like this:

* Click "OK"

## Starting The Installation
## Starting the installation

We've set everything up so that we can start the installation. Note that there are no particular differences in the install of Rocky Linux on a VirtualBox® machine compared to stand-alone hardware. The installation steps are the same.
You have set everything up so that you can start the installation. Note that no particular differences exist in installing Rocky Linux on a VirtualBox® machine compared to stand-alone hardware. The installation steps are the same.

Now that we have everything prepared for the install, you just need to click "Start" (green right-arrow icon) to start installing Rocky. Once you click past the language selection screen, your next screen is the "Installation Summary" screen. You need to set any of these items that pertain to you, but the following are musts:
Now that you have everything prepared for the install, you need to click "Start" (green right-arrow icon) to start installing Rocky. Once you click past the language selection screen, your next screen is the "Installation Summary." You need to set any of these items that pertain to you, but the following are musts:

* Time & Date
* Software Selection (if you want something besides the default "Server with GUI")
* Installation Destination
* Network & Hostname
* User Settings

If you are unsure of any of these settings, refer to the document for [Installing Rocky](../installation.md).
If you are unsure of any of these settings, see the document for [Installing Rocky](../installation.md).

Once you have finished the installation, you should have a running VirtualBox® instance of Rocky Linux.

After installing and rebooting you will get a EULA license agreement screen that you need to agree to, and once you've clicked "Finish Configuration", you should get either a graphical (if you chose a GUI option) or command line login. The author chose the default "Server with GUI" for demo purposes:
After installing and rebooting you will get a EULA license agreement screen that you need to agree to. When you have clicked "Finish Configuration", you should get either a graphical (if you chose a GUI option) or command line login. The author chose the default "Server with GUI" for demo purposes:

![A Running Rocky VirtualBox Machine](../images/vbox-11.png)

## Other Information
## Other information

It is not the intent of this document to make you an expert on all of the features that VirtualBox® can provide. For information on how to do specific things please check the [official documentation](https://docs.oracle.com/en/virtualization/virtualbox/6.0/user/).
This document does not intend to make you an expert on all of the features that VirtualBox® provides. For information on how to do specific things please check the [official documentation](https://docs.oracle.com/en/virtualization/virtualbox/6.0/user/).

!!! tip "Advanced Tip"

VirtualBox® offers extensive options at the command line using `VBoxManage`. While this document does not cover the use of `VBoxManage`, Oracle's official documentation provides [plenty of details](https://docs.oracle.com/en/virtualization/virtualbox/6.0/user/vboxmanage-intro.html) if you would like to research this further.

## Conclusion

It is easy to create, install, and run a VirtualBox® Rocky Linux machine. While far from an exhaustive guide, following the steps above should get you a running Rocky Linux install. If you use VirtualBox® and have a specific configuration that you would like to share, the author invites you to submit new sections to this document.
It is easy to create, install, and run a VirtualBox® Rocky Linux machine. While far from an exhaustive guide, following the steps above should get you a running Rocky Linux install. If you use VirtualBox® and have a specific configuration that you want to share, the author invites you to submit new sections to this document.