How to Create and Run a Virtual Machine on Linux


Virtual machines allow you to run multiple operating systems on a single physical machine. This can be very useful for testing software, running legacy applications, or creating isolated environments for development or testing. In this article, we’ll show you how to create and run virtual machines on Linux using VirtualBox.

Using VirtualBox

VirtualBox is a free, open-source virtualization software developed by Oracle Corporation. It allows users to create and run virtual machines (VMs) on a single physical computer, enabling multiple operating systems to coexist and function simultaneously. VirtualBox is available for various host operating systems, including Windows, macOS, Linux, and Solaris.

VirtualBox provides a feature-rich, user-friendly interface that simplifies the process of creating, configuring, and managing virtual machines. It supports a wide range of guest operating systems, including various versions of Windows, Linux, BSD, and others. Some notable features of VirtualBox include:

  • Snapshot functionality: Users can save the current state of a VM and revert to it later, allowing for easy testing and experimentation without the risk of damaging the virtual environment.
  • Seamless mode: This feature allows for the seamless integration of guest operating system windows with the host desktop, improving the overall user experience.
  • Shared folders: VirtualBox enables users to share folders between the host and guest systems, simplifying file exchange and improving overall workflow.
  • USB support: VirtualBox can redirect USB devices from the host machine to the guest operating system, enabling the use of peripherals such as printers, flash drives, and webcams within VMs.
  • Network options: Users can configure various network settings for VMs, including NAT, bridged networking, and internal networking, facilitating a wide range of network scenarios.

Overall, VirtualBox is a powerful, versatile, and easy-to-use virtualization solution suitable for personal, educational, and professional use.

Step 1: Open Terminal

Open the terminal by pressing Ctrl + Alt + T on your keyboard or by searching for it in the applications menu.

Step 2: Install VirtualBox

