Back to Blog
tutorialIntermediate15 min read

Debian VM

A guide to setting up a Debian VM on Proxmox

Proxmox - Debian VM

Overview

Often I need a fresh Debian VM for a new service or application. This guide will cover how I typically set up a Debian VM on Proxmox. Helper scripts has a Docker VM but unfortunately I am not a fan of the way it is set up so I prefer to do it manually. The Docker LXC is great though if what you are trying to do works with an LXC.

Prerequisites

  • Proxmox VE 8.0 or later

Download ISO

The first step is to upload the Debian netinst ISO to Proxmox. You can download the latest version of the Debian netinst ISO from the Debian website. For most people the amd64 version will be the best choice. If you are using a Raspberry Pi or other ARM device, you can select the appropriate version for your architecture.

Debian website download page showing architecture options with amd64 highlighted for the netinst ISO
Debian Netinst ISO Download Page

Once you have downloaded the ISO, open up Proxmox and select local (pve) and then ISO Images.

Proxmox VE web interface sidebar with local (pve) storage selected and ISO Images option highlighted
Proxmox Local Storage ISO Images

Then click the Upload button. You could also provide the Download URL but I find it easier to just upload the ISO directly.

Proxmox ISO Images storage view with the Upload button highlighted
Proxmox ISO Upload Button

Then click Upload. When you see TASK OK, the upload is complete.

Proxmox upload dialog showing debian-12.10.0-amd64-netinst.iso selected with 633 MiB file size
Proxmox Upload Debian ISO Dialog

Create VM

You will need to tailor the resources based on the needs of your application, be sure to check the requirements for the application you are installing.

With your Proxmox server selected, click the Create VM button in the top right corner.

Proxmox top toolbar with the Create VM button highlighted
Proxmox Create VM Button

General

  • Node: This is the Proxmox server you want to create the VM on. If you have multiple Proxmox servers, select the one you want to use.
  • VM ID: This is the unique identifier for the VM. I typically use the next available ID.
  • Name: This is the name of the VM. I typically use the name of the application I am installing. In this case, I am setting up a Debian VM for Immich, so I will name it immich.

Proxmox Create VM General tab showing Node pve, VM ID 105, and Name set to immich
Proxmox Create VM General Tab

OS

  • ISO Image: Select the Debian netinst ISO you just uploaded.

Proxmox Create VM OS tab with Debian netinst ISO selected and Guest OS type set to Linux
Proxmox Create VM OS Tab

System

  • Graphics Card: I typically use Default for most VMs.
  • Machine: I typically use q35 for most VMs.
  • BIOS: I typically use OVMF (UEFI) for most VMs.
  • Add EFI Disk: I typically use Yes for most VMs.
  • EFI Storage: I typically use local-lvm for most VMs.
  • Pre-Enroll Keys: I typically use No for most VMs.
  • SCSI Controller: I typically use VirtIO SCSI for most VMs.
  • Qemu Agent: I typically use Yes for most VMs.

Proxmox Create VM System tab showing q35 machine, OVMF UEFI BIOS, VirtIO SCSI controller, and Qemu Agent enabled
Proxmox Create VM System Tab

Disks

  • Bus/Device: I typically use SCSI for most VMs.
  • Storage: I typically use local-lvm for most VMs.
  • Disk Size: I typically use 32GB for most VMs. This can be changed later if you need more space.
  • Cache: I typically use None for most VMs.
  • Discard: I typically use Yes for most VMs.
  • IO Thread: I typically use Yes for most VMs.

Proxmox Create VM Disks tab showing SCSI bus, local-lvm storage, 32 GiB disk size with Discard and IO thread enabled
Proxmox Create VM Disks Tab

CPU

  • Sockets: I typically use 1 for most VMs.
  • Cores: I typically use 2-4 for most VMs.
  • Type: I typically use host for most VMs.

Proxmox Create VM CPU tab showing 1 socket, 4 cores, and host CPU type
Proxmox Create VM CPU Tab

Memory

  • Memory: This will vary greatly based on the application you are installing. Check the requirements.

Proxmox Create VM Memory tab showing 16384 MiB allocated
Proxmox Create VM Memory Tab

Network

I leave all the defaults for the network settings. The default is virtio for the model and vmbr0 for the bridge.

Proxmox Create VM Network tab showing vmbr0 bridge with VirtIO paravirtualized model and no VLAN tag
Proxmox Create VM Network Tab

Confirm

Confirm the settings and click Finish.

Proxmox Create VM Confirm tab showing full VM configuration summary including OVMF BIOS, 4 cores, 16384 MB memory, and 32 GB disk
Proxmox Create VM Confirm Tab

Start the VM

Once the VM is created, you will see it in the list of VMs. Click on the VM and then click the Console button. There should be a button to start the VM.

Proxmox console view for VM 105 immich showing Guest not running with Start Now button highlighted
Proxmox VM Console Start Now

Install Debian

The system will boot up, select Graphical Install to continue.

Debian 12 GNU/Linux UEFI installer boot menu with Graphical install option highlighted
Debian 12 UEFI Installer Boot Menu

Select your language and click Continue.

Debian installer language selection screen with English highlighted
Debian Installer Language Selection

Select your location and click Continue.

Debian installer location selection screen with United States highlighted
Debian Installer Location Selection

Select your keyboard layout and click Continue.

Debian installer keyboard configuration screen with American English keymap selected
Debian Installer Keyboard Configuration

Enter a hostname for the system. This can be anything you like, but I typically use the name of the application I am installing. In this case, I will use immich.

Debian installer hostname configuration with immich entered as the hostname
Debian Installer Hostname Configuration

Leave the domain name blank and click Continue.

Debian installer domain name configuration with the field left blank
Debian Installer Domain Name Configuration

