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:
- Downloading the Debian 12 ISO Image
- Creating a Debian 12 VirtualBox Virtual Machine
- Enabling the 3D Acceleration for the Debian 12 VirtualBox Virtual Machine
- Starting the Debian 12 VirtualBox Virtual Machine
- Installing the Debian 12 Desktop on the VirtualBox Virtual Machine
- Installing the VirtualBox Guest Additions on the Debian 12 Virtual Machine
- 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.
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].
Select the Debian 12 ISO image file that you downloaded and click on “Open”.
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].
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].
Select the amount of disk space that you want to allocate for the Debian 12 virtual machine[1] and click on “Next”[2].
Click on “Finish”.
A Debian 12 VirtualBox virtual machine should be created.
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].
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.
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>.
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”.
Select your country and click on “Continue”.
Select your locale and click on “Continue”.
Select your keyboard and click on “Continue”.
Type in a hostname[1] and click on “Continue”[2].
Type in a domain name (optional) and click on “Continue”.
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.
Type in your full name[1] and click on “Continue”[2].
Type in your username[1] and click on “Continue”[2].
Type in your login password and click on “Continue”.
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.
To use the virtual disk for the Debian 12 desktop installation, double-click (LMB) on it.
To select “All files in one partition (recommended for new users)”, double-click (LMB) on it.
To select “Finish partitioning and write changes to disk”, double-click (LMB) on it.
Select “Yes”[1] and click on “Continue”[2].
The Debian 12 base system is being installed on the virtual machine. It takes a few seconds to complete.
Select “No”[1] and click on “Continue”[2].
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”.
Select “deb.debian.org” (or any Debian mirror that you like) and click on “Continue”.
Click on “Continue”.
The Debian 12 installation should continue.
Select “No”[1] and click on “Continue”[2].
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].
The Debian 12 desktop installation should continue. It takes a while to complete.
Select “Yes”[1] and click on “Continue”[2].
Select “/dev/sda”[1] and click on “Continue”[2].
The GRUB bootloader is being installed on the disk. It takes a few seconds to complete.
At this point, the Debian 12 desktop operating system should be installed on the Oracle VirtualBox virtual machine.
Click on “Continue”.
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>.
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.
You should be logged into the Debian 12 desktop virtual machine.
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.