A virtual machine (VM) is a software-based en­vi­ron­ment that emulates a complete computer in the context of vir­tu­al­iza­tion. It allows multiple operating systems to run con­cur­rent­ly on a physical host. We explain the func­tion­al­i­ty, benefits, and setup of VMs on Windows 11.

What is a virtual machine?

A VM is a virtual computer with its own operating system, accessing the resources of a host system. The guest system behaves like an in­de­pen­dent PC with RAM, storage, and a file system. The foun­da­tion is the hy­per­vi­sor, which runs as an ap­pli­ca­tion in the host system or directly on the hardware. It manages resource al­lo­ca­tion and separates VMs from one another—a concept known as en­cap­su­la­tion.

Image: Image: Hypervisor-based hardware virtualization
Schematic rep­re­sen­ta­tion of hy­per­vi­sor-based hardware vir­tu­al­iza­tion

Many hy­per­vi­sors also offer emulation features. This allows runtime en­vi­ron­ments for different operating systems to be used on in­com­pat­i­ble hardware.

Virtual machines in practical use

With hardware vir­tu­al­iza­tion, you allocate the resources of a physical system to multiple virtual machines. Each VM operates in­de­pen­dent­ly from the host and other VMs—an advantage for security, stability, and flex­i­bil­i­ty.

Typical ap­pli­ca­tion areas are

  • Shared hosting,
  • VPS solutions and
  • Server con­sol­i­da­tion.

Busi­ness­es con­sol­i­date ap­pli­ca­tions like mail, file, or database servers on shared hardware with virtual machines. This saves costs and prevents unused computing power. VMs are also used in software de­vel­op­ment, for example, testing across different systems. VMs can be quickly created, cloned, and com­plete­ly deleted without traces.

Emulation also allows sim­u­lat­ing non-native software systems, such as running Linux on Windows. This creates an overhead since ad­di­tion­al resources are needed for the hy­per­vi­sor and the guest system. Per­for­mance loss is a concern, es­pe­cial­ly with resource-intensive ap­pli­ca­tions. Assign clear hardware limits to virtual machines and ensure that the total load does not exceed the host’s capacity.

An overview of the ad­van­tages and dis­ad­van­tages of virtual machines

Below, we outline the main ad­van­tages and dis­ad­van­tages of virtual machines. The impact of these pros and cons primarily depends on how you want to deploy VMs and what purpose you aim to achieve with vir­tu­al­iza­tion.

Ad­van­tages of virtual machines:

  • Multiple operating systems can be used si­mul­ta­ne­ous­ly on a single hardware
  • Better uti­liza­tion through server con­sol­i­da­tion
  • Isolation increases security and stability
  • Cen­tral­ized main­te­nance saves time and costs
  • Flexible de­ploy­ment and easy migration

Dis­ad­van­tages of virtual machines:

  • Per­for­mance loss due to hy­per­vi­sor overhead
  • Bot­tle­necks during high uti­liza­tion on shared systems
  • Hy­per­vi­sor can be a vul­ner­a­bil­i­ty for attacks
  • Licensing issues with virtual operating systems often unclear

How to create a virtual machine tutorial

Below, we show you with a step-by-step guide how to create a virtual machine on a Windows host and run Ubuntu Linux as a guest system. For the tutorial, we use Windows 11. Oracle VM Vir­tu­al­Box is used as hy­per­vi­sor software.

Note

To follow the guide on your own system, you just need a Windows PC with internet access. The software used in the tutorial is available for free download from the internet.

Step 1: Choose hy­per­vi­sor software

To provide virtual operating systems, various software solutions are available. Leading products are from companies like Oracle, VMware, and Parallels.

The following table shows the most popular hy­per­vi­sor products for Windows, Linux, and macOS, as well as possible guest systems.

Vir­tu­al­iza­tion software Host systems Guest systems
Oracle VM Vir­tu­al­Box
  • Windows
  • Linux
  • Mac OS X
  • macOS
  • Solaris
  • Windows
  • Linux
  • Solaris
  • FreeBSD
VMware Work­sta­tion Player
  • Windows
  • Linux
  • Windows
  • Linux
  • NetWare
  • Solaris
  • FreeBSD
VMware Fusion
  • Mac OS X
  • macOS
  • Windows
  • Linux
  • NetWare
  • Solaris
  • FreeBSD
  • macOS
  • Mac OS X
Parallels Desktop for Mac
  • Mac OS X
  • macOS
  • Windows
  • Linux
  • macOS
  • Mac OS X
  • Solaris
  • FreeBSD
  • Android OS
  • Chrome OS

For the following tutorial, we used the hy­per­vi­sor VM Vir­tu­al­Box from Oracle. The software is available to users for free under the GNU General Public License (GNU GPLv2). We recommend down­load­ing it from the provider’s website. Proceed as follows:

  1. Visit the page Oracle Download Page.

  2. Select the current download package for your operating system (in our case, Windows).

  3. Save the .exe file with the binary data in any directory on your computer.

Note

As a com­ple­ment to the core software, Oracle provides the Oracle VM Vir­tu­al­Box Extension Pack, a pro­pri­etary extension module for the open-source vir­tu­al­iza­tion software, free of charge. However, you do not need the Extension Pack for this tutorial.

Step 2: Install Oracle VM Vir­tu­al­Box

Once the download is complete, execute the binary package by double-clicking the .exe file. Follow the in­struc­tions of the in­stal­la­tion wizard to install Oracle VM Vir­tu­al­Box locally on your system.

At the end of the in­stal­la­tion process, the software launches the Oracle VM Vir­tu­al­Box Manager. Here, you create and manage your virtual machines.

Image: Oracle VirtualBox Manager start screen
Start screen of the Oracle Vir­tu­al­Box Manager. The empty field on the left side indicates that no virtual machines have been created yet.

Step 3: Download operating system image

To run a guest system in a virtual machine, you need an operating system image. This is a memory image that the hy­per­vi­sor software can interpret as a system hard disk. Such images can be in the open file format .iso. Common vir­tu­al­iza­tion solutions also work with pro­pri­etary container formats for image files, such as .vmdk (VMware), .vhd (Xen and Microsoft Hyper-V), and .vdi (Oracle VM Vir­tu­al­Box).

For this tutorial, we use the open-source operating system Ubuntu 24.04, which can be down­loaded as an .iso file from the official Ubuntu project website. Proceed as follows:

  1. Go to the Ubuntu download page.

  2. Select the current version of the operating system and click “Download”

  3. Save the .iso file locally on your system.

Tip

If you want to run a virtual Windows PC as a guest system, you can find various image files for Hy­per­vi­sor solutions from VMware, Hyper-V, Vir­tu­al­Box, and Parallels on the official Microsoft Developer Website.

Step 4: Create a new virtual machine

Use the “New” button to add a new virtual machine to the Oracle VM Vir­tu­al­Box Manager. Enter a name for the new virtual machine (spaces are not allowed) and specify the location of the pre­vi­ous­ly down­loaded ISO file. Ensure that the entries in the “Type,” “Subtype,” and “Version” fields match the guest system to be installed.

Image: Oracle VirtualBox Manager: Selecting the operating system
We’ve chosen the operating system type Linux, the subsystem Ubuntu, and the version Ubuntu (64-bit).

Also, check the box “Skip Un­at­tend­ed In­stal­la­tion” if you want to use the usual Ubuntu in­stal­la­tion wizard after starting the VM. Otherwise, Vir­tu­al­Box will perform an automatic in­stal­la­tion of the operating system, and you won’t be able to set options like system language and keyboard layout yourself.

Note

If you prefer the “Un­at­tend­ed Install” option, you must create a user account in the menu of the same name to log in to the virtual machine and complete the in­stal­la­tion of the VM!

Step 5: Assign hardware resources

Open the next category named “Hardware.” Here you can assign a portion of the memory and processor power provided by the host system to the new virtual machine. For Ubuntu 24.04, it is rec­om­mend­ed to reserve at least 4 GB of memory and 2 CPUs.

Image: Oracle VirtualBox Manager: Hardware allocation
Enable the option “Enable EFI” if you want to emulate UEFI firmware instead of the classic BIOS.

Step 6: Create virtual hard disk

In the next step, decide whether to create a new virtual hard disk or assign an existing virtual hard disk to the virtual machine. In this tutorial, we will create a new virtual hard disk with a capacity of 25 gigabytes, where we will proceed to install the guest system from scratch.

To do this, select the option “Create a Virtual Hard Disk Now,” specify the desired storage location, and set the desired storage size with the slider. We will keep the default format VDI as the file type. If you check “Pre-allocate Full Size,” the virtual hard disk will be created with the maximum required size from the start, instead of growing dy­nam­i­cal­ly. This can improve per­for­mance since the VM won’t con­stant­ly have to search for free storage resources later. However, enabling this option is not mandatory.

Image: Oracle VirtualBox Manager: Create Virtual Hard Disk
Create virtual hard disk in Oracle Vir­tu­al­Box Manager

Step 7: Complete creation process and start VM

Once you have con­fig­ured the desired setup, click on “Finish” to set up the virtual machine. The newly created VM will then appear with the name you have chosen in the list of available virtual machines.

Image: Oracle VirtualBox Manager with selectable VM
For each virtual machine, VM Vir­tu­al­Box creates a file folder that contains, along with the VDI file for the virtual hard disk, a log file and a de­f­i­n­i­tion of the VM.

Once you click the “Start” button in the ribbon, the virtual machine opens in a new window, and Vir­tu­al­Box boots the operating system stored in the ISO file. Since we chose to install Ubuntu from scratch, the virtual machine’s window shows the in­stal­la­tion manager’s startup screen.

Note

All changes you make in your VM are au­to­mat­i­cal­ly written to the VDI file you created as the virtual hard drive during con­fig­u­ra­tion. If you want to run the guest system on another computer, simply copy your virtual machine‘s file folder (including the VDI file, log file, and de­f­i­n­i­tion) to the cor­re­spond­ing device.

Go to Main Menu