You can download the latest version of VirtualBox from the official website ( Once downloaded, you can install it using your package manager.

On Debian/Ubuntu-based distros, run:

sudo apt install virtualbox

On Fedora/RPM-based distros, run:

sudo dnf install VirtualBox

On Arch-based distros, run:

sudo pacman -S virtualbox

Step 3: Create VM

Once VirtualBox is installed, you can create a new virtual machine by clicking the “New” button in the main window. This will launch the New Virtual Machine wizard, which will guide you through the process of creating a new virtual machine. Here are the steps:

  1. Choose a name and operating system for your virtual machine.
  2. Set the amount of memory and CPU cores you want to allocate to the virtual machine.
  3. Create a new virtual hard disk or use an existing one.
  4. Set the size and format of the virtual hard disk.

Once you have completed the wizard, your new virtual machine will appear in the main VirtualBox window.

Step 4: Configure VM

Before you can start the virtual machine, you may need to configure some additional settings. Here are a few things you may want to configure:

Network: By default, the virtual machine will use the NAT network mode, which allows it to access the internet but not other devices on your network. If you want to access the virtual machine from other devices on your network, you can switch to the Bridged or Host-only network modes.

Shared folders: You can share folders between your host machine and the virtual machine by creating a shared folder in VirtualBox and then mounting it in the virtual machine.

Guest additions: Installing the VirtualBox Guest Additions in the virtual machine can improve performance and add additional features, such as better graphics and file sharing.

Step 5: Run VM

To start the virtual machine, simply select it in the VirtualBox window and click the Start button. This will launch the virtual machine in a new window, which will display the boot process of the operating system you installed. Once the operating system has booted, you can use it just like you would on a physical machine.

Using KVM, QEMU, and Virt-Manager

QEMU, KVM, and Virt-Manager are tools used for virtualization on Linux systems. They work together to create and manage virtual machines, allowing you to run multiple operating systems on a single physical machine. Here’s an overview of each tool:

  • QEMU (Quick Emulator): QEMU is an open-source emulator and virtualization tool that can run various guest operating systems. It can emulate a wide range of hardware, from CPUs to peripheral devices. QEMU performs hardware virtualization by translating guest system calls to host system calls, allowing the guest OS to run on the host system.
  • KVM (Kernel-based Virtual Machine): KVM is a virtualization technology built into the Linux kernel, allowing it to act as a hypervisor for virtual machines. KVM leverages hardware virtualization features available in modern CPUs (Intel VT-x and AMD-V) to provide near-native performance for guest operating systems. KVM works alongside QEMU to manage and run virtual machines efficiently.
  • Virt-Manager (Virtual Machine Manager): Virt-Manager is a user-friendly graphical interface for managing virtual machines. It is built on top of libvirt, a library for interacting with various virtualization technologies, including QEMU and KVM. Virt-Manager simplifies the process of creating, configuring, and managing virtual machines, making it easier for users to work with virtualization on Linux systems.

Together, these tools provide a powerful and flexible solution for virtualization on Linux. QEMU and KVM handle the low-level aspects of virtualization, such as hardware emulation and virtual machine management, while Virt-Manager provides a convenient graphical interface for creating and managing virtual machines.

Step 1: Open Terminal

Open the terminal by pressing Ctrl + Alt + T on your keyboard or by searching for it in the applications menu.

Step 2: Install QEMU, KVM, and Virt-Manager

On Debian/Ubuntu-based distros, run:

sudo apt install qemu-kvm libvirt-daemon-system libvirt-clients bridge-utils virt-manager

On Fedora/RPM-based distros, run:

sudo dnf install qemu-kvm libvirt virt-install virt-manager

On Arch-based distros, run:

sudo pacman -S qemu virt-manager virt-viewer dnsmasq vde2 bridge-utils openbsd-netcat

Step 3: Start and Enable libvirtd Service

On Debian/Ubuntu-based distros and Fedora/RPM-based distros, run the following commands:

sudo systemctl start libvirtd
sudo systemctl enable libvirtd

On Arch-based distros, run the following commands:

sudo systemctl enable libvirtd.service
sudo systemctl start libvirtd.service

Step 4: Add User to libvirt Group

On Debian/Ubuntu-based distros, run the following commands:

sudo adduser your_username libvirt
sudo adduser your_username libvirt-qemu

Replace your_username with your username.

On Fedora/RPM-based distros and Arch-based distros, run:

sudo gpasswd -a your_username libvirt

Replace your_username with your username.

Step 5: Log Out and Log Back In

Log out and log back in for the changes to take effect.

Step 6: Create Virtual Machine

  1. Open Virt-Manager from your applications menu.
  2. Click on the Create a new virtual machine button or go to File > New Virtual Machine.
  3. Choose the installation method (local ISO file, network boot, or importing an existing disk image), and click Next.
  4. Browse and select the ISO file (if applicable), and click Next.
  5. Allocate the memory (RAM) and CPU resources for the virtual machine, and click Next.
  6. Specify the disk size and storage location for the virtual machine, and click Next.
  7. Review the virtual machine settings, give it a name, and click Finish.

The virtual machine will now be created, and you can start it by selecting it and clicking on the Start button (the Play icon) in Virt-Manager.


In conclusion, creating a virtual machine on Linux is a straightforward process that can be achieved using popular tools like VirtualBox or QEMU, KVM, and Virt-Manager. Whether you’re testing new software, running multiple operating systems simultaneously, or using virtualization for development purposes, these tools provide a powerful and flexible solution for your needs.

Please Leave Feedback and Corrections in the Comments

More to Explore

Table of Contents

Leave a Reply

Your email address will not be published. Required fields are marked *

What are you looking for?

Type in a question or keyword below

Frequently Asked Questions

Do you have any discounts or coupons?

All of our current discounts and deals are listed under the “Promotions” category at the top of the configuration page for each laptop.


What is your return policy?

Any laptop purchased from MALIBAL.COM may be returned or exchanged only in accordance with MALIBAL’S return policy in effect on the date of the invoice or acknowledgment. You must contact us directly before you attempt to return a laptop in order to obtain a Return Material Authorization Number for you to include with your return. You must return the laptop to us in its original packaging and condition with all included manuals, discs, accessories etc.


Do you offer any military or student discounts?

We don’t offer any military or student discounts at this time.


How much is shipping and tax to my state or country?

Shipping costs are determined by cost of notebook and location. Please add a notebook to the cart and then click the, “Estimated Shipping Charges,” link at the bottom of the cart page. Within the US, there are no taxes outside of Nevada. Nevada residents are subject to 8.10% sales tax. For customers outside the US, you will have to pay your local VAT (Value Added Tax) to customs once the notebook arrives in your country.


When is my order shipping?

Laptops usually ship out within 5-7 business days after the order is placed. We also offer rush service (1-3 business days) for $50. Once your laptop ships out we will email the tracking number so that you can see the estimated arrival date. Someone will need to be at the address to sign for the package.


How do I check the status of my order?

We will send you emails and texts with status updates as your order progresses through the different stages.


How do I cancel an order?

You may cancel an order any time up until it ships. After it ships, you will not be able to cancel it, but will instead have to use our return policy in order to return the laptop for a refund. To cancel an order, simply open a sales ticket or sales chat and give the representative your order information, and they will cancel the order for you and send you confirmation via email and text.


How do I make a change to my order?

You may make changes to your order up until it ships. To modify an order, simply open a sales ticket or sales chat and give the representative your order information and specify which changes you want to make. Please note: You cannot change the shipping address on an order.


Do you price match?

We do not currently offer any price matching.


How do I track my order after it ships?

You can view your tracking status via the order page in your account.



MALIBAL is an innovative technology company that produces high-performance, custom linux laptops for developers and content creators; mobile workstations for engineers, scientists, video editors, 3D modelers, and animators; and mobile servers for enterprise applications.

On our site, you will find information about the best custom linux laptops, such as our Aon S1 and Aon L1 models, our customers, new articles, latest news, guides, features, and more.