Register now for better personalized quote!

How to create a Linux virtual machine with VirtualBox

Aug, 01, 2022 Hi-network.com

Linux is everywhere -- in phones, smart appliances, cloud storage services, cars, thermostats, and just about everything with an embedded system or a major third-party service.

It can also be on your desktop. Linux is a fantastic choice as a desktop operating system because it's incredibly reliable, secure, and more flexible than any other OS on the market. But for those who might be hesitant to install Linux over macOS or Windows, what can you do? One route that makes it very easy to test and use Linux, without doing anything to your primary operating system, is the virtual machine route. 

What is a virtual machine?

A virtual machine allows you to run a guest operating system on top of your host, without making any changes (other than installing the virtual machine platform) to your primary operating system. My virtual machine platform of choice is called VirtualBox, which can be installed on Linux, macOS, and Windows hosts. VirtualBox is free and very easy to use.

I'm going to walk you through the process of creating a Linux virtual machine with VirtualBox, so you can give the open-source operating system a try. I won't walk you through the process of installing VirtualBox, as that's as simple as installing any application on your computer.

With that said, let's get our virtual machine up and running.

Creating the virtual machine

1. Open VirtualBox

The first thing you'll do is open VirtualBox from your computer's desktop menu. Once the application is open, click Tools and then click New (Figure 1).

The VirtualBox main window shows I've already created quite a few virtual machines.

Image: Jack Wallen

2. Name your new guest operating system

I'm going to spin up a virtual machine for FerenOS, which is a Linux distribution. In the first window of the wizard (Figure 2), give the virtual machine a name, select the folder to house the files, select the type of operating system for the new virtual machine and the version, and then click Next.

Naming our new virtual machine.

Image: Jack Wallen

3. Configure RAM

In the next window, slide the Memory size slider to the right to increase the amount of RAM you want to allot to the machine (Figure 3).

Configuring the RAM for our new virtual machine.

Image: Jack Wallen

4. Create a virtual hard disk

Click Next and, in the resulting window (Figure 4), click Create to create a new virtual hard disk.

Creating a new virtual hard drive for our guest OS.

Image: Jack Wallen

In the next two windows, select VDI and then Dynamically allocated. In the final window, slide the slider to the right to increase the size of the virtual hard disk to however large you need, and make sure to select the folder to house the drive (Figure 5).

Sizing the virtual hard drive to meet your needs.

Image: Jack Wallen

Click Create and you'll be returned to the VirtualBox main window.

Configure your guest operating system

We can now configure our guest operating system. One thing you'll want to make sure to do (before you take this step) is to download the ISO file for the version of Linux you want to install.

1. Add the ISO image for installation

Select the virtual machine you just created from the left pane and then click Settings. In the resulting window, click Storage and then click the left + associated with Controller: IDE (Figure 6).

This is where you configure all aspects of your virtual machine.

Image: Jack Wallen

In the resulting window (Figure 7), click Add, and when your file manager opens, navigate to wherever it is you saved the ISO image for the Linux distribution you downloaded.

Adding an ISO image for installation.

Image: Jack Wallen

Once you've selected your ISO image, click Choose and then OK. You should now find yourself back at the VirtualBox main window, where you're ready to run the virtual machine.

Start the installation

Select the virtual machine you just created in the left navigation and click the Start button, which will launch the bootable image and -- depending on the Linux distribution you've chosen -- should land you at either the live image (where you can either test or install the guest operating system) or immediately install the guest (Figure 8).

You can now install Linux as your guest operating system.

Image: Jack Wallen

Make sure to go through the full installation process for the guest operating system you've chosen. In most cases, that will require clicking the Install icon on the desktop.

Congratulations, you just created your first virtual machine with Linux as a guest operating system. Enjoy kicking the tires of your new open-source platform.

See also

How to install Ubuntu Linux (It's easy!)How to run a Windows app on Linux with WineHow to get started with Git on LinuxHow to kill a process in Linux
  • How to install Ubuntu Linux (It's easy!)
  • How to run a Windows app on Linux with Wine
  • How to get started with Git on Linux
  • How to kill a process in Linux

tag-icon Hot Tags : Services & Software Operating Systems LINUX

Copyright © 2014-2024 Hi-Network.com | HAILIAN TECHNOLOGY CO., LIMITED | All Rights Reserved.