How to Create a Linux Virtual Machine (VM)

Every operating system (OS) has its pros and cons. Linux, for example, is an open-source operating system, well-known for its speed and configurability. Windows on the other hand, costs a business money, but is easier to use and has enterprise level support offerings. What if you can combine both? You can, with a Linux Virtual Machine.

After today’s technological advancements, you no longer have to stick to one OS. You can create a virtual machine with any OS on one computer, regardless of its underlying OS. In any case, this helps you to easily switch back and forth between operating systems. This is great for software development and running older software versions. 

In addition to this flexibility, one host can have any number of VMs running different operating systems on it. Needless to say, it saves money as you don’t need separate hardware to meet your business needs. 

Read on as I show you how to create a Linux virtual machine, starting from scratch. Once you know how to create a Linux VM, you can apply this knowledge to create any VM you need! First, though, let’s go over what exactly a virtual machine is.

Illustration showing a server with a blue box above it called 'virtualization'. Above this box are six virtual machine containers. Each one is divided up with an operating system layer and above this an application layer.
Why settle for one computer when you can have as many as you want!

What Is a Virtual Machine?

Simply put, a virtual machine is a software-based computer system that uses a host computer’s hardware resources. A VM sits on an abstraction layer residing between the VM and the hardware. In turn, this allows more than one VM to share the same resources. For instance, you can have many virtual machines inside a physical computer. Each VM can run a different operating system. Using hardware virtualization principles, each VM can also have a separate RAM, memory, disk, etc.

Essentially, your physical computer can run a Windows operating system while one or more VMs can run on Linux. Let’s now go over my step-by-step guide on how you can create a Linux VM on your computer. 

Get The Definitive Virtualization Guide Here

Create a Linux Virtual Machine in 4 Steps

Step 1: Download and Install Ubuntu

Many Linux distributions exist and Ubuntu is one of the most popular choices. In short, Ubuntu has a user-friendly interface, works well for cloud, IoT, and other applications where security is critical.

To create a Linux VM, download Ubuntu. You can then choose the 32-bit or 64-bit versions depending on your computer’s architecture. In general, 32-bit architecture is faster than a 64-bit equivalent, but 64-bit enables you to assign much more resources to the system. Often, you’ll select 64-bit for its ability to scale. Simply pick the one that meets your needs.

Step 2: Install the VirtualBox

Next, you need emulation software like VirtualBox. This virtualization tool allows your VM to run on your physical machine without having to reinstall the OS; it’s also free! Besides these advantages, you can also expect good community support and a ton of productivity features. What’s more, VirtualBox also works on all modern platforms similar to a paid-for alternative like VMware.

Download VirtualBox and the Oracle VM VirtualBox Extension Pack that comes with it. Go through the install steps and go with the default values when prompted. Provide permissions to your antivirus and firewalls to run VirtualBox. You may also have to select the folder for installing VirtualBox.

Now, it’s time to create your Linux virtual machine.

Step 3: Create a Virtual Machine 

After installing VirtualBox, double-click on the icon to open it. 

Following this, name your VM according to a corporate naming convention. 

Next, select Linux in the type and Ubuntu in the version dropdowns. Remember to select 32-bit or 64-bit, based on what you’ve downloaded. 

A screenshot of the virtual machine setup process that displays the name of the virtual machine, its operating system, and version.
Naming the virtual machine something vague isn’t great, define a naming standard first!

Now, allocate resources for your VM. The VirtualBox will ask you to select the memory you want to provide for your VM. This can be a bit tricky. Make sure to add enough memory for your VM and at the same time, leave sufficient for your host OS. If you have many VMs, allocate only the minimum needed to run each at first. You can increase as needed later once you know your resource overheads. 

Similarly, create a virtual hard drive for your VM. Decide how much hard drive space your VM needs and choose accordingly. Often, the minimum requirement is between 8GB to 15GB.

Next, select VirtualBox Disk Image (VDI) as the hard disk type.

An image showing the different hard disk types you can create for a Linux virtual machine.
Choosing a hard disk type is easy.

After this, your setup is complete; now, start the virtual machine.

Step 4: Start the Virtual Machine

To start the VM, click the Start button. When starting the first time, you may see some warnings and errors. Disregard them for now, most are logging missing resource information. Next, you’ll be asked whether you want to try or install Ubuntu. Go with the install option and a wizard will take you through the installation process.

On the first screen, select the two checkboxes and click Continue. On the next screen, select the “Erase disk and install Ubuntu” option. This will only erase the contents of the virtual hard drive you created earlier, and it won’t affect the host OS. Click the Install Now button on the bottom right-hand corner. 

Select your location and the keyboard layout in the next two steps respectively. Finally, give your VM a name followed by a password.

Once done, choose the restart option for all the changes to propagate. When your VM restarts, enter the password you created. Now, you’re all set to use your VM.

Final Thoughts

A Linux Virtual Machine on a Windows computer provides a lot of flexibility to switch between the two, without having to buy separate hardware. Setting up a Linux VM is easy, too. Download Ubuntu and VirtualBox and follow my instructions above for easy setup. After you go through the setup and the subsequent restart process, you can use your VM. 

Get The Latest TechGenix News Here

FAQ

How much will it cost to create a Linux VM?

No, you don’t have to pay anything to create a Linux virtual machine (VM) on Windows or any other operating system. Simply download Ubuntu and VirtualBox. When you open VirtualBox, a wizard will take you through the installation process. Keep the defaults and follow the instructions. At the end of the process, your Linux VM is ready.

Can I use any VM software for a Linux VM?

Many virtual machines (VM) softwares are available for creating a Linux VM. Some of your choices include:

Out of the above choices, Oracle VirtualBox is a popular one due to it being free and user-friendly. VirtualBox is great if you’re just starting out with VMs.  

Can I run both Windows and Linux on the same device?

Yes, you can run both operating systems on the same device. You have two different ways to achieve this. One option is to have a Linux VM on a Windows operating system. The other option is to install both operating systems. During boot, you can decide which operating system to use during that session. Many people today prefer to install a Linux VM because you can work across both operating systems seamlessly in the same session. 

Is Windows better than Linux?

Both Windows and Linux come with pros and cons, so it depends on your preferences. In general, Linux is open-source, free, comes with flexible configuration choices, and is secure. Windows, on the other hand, is easy to use and most applications are designed for it. Your choice just depends on your preference.

What is a Linux VM?

A Linux VM is a virtual machine (VM) that’s running Linux, even if the host system has a different operating system like Windows. This is possible due to hardware abstraction that allocates resources for the VM, despite being a part of the host system. A Linux VM provides the flexibility to switch between operating systems at any time. Note that a physical computer can have any number of virtual machines. 

Resources

TechGenix’s Troubleshooting Azure Linux VM Boot Errors Article

Learn about Linux VM boot errors and how to fix them here

TechGenix’s Managing Disk and File System Partitions in an Azure Linux VM Article 

Read about how Azure supports the Linux operating system here.

TechGenix’s Linux VM template in System Center Virtual Machine Manager Article

Find out how to create a Linux VM template in your System Central VMM here.

TechGenix’s How to Install Open-source PowerShell on Linux VM in Azure Article

Learn how to install open-source PowerShell on a Linux VM with this article here.

TechGenix’s VirtualBox or VMWare Article

Compare the benefits between VirtualBox and VMware in this article here.

TechGenix’s Benefits of Using VirtualBox Article

Learn why VirtualBox is a good choice for virtualization here.

Leave a Comment

Your email address will not be published.

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Scroll to Top