How to Dual Boot in VirtualBox with Windows and Ubuntu

Last update: 21/07/2025
Author Isaac
  • Good disk planning is key to avoiding conflicts between systems.
  • GRUB is the manager of Boot ideal for handling multiple OS.
  • Install first Windows and then Ubuntu ensures a more stable dual boot.
  • Disabling features like Windows Fast Boot prevents compatibility issues.

dual boot in VirtualBox

Installing two operating systems on the same computer or virtual environment is a widespread practice among those who want to take advantage of the advantages of each platform. Whether you're working with proprietary software, testing development environments, or just experimenting, the dual boot allows the user to choose which system to boot their device with.

In the context of a virtual machine as VirtualBox, this task is greatly simplified, since we can manipulate virtual disks, partitions, and configurations with relative ease. In this article, we explain, step by step, how to create a Dual Boot configuration with Windows and Ubuntu using VirtualBox, what you need to achieve it, what boot loaders you can use, how to solve possible errors and if it really compensates you compared to using Virtual machines or tools like WSL.

When and why to set up a dual boot?

There are many reasons why someone might want to dual-boot, even in virtual environments. Combine Windows and Linux on the same machine It is useful when you need to use software unique to each system. For example, some users require Windows for gaming or design software, while in other contexts Linux is preferred for its stability and by advanced development tools.

It's also ideal when working with software that requires testing in native, non-virtualized environments. For programmers, testing on a native operating system provides Greater certainty regarding performance and compatibilityWhile you can use virtual machines or the Windows Subsystem for Linux (WSL), these options don't provide a completely realistic experience.

Requirements for Dual Booting in VirtualBox

To successfully set up this environment, it is essential to take into account some basic requirements both at the level of hardware as software:

  • A recent version of VirtualBox installed on your host computer.
  • ISO files installation of both operating systems (Windows and Ubuntu).
  • Sufficient disk space to store the virtual disks of both operating systems.
  • Optionally, you can install each one in an independent virtual disk, making error management and system repair easier.
  Offline collaboration in Office and Microsoft 365: a complete guide

It is advisable to assign at least 32 GB to the Windows virtual partition or disk and reserve some more space for Ubuntu, depending on whether you want to install more packages or heavy graphical environments on Linux.

Windows installation in VirtualBox

The first step is to create a new virtual machine in VirtualBox and install Windows on it. When configuring the virtual machine, allocate the necessary resources based on your host computer: amount of RAM, CPU cores, and disk space.

In the Windows Setup Wizard:

  • Choose the virtual disk that you previously created and select “new partition” so that Windows automatically creates its system partitions.
  • Leaves free space on the disk to install Ubuntu later, or if you are using two virtual disks, configure the second one later.

Once the installation is complete and you're on the Windows desktop, shut down the virtual machine and prepare for the second part: installing Ubuntu.

Installing Ubuntu alongside Windows

Now you'll need to add the Ubuntu ISO drive to the virtual machine's boot device list and boot from it. From the Ubuntu boot menu, choose «Try Ubuntu without installing» to access its live mode.

From the live system, select the installation option and when you get to the partitioning part, choose the option "more options» to manually define how you want to install Ubuntu.

Create a partition in EXT4 format and assign it the root mount point /. If you wish, you can also add partitions like / Home o swap if your virtual machine has enough memory. The important thing is that install the GRUB boot loader on the correct virtual disk, usually the same one you install Ubuntu on.

Which bootloader should I use?

Both operating systems use boot managers. Windows has its own, and Ubuntu uses GRUBIn almost all cases, it's best to install Windows first and then Ubuntu, as GRUB will automatically detect the Microsoft operating system and add it to its menu. You can find out how to install it here. modify the boot menu if you want to customize its order and appearance.

  How to deal with HDMI signal loss

Additionally, GRUB offers greater compatibility for including other systems and managing multiple virtual disks, so it's recommended to leave it as the default manager. If necessary, you can customize GRUB to change the default system. There waiting or order of appearance.

Possible problems and how to solve them

One of the most frequent incidents is that, when restarting the virtual machine, the GRUB menu is not displayedThis is usually because the machine's boot configuration prioritizes the disk where Windows is installed. Adjust the boot order in VirtualBox's settings so that it first attempts to boot from the disk where GRUB is located.

Another typical fault is related to the quick start Windows (Fast Boot), which can cause problems when switching between systems. Disable it from the Control Panel to avoid errors. To do this, you can follow the instructions in How to disable Windows fast startup.

It may also be the case that both systems use different boot modes (UEFI and Legacy), which cause conflicts. Make sure you use the same boot mode for both in the virtual machine settings.

What to do after completing the installation?

dual boot windows linux

After the installation is complete and GRUB has detected both systems, you can make adjustments to optimize the experience:

  • Customize GRUB so that the system you use most boots by default.
  • Automatically mount shared partitions to access files from both systems.
  • Install the drivers, updates and codecs required for both operating systems.

These actions will improve your experience, allowing you to switch between systems easily. It is also recommended to update GRUB after each new installation using the command sudo update-grub so that it recognizes recent changes.

Is Dual Boot, Virtual Machine or WSL Better?

The choice will depend on how you intend to use Linux. If you need a lightweight development environment without a graphical interface, WSL (Windows Subsystem for Linux) It may be sufficient. But if you need to work with graphical environments or perform intensive testing, it's better to opt for Dual Boot, which offers greater performance.

  Learn how to adjust the Windows 11 equalizer to improve sound.

On the other hand, virtual machines like VirtualBox They're ideal if you only need occasional access to another system without rebooting. Although their performance isn't the same as a native system, they're very convenient for quick tasks and frequent environment changes.

Dual boot with more than two systems

To install more than two operating systems in VirtualBox, you only need enough space. Install each one on a virtual disk and update GRUB after each installation so it recognizes them. You can also check out this guide. Article on how to choose the default system in dual boot.

For example, you can have Windows, Ubuntu, and Kali Linux in the same virtual machine, selecting which system to boot from GRUB. The key is to properly manage disks and partitions, using GRUB as the central manager for all systems.

Creating a dual-boot system in VirtualBox is an accessible process if you follow the proper steps and properly configure virtual disks, boot loaders, and systems. It's a recommended option to get the most out of each platform, whether for compatibility, learning, or testing purposes.

Windows Bootloader: How to Change the Default Operating System if You Dual-Boot
Related article:
Dual-booting Windows and Linux: How to Choose the Default Operating System