VirtualBox

How to Install Debian 12 Server 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 server 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. Starting the Debian 12 VirtualBox 7 Virtual Machine
  4. Installing the Debian 12 Server on the VirtualBox 7 Virtual Machine
  5. Installing the VirtualBox Guest Additions on the Debian 12 Virtual Machine
  6. 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].

Tick on “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

Starting the Debian 12 VirtualBox 7 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 Server on the VirtualBox 7 Virtual Machine

To install the Debian 12 server 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 server operating system on the VirtualBox virtual machine from here.

The Debian 12 server can be installed on the virtual machine in the same way as you install it on a real computer. We wrote an article on how to install the Debian 12 server on a computer which covers the in-depth Debian 12 server installation process. 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 the Debian 12 Server Operating System 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)[1] and click on “Continue”[2].

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”.

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

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

A screenshot of a computer Description automatically generated

Select a virtual disk for the Debian 12 server installation[1] and click on “Continue”[2].

A screenshot of a computer Description automatically generated

Select “All files in one partition (recommended for new users)”[1] and click on “Continue”[2].

A screenshot of a computer Description automatically generated

Select “Finish partitioning and write changes to disk”[1] and click on “Continue”[2].

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.

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

A screenshot of a computer Description automatically generated

To install the Debian 12 server on the virtual machine, uncheck everything from the Software selection prompt and check only the “SSH server” and “standard system utilities”[1].

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

A screenshot of a computer Description automatically generated

The Debian 12 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].

The Debian 12 installation should continue.

A screenshot of a computer Description automatically generated

At this point, the Debian 12 server operating system should be installed on the 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 server operating system.

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

A screenshot of a computer Description automatically generated

Login to your Debian 12 server virtual machine with the username and password that you setup during the installation.

A black and white screen Description automatically generated

You should be logged into the Debian 12 server 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 on the Debian 12 server 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. We also showed you how to install the Debian 12 server 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.