VirtualBox

How to Install Debian 12 Desktop on a VirtualBox 7 Virtual Machine

Debian 12 “Bookworm” is the latest version of the Debian operating system. It comes with a lot of new features and updated software. To learn more about the new features of Debian 12 “Bookworm”, read this article.

In this article, we will show you how to install the Debian 12 Desktop operating system on an Oracle VirtualBox 7 virtual machine.

Topic of Contents:

  1. Downloading the Debian 12 ISO Image
  2. Creating a Debian 12 VirtualBox Virtual Machine
  3. Enabling the 3D Acceleration for the Debian 12 VirtualBox Virtual Machine
  4. Starting the Debian 12 VirtualBox Virtual Machine
  5. Installing the Debian 12 Desktop on the VirtualBox Virtual Machine
  6. Installing the VirtualBox Guest Additions on the Debian 12 Virtual Machine
  7. Conclusion

Downloading the Debian 12 ISO Image

You can download the ISO image of Debian 12 from the official website of Debian. If you need any assistance on that, read this article.

Creating a Debian 12 VirtualBox Virtual Machine

To create a new VirtualBox virtual machine, open the Oracle VM VirtualBox app and click on Machine > New.

A screenshot of a computer Description automatically generated

Type in a name for the VirtualBox virtual machine in the “Name” section[1].

To select the Debian 12 installation ISO image, click on “Other” from the ISO Image dropdown menu[2].

A screenshot of a computer Description automatically generated

Select the Debian 12 ISO image file that you downloaded and click on “Open”.

A screenshot of a computer Description automatically generated

The Debian 12 ISO image file should be selected. Make sure that Linux and Debian are selected as the “Type” and “Version” for the virtual machine, respectively[1].

Check the “Skip Unattended Installation”[2] and click on “Next”[3].

A screenshot of a computer Description automatically generated

Select the amount of memory and the number of processor cores that you want to allocate for the Debian 12 virtual machine[1] and click on “Next”[2].

A screenshot of a computer Description automatically generated

Select the amount of disk space that you want to allocate for the Debian 12 virtual machine[1] and click on “Next”[2].

A screenshot of a computer Description automatically generated

Click on “Finish”.

A screenshot of a computer Description automatically generated

A Debian 12 VirtualBox virtual machine should be created.

A screenshot of a computer Description automatically generated

Enabling the 3D Acceleration for the Debian 12 VirtualBox Virtual Machine

Once the Debian 12 VirtualBox virtual machine is created, make sure it’s opened in the Oracle VirtualBox app[1] and click on “Settings”[2].

A screenshot of a computer Description automatically generated

The Debian 12 VirtualBox virtual machine settings window should be displayed. From the Display > Screen section[1], select “VMSVGA” from the “Graphics Controller” dropdown menu and tick on “Enable 3D Acceleration”[2]. Once you’re done, click on “OK” to save the changes[3].

Starting the Debian 12 VirtualBox Virtual Machine

To start the Debian 12 virtual machine, select it from the VirtualBox app[1] and click on “Start”[2].

The Debian 12 VirtualBox virtual machine should start and greet you with the Debian 12 installer’s boot menu.

A screenshot of a computer Description automatically generated

Installing the Debian 12 Desktop on the VirtualBox Virtual Machine

To install the Debian 12 desktop operating system on the VirtualBox virtual machine, select “Graphical install” from the Debian 12 installer’s boot menu and press <Enter>.

A screenshot of a computer Description automatically generated

The Debian 12 graphical installer should be displayed. You can install the Debian 12 desktop operating system on the VirtualBox virtual machine from here.

The Debian 12 desktop can be installed on the virtual machine in the same way as you install it on a real computer. We wrote an article on installing Debian 12 desktop on a computer which covers the in-depth installation process of the Debian 12 desktop . So, we will quickly go over the installation process here without too much explanation. For a detailed information on installing Debian 12 on the VirtualBox virtual machine, read the article on How to Install Debian 12 Desktop on Your Computer.

First, select your language and click on “Continue”.

A screenshot of a computer Description automatically generated

Select your country and click on “Continue”.

A screenshot of a computer Description automatically generated

Select your locale and click on “Continue”.

A screenshot of a computer Description automatically generated

Select your keyboard and click on “Continue”.

A screenshot of a computer Description automatically generated

Type in a hostname[1] and click on “Continue”[2].

A screenshot of a computer Description automatically generated

Type in a domain name (optional) and click on “Continue”.

A screenshot of a computer Description automatically generated

Type in a root password (if you want to enable the root user account) and click on “Continue”. This is optional. You can leave it blank if you want to use sudo to get the superuser privileges.

A screenshot of a computer Description automatically generated

Type in your full name[1] and click on “Continue”[2].

A screenshot of a computer Description automatically generated

Type in your username[1] and click on “Continue”[2].

A screenshot of a computer Description automatically generated

Type in your login password and click on “Continue”.

A screenshot of a computer Description automatically generated

As you’re installing Debian 12 desktop on a virtual machine, you can safely install Debian 12 on the entire disk. So, to select “Guided – use entire disk”, double-click (LMB) on it.

NOTE: If you have special application/workload-specific partitioning requirements for the disks, read this article to learn how to do the advanced partitioning for your Debian 12 installation.

A screenshot of a computer Description automatically generated

To use the virtual disk for the Debian 12 desktop installation, double-click (LMB) on it.

A screenshot of a computer Description automatically generated

To select “All files in one partition (recommended for new users)”, double-click (LMB) on it.

A screenshot of a computer Description automatically generated

To select “Finish partitioning and write changes to disk”, double-click (LMB) on it.

A screenshot of a computer Description automatically generated

Select “Yes”[1] and click on “Continue”[2].

A screenshot of a computer Description automatically generated

The Debian 12 base system is being installed on the virtual machine. It takes a few seconds to complete.

A screenshot of a computer Description automatically generated

Select “No”[1] and click on “Continue”[2].

A screenshot of a computer Description automatically generated

Select your country to find the best package mirror for Debian (so that you get faster downloads of the Debian packages) and click on “Continue”.

A screenshot of a computer Description automatically generated

Select “deb.debian.org” (or any Debian mirror that you like) and click on “Continue”.

A screenshot of a computer Description automatically generated

Click on “Continue”.

A screenshot of a computer Description automatically generated

The Debian 12 installation should continue.

A screenshot of a computer Description automatically generated

Select “No”[1] and click on “Continue”[2].

A screenshot of a computer Description automatically generated

By default, Debian 12 installs the GNOME desktop environment. You can use Xfce, KDE Plasma, Cinnamon, MATE, LXDE, and LXQt desktop environments on your Debian 12 desktop operating system as well. To use a different desktop environment, uncheck “GNOME” from the “Debian desktop environment” section, and check the desktop environment that you want to use[1].

Once you’re done, click on “Continue”[2].

A screenshot of a computer Description automatically generated

The Debian 12 desktop installation should continue. It takes a while to complete.

A screenshot of a computer Description automatically generated

Select “Yes”[1] and click on “Continue”[2].

A screenshot of a computer Description automatically generated

Select “/dev/sda”[1] and click on “Continue”[2].

A screenshot of a computer Description automatically generated

The GRUB bootloader is being installed on the disk. It takes a few seconds to complete.

A screenshot of a computer Description automatically generated

At this point, the Debian 12 desktop operating system should be installed on the Oracle VirtualBox virtual machine.

Click on “Continue”.

A screenshot of a computer Description automatically generated

The Debian 12 virtual machine should reboot into the newly installed Debian 12 desktop operating system.

Select “Debian GNU/Linux” from the Debian 12 boot menu and press <Enter>.

A screenshot of a computer Description automatically generated

The Debian 12 desktop login screen should be displayed.

Login to your Debian 12 desktop with the username and password that you set up during the installation.

A screenshot of a computer Description automatically generated

You should be logged into the Debian 12 desktop virtual machine.

A screenshot of a computer Description automatically generated

Installing the VirtualBox Guest Additions on the Debian 12 Virtual Machine

To get the best performance and 3D acceleration to work on the Debian 12 desktop VirtualBox virtual machine, you must install the VirtualBox Guest Additions on the Debian 12 virtual machine.

For more information on VirtualBox Guest Additions, read this article.

Conclusion

We showed you how to create a Debian 12 VirtualBox virtual machine and enable the 3D acceleration on it. We also showeds you how to install the Debian 12 desktop operating system on the VirtualBox virtual machine.

About the author

Shahriar Shovon

Freelancer & Linux System Administrator. Also loves Web API development with Node.js and JavaScript. I was born in Bangladesh. I am currently studying Electronics and Communication Engineering at Khulna University of Engineering & Technology (KUET), one of the demanding public engineering universities of Bangladesh.