How to Install CentOS 8 on VirtualBox 2020
Enjoying this content? Subscribe to the Channel!
How to Install CentOS 8 on VirtualBox: The Complete Step-by-Step Guide!
Welcome back to Darren’s Tech Tutorials! If you’re looking for a powerful, stable Linux environment for development, server testing, or just learning, CentOS is a fantastic choice. The best part? You don’t need a dedicated physical machine to get started!
In this comprehensive guide, we’re going to walk through the entire process of installing CentOS 8 right inside VirtualBox. Whether you’re running Windows 10, macOS, or another operating system, VirtualBox allows us to run a full CentOS server virtually, making setup clean, safe, and portable.
Let’s dive in and get your new CentOS environment running!
Section 1: Gather Your Tools – Prerequisites
Before we start building our virtual machine (VM), we need to ensure we have the necessary software downloaded.
1. Oracle VM VirtualBox
If you don’t already have it, download and install the latest version of Oracle VM VirtualBox. This free, open-source hypervisor is what allows us to host our CentOS server.
2. The CentOS 8 ISO File
You need the installation media. Download the official CentOS 8 ISO file. Make sure you know where the file is saved on your system, as we’ll need to point VirtualBox to it shortly.
Section 2: Creating Your Virtual Machine
The first step in VirtualBox is defining the hardware specifications for our new virtual server. This process is the same whether you are on Windows, Mac, or Linux.
Step 1: Start the VM Creation Wizard
- Open VirtualBox Manager.
- Click the New button in the toolbar.
- A wizard window will open, prompting you for details.
Step 2: Configure the Basic Settings
- Name: Give your VM a descriptive name, such as
CentOS 8 Server. - Machine Folder: Select a location on your hard drive where the VM files will be stored.
- Type: Select
Linux. - Version: Select
Red Hat (64-bit). (CentOS is based on Red Hat Enterprise Linux.)
Step 3: Allocate Memory (RAM)
- For a stable server environment, we recommend allocating at least 4096 MB (4 GB) of RAM. If you plan on using the graphical interface (GUI), more RAM is always better. Ensure you do not allocate more than 50% of your host computer’s available memory.
Step 4: Create the Virtual Hard Disk
- Select Create a virtual hard disk now.
- Click Create.
- Hard Disk File Type: Use the default, VDI (VirtualBox Disk Image).
- Storage on Physical Hard Disk: Select Dynamically Allocated. (This means the virtual disk file will only grow as you use storage, saving space.)
- File Location and Size: We recommend at least 25 GB for the drive size. Click Create.
Your new VM stub now appears in the VirtualBox Manager list!
Section 3: Mounting the Installation Media
Our new VM is created, but it’s an empty computer. We need to insert the installation CD (our ISO file) so it can boot the installation program.
- Select your new
CentOS 8 ServerVM in the list and click Settings. - Navigate to the Storage section.
- Under the Storage Tree, select the Empty CD icon under the IDE Controller.
- On the right-hand panel, click the small CD icon next to the “Optical Drive” dropdown.
- Select Choose a disk file… and navigate to where you saved the CentOS 8 ISO file.
- Click OK to save the settings.
The CentOS installation media is now mounted and ready to boot!
Section 4: The Step-by-Step CentOS 8 Installation Process
Now we initiate the virtual machine and follow the standard installation prompts.
Step 1: Boot the VM
- Select your
CentOS 8 Serverand click the Start button. - The VM will boot, and you should see the CentOS boot menu. Use your arrow keys to select Install CentOS Linux 8 and press Enter.
Step 2: Initial Setup Screens
- Language Selection: Select your preferred language and click Continue.
- You will now arrive at the main Installation Summary screen. We need to configure four key areas before continuing:
Step 3: Crucial Configuration Steps
1. Software Selection
- Under the Software section, click Software Selection.
- For a powerful development or testing server, we recommend selecting Server with GUI (if you want a graphical desktop) or Minimal Install (if you prefer a streamlined, command-line-only server). Make your choice and click Done.
2. Installation Destination (Partitioning)
- Under the System section, click Installation Destination.
- Since this is a brand new virtual hard drive, the easiest route is to select the local VirtualBox disk and choose Automatic partitioning.
- Click Done.
3. Network and Host Name
- Under the System section, click Network and Host Name.
- Locate the network adapter toggle switch and flip it ON. This will ensure your server receives an IP address from your host machine and has internet connectivity.
- Set a desired Host Name (e.g.,
centos-test-server). - Click Done.
4. User Settings
- Under the User Settings section, click Root Password. Set a strong root password and confirm it.
- If desired, click User Creation to set up a standard user account.
Step 4: Begin Installation
Once all items in the Installation Summary are configured, the Begin Installation button at the bottom right will become active. Click it!
The installation will now proceed. This process usually takes 10 to 30 minutes, depending on your system speed.
Step 5: Final Reboot
When the installation is complete, click Reboot.
Crucial Step: After clicking Reboot, VirtualBox may automatically eject the installation media, but sometimes it doesn’t. If the VM tries to boot back into the installer, manually go to Devices > Optical Drives > Remove disk from virtual drive while the machine is shutting down or before it fully reboots.
The machine will now boot into your freshly installed CentOS 8 system!
Conclusion: Success and Next Steps!
Congratulations! You have successfully installed CentOS 8 on VirtualBox. You can now log into your new server using the root password or the standard user account you created during setup. You are running a professional-grade Linux server right inside your host operating system!
This configuration is perfect for experimenting with server technologies, practicing system administration, or running development containers.
If this guide helped you get your CentOS environment up and running, please give this post a share and head over to the Darren’s Tech Tutorials channel to Like the video and Subscribe for more clear, accessible tech guides! Happy computing!