Set the root password and click Continue.

Debian installer root password setup screen with password entered and masked
Debian Installer Root Password Setup

Set the user account name and click Continue. I will use hakehardware.

Debian installer user account setup showing hakehardware entered as the full name
Debian Installer User Account Full Name

Set the username and click Continue. I will use hakehardware.

Debian installer username selection showing hakehardware entered as the account username
Debian Installer Username Selection

Set the password and click Continue.

Debian installer user password setup screen with password entered and masked
Debian Installer User Password Setup

Set the time zone and click Continue.

Debian installer time zone selection showing US time zones with Central highlighted
Debian Installer Time Zone Selection

Choose the partitioning method. I typically use Guided - use entire disk and set up LVM for most VMs. This will automatically partition the disk for you.

Debian installer partition method selection showing Guided use entire disk and set up LVM option
Debian Installer Partitioning Method

Select the disk to partition, there should only be one option. Click Continue.

Debian installer disk selection showing SCSI 34.4 GB QEMU QEMU HARDDISK as the only available disk
Debian Installer Disk Selection

Select partition scheme. I typically use All files in one partition for most VMs. This will create a single partition for the entire disk.

Debian installer partition scheme selection with All files in one partition recommended for new users
Debian Installer Partition Scheme

Confirm the changes and click Continue.

Debian installer LVM write confirmation showing SCSI disk with Yes selected to write changes and configure LVM
Debian Installer LVM Write Confirmation

For the Volume Group size, I typically use max, this will use the entire disk. Click Continue.

Debian installer volume group size configuration with max entered to use the entire disk
Debian Installer Volume Group Size

Finally, select Yes to write the changes to the disk and click Continue.

Debian installer final disk write confirmation showing LVM partitions to be formatted with Yes selected
Debian Installer Write Changes to Disk

When prompted to scan for extra installation media, select No and click Continue.

Debian installer scan extra installation media prompt with No selected
Debian Installer Extra Media Scan

Select the closest mirror for the Debian archive and click Continue.

Debian installer archive mirror country selection with United States highlighted
Debian Installer Mirror Country Selection

Select the archive mirror, I will use deb.debian.org for this example. Click Continue.

Debian installer archive mirror selection with deb.debian.org highlighted at the top of the list
Debian Installer Archive Mirror Selection

For proxy settings I leave it blank, but if you are using a proxy, you can set it here. Click Continue.

Debian installer HTTP proxy configuration with the field left blank
Debian Installer HTTP Proxy Configuration

Configure popularity-contest, I typically select No for this. Click Continue.

Debian installer popularity-contest configuration with No selected
Debian Installer Popularity Contest

Select the software to install. I typically select SSH server and standard system utilities. Click Continue. I do not usually select a graphical desktop environment as I typically use the command line for most tasks. If you want to install a desktop environment, you can select it here.

Debian installer software selection with only SSH server and standard system utilities checked
Debian Installer Software Selection

Once everything is installed, you will see a message that the installation is complete. Click Continue to reboot the system.

Debian installer completion screen showing Installation complete message with prompt to reboot
Debian Installer Installation Complete

Remove media

Now that Debian has been installed, there is no need to keep the installation media. Click on the Hardware tab and select the CD/DVD drive. Then click Remove to remove the installation media.

Proxmox Hardware tab for VM 105 showing CD/DVD Drive with installation ISO highlighted and Remove button visible
Proxmox Remove Installation Media

The media will not be removed from the VM until it is powered off. You can do this now or just wait - there is not really a downside either way.

Prepare System

Now that the system is up and running, there are a few things we need to do to prepare the system for use.

SSH Access

I prefer to SSH into the system as it is easier to manage things like copy and pasting. You should see the IP address of the VM in the Proxmox web interface. You can also use the ip a command to find the IP address.

Proxmox VM summary showing immich VM running with IP address 192.168.10.12 displayed from QEMU guest agent
Proxmox VM Summary with IP Address

I use Termius as my SSH client, but you can use any SSH client you like. Open your SSH client and connect to the IP address of the VM. You will be prompted for the username and password you set during the installation.

Install Helpful Packages

Once you are logged in, there are a few packages I like to install to make things easier to manage. First, drop into the root user by running the following command:

su -

Then install the following packages:

apt update && apt install -y sudo htop curl git cifs-utils

Add User to Sudoers

Now that you have the sudo package installed, you can add your user to the sudo group. This will allow you to run commands with sudo without having to switch to the root user.

usermod -aG sudo <YOUR USERNAME>

Now close the SSH session and log back in with your user account. You can now run commands with sudo without having to switch to the root user. For example, you can run the following command to update the package list:

Update System

Now is a good time to ensure the system is updated.

sudo apt update && sudo apt upgrade -y

This will update the package list and install any available updates. This may take a few minutes depending on your internet speed and the number of updates available.

Install Docker (Optional)

If you plan on using Docker, you can install it now. I typically use the quick install script, but always be careful about running scripts from the internet. You can find the script here.

curl -fsSL https://get.docker.com -o install-docker.sh

Perform a dry-run to see what the script will do before running it. This is a good way to check for any potential issues (optional)

sh install-docker.sh --dry-run

Then run the script with the following command:

sudo sh install-docker.sh

This will install Docker and start the Docker service. You can check the status of the Docker service with the following command:

sudo systemctl status docker

You should see a message that the Docker service is active and running.

Terminal output of sudo systemctl status docker showing Docker service active and running on the Debian VM
Docker Service Active and Running

Conclusion

You now have a fresh Debian VM ready to go. You can now install any applications or services you need. This guide is a good starting point for setting up a Debian VM on Proxmox. You can customize the settings and packages to fit your needs. If you have any questions or comments, feel free to reach out. I am always happy to help!