This tutorial explains how to set up a practice lab on VMware Workstation or VirtualBox to prepare for the RHCSA/RHCE exam.
VMware Workstation and VirtualBox are the two most popular software programs that allow you to simulate computers. You can use these programs to create a computer network in a virtual environment without purchasing physical computers and networking equipment.
Choosing the program
VirtualBox is free software. It provides all essential features. VMware Workstation provides many advanced features but it is paid software. If you are a student or need software only for practice, you can use VirtualBox. If you are an instructor or need software for some complex tasks such as creating LABs and exams for students and making video tutorials, you should use VMware Workstation. You can choose any one of these based on your requirement and budget.
Downloading and installing
You can download the latest version of VirtualBox from the following website.
https://www.virtualbox.org/
You can purchase and download the VMware Workstation from the following website.
https://www.vmware.com/in/products/Workstation-pro.html
After downloading VirtualBox or VMware Workstation, you can install it on any computer that has the minimum required configuration to set up an RHCSA/RHCE lab.
Host requirements
Virtual computers created on VMware and VirtualBox use the hardware resources of the host computer. You can create virtual computers only if the host computer has sufficient resources.
To set up RHCSA/RHCE lab environment, we need at least two virtual computers having the following configuration.
Configuration | Computer1 | Computer2 |
Hard disk | 20GB | Minimum 10GB, 20GB recommended |
RAM | 2GB | Minimum 1GB, 2GB recommended |
CPU | 1 | 1 |
NIC | 1 | 1 |
DVDROM | 1 | 1 |
To create two virtual computers with the above configuration, you need a laptop or a desktop with at least a dual-core processor, 8GB RAM, and 40GB of free disk space. If a computer has these configurations, you can use the computer to build a virtual RHCSA/RHCE lab.
Cloning feature
VMware Workstation and VirtualBox support the cloning feature. This feature allows us to create a clone of the existing virtual computer. This feature makes the process of creating virtual computers fast. For example, if we need two virtual computers with the same hardware and software configuration, we only need to create and configure the first virtual computer. To create the second virtual computer, we can use the cloning feature.
Folder/directory structure
You can store a virtual machine on any partition that has enough free space. Create a folder or directory on the partition that has at least 40GB of free disk space. Create two sub-folders in the folder. We will use these folders to store the virtual hard disk of virtual computers. Use a descriptive name for these folders.
Setting up RHCSA/RHCE lab on VirtualBox
Click the Add button on the home screen of VirtualBox.
The first screen of the virtual machine creation wizard has four settings: Name, Machine Folder, Type, and Version.
Enter the name RedHatServer1, select Linux as the operating system type, and Red Hat (64 bit) as the version. Use the Browse option to select the folder you created to store this machine. Click Next to continue.
On the next screen, specify the RAM size you want to be allocated to the virtual machine. Move the slider to the right side to specify 2GB (2048MB) RAM and click Next.
On the next screen, we need to select a hard disk to store RHEL. Select the second option and click Create.
The next screen allows us to select the hard disk file type. VirtualBox supports three hard disk file types: VDI (VirtualBox Disk Image), VHD (Virtual Hard Disk), and VMDK (Virtual Machine Disk). These file types represent VirtualBox, Microsoft, and VMware disk image formats.
If you want to use this virtual machine only in VirtualBox, select VDI. If you want to use this virtual machine in VirtualBox and Microsoft's Virtual PC, select VHD. To use this virtual machine in VirtualBox and VMware Workstation, select VMDK.
Keep default and click Next.
There are two methods to allocate storage for the virtual machine. These methods are a fixed allocation method and a dynamic allocation method. The first method reserves the entire specified disk space right away. The second method uses the amount of disk space that is needed for the storage without reserving the entire disk capacity.
You can also split the hard disk file into several files of up to 2GB each. To do this, click the 'Split into files of less than 2GB' option. If you have a plan to move this virtual machine to another computer or a USB drive, select this option.
Keep the default 'Dynamically allocated' option selected and click Next.
The next screen allows us to set the hard disk size and location to store the hard disk file. Select the folder you have created to store the hard disk of this virtual machine and move the slider to the right side to specify the size of 20GB and click Create.
The virtual machine creation wizard creates the new virtual machine with the selected configuration. VirtualBox lists all virtual machines on the left side of the home screen. When you select a virtual machine, VirtualBox displays the configuration of the selected machine on the right side.
Installing RHEL on the virtual machine
Insert the RHEL installation disk in the physical DVD drive of the host system, select the virtual machine from the left pane and click the Start button in the right pane. If you have the RHEL ISO image stored on the hard disk, you can also use that to install RHEL. To use the RHEL ISO image, you have to attach it.
When you power on a virtual machine that does not contain an operating system, it checks the attached DVD drive for an installation disk. If it finds an installation disk, it uses that to install the OS. If it does not find an installation disk, it prompts the user to attach an ISO image.
To attach an ISO image, click the Browse icon, click Add, select the ISO image file from the hard disk, select the ISO image file on the Optical Disk Selector screen, and click Start.
The following image shows the above steps.
When you click Start on the previous screen, the virtual machine boots from the ISO image and starts the RHEL installation process.
I have already explained the RHEL installation process in the following tutorial.
RHEL Installation Step-by-Step Explained with Screenshots
You can Install RHEL on the virtual machine by following the above tutorial. After the installation, your first virtual machine will be ready.
Creating clone
For RHCSA/RHCE lab, we need two virtual computers with RHEL installation. We have prepared one computer. To prepare a second computer, we can use the cloning feature. To create the clone, select the virtual machine from the left pane and right click and click the Clone option.
The cloning process starts in the wizard. On the first screen of the wizard, enter the name (RedHatServer2) of the new virtual machine and select the folder you created for the second virtual machine. Leave remaining settings intact and click the Next button.
On the next screen, select the Full clone and click Clone.
The cloning process takes a few minutes.
Once the cloning is done, the new virtual machine will be listed in the left pane of the home screen.
We have successfully created the necessary virtual computers with RHEL installation for RHCSA/RHCE lab on VirtualBox.
Setting up RHCSA/RHCE lab on VMware Workstation
The process for setting up RHCSA/RHCE Lab on VMware Workstation is almost identical to the process for setting up RHCSA/RHCE Lab on VirtualBox. In this section, we will only discuss the steps in detail that are different and apply only to VMware Workstation. We will discuss identical steps briefly.
Click File and click New Virtual Machine.
The New Virtual Machine creation wizard starts. On the first screen, we have two options: typical and custom. The first option includes only necessary settings. The second option includes advanced settings for hardware customization. Select the first option and click Next.
As mentioned earlier, VMware Workstation includes many advanced features. The next screen presents one of them. This feature can install selected OS in unattended mode. If you want to use this feature, provide the source of the installation. If you have the installation disk, insert it into the optical drive and select the first option. If you have the ISO image file of the installation disk, select the second option and specify the location of the file.
Since we need custom installation of RHEL, we will not use this feature. Select the third option and click Next.
If we select the third option, the wizard creates the virtual machine with a blank hard disk.
On the next screen, select Linux as the Guest operating system and Red Hat Enterprise Linux 8 64 bits as the version.
On the next screen, enter the name of the virtual machine and the location of the folder you created to store the virtual machine. You can use the Browse button to select the folder.
On the next screen, set the disk size to 20GB and select the option Store the virtual disk as a single file.
The wizard automatically assigns the required hardware to the virtual machine. On the next screen, it displays a summary of the assigned hardware. If you want to customize any hardware, you can use the Customize hardware option.
If the wizard assigns memory less than 2GB, set memory to 2GB and click Finish.
The wizard creates a new virtual machine with the specified configuration. VMware Workstation lists virtual machines in the left pane of the home screen.
Installing RHEL on the virtual machine
If you have the RHEL installation disk, insert it into the optical drive and power on the virtual machine. If you have the RHEL ISO image stored on the hard disk, attach it to the optical drive of the virtual machine.
To attach the ISO image to the optical drive, select the machine in the left pane, click CD/DVD option in the right pane, select the Use ISO image file, click the Browse button and select the ISO image file.
Either insert the RHEL disk in the optical drive or attach the ISO image file and start the virtual machine. The virtual machine boots from the installation disk and presents the first screen of the installation process.
Install RHEL on the virtual machine. After the installation, our first virtual machine is ready.
Creating the second virtual machine
You can create a new virtual machine by following the instruction given above or you can clone the first virtual machine. To clone the first virtual machine, select it from the left pane and do right-click. On the Right-click context menu, click Manage and click Clone.
The cloning process starts in the wizard. Click Next.
VMware Workstation allows us to save snapshots of a virtual machine. A snapshot is a particular state of a virtual machine. For example, you make some configuration changes and create a snapshot. The snapshot reflects the changes. When creating a clone, you can specify the snapshot to create a clone with the configurations saved in the snapshot.
Select the first option and click Next.
On the next screen, select the Create a full clone option.
On the next screen, enter the name of the new virtual machine and select the folder you created to store the second virtual machine, and click Finish.
The cloning process takes a few minutes.
Click Close to close the cloning wizard.
VMware Workstation lists the new virtual machine in the left pane of the home screen.
We have successfully created necessary virtual computers with RHEL installation for RHCSA/RHCE lab on VMware Workstation.
Setting up the lab
By default, VMware and VirtualBox neither create a virtual network nor add a virtual computer to an existing virtual network. To set up a virtual network from the virtual computers, first, we need to create a virtual network. Then, we need to virtual computers to the virtual network.
The following tutorial explains this process step-by-step.
RHCE Practice Lab initial Configurations Explained
Watch the Video Version of this Tutorial
That’s all for this tutorial. In this tutorial, we learned how to create virtual computers to practice RHCSA/RHCE exam topics.