JustToThePoint English Website Version
JustToThePoint en español
Colaborate with us

How to Configure Proxmox VE, Set Up an Ubuntu VM, and Resize Virtual Disks

Assumption is the mother of all screw-ups, Anonymous.

This article explains how to configure Proxmox Virtual Environment (Proxmox VE) to use the no-subscription repository (for updates without a subscription), how to create and configure a new Ubuntu virtual machine (VM), and how to resize a VM’s virtual disk.

“Home Server

Switching to Proxmox VE No-Subscription Repositories

When Proxmox VE is first installed, it defaults to the Enterprise package repository, updates from which are only available to customers with a paid subscription. If you don’t have a subscription, you’ll get errors when trying to update. To get the latest updates without a subscription, you need to disable the paid repository and enable the non-subscription repository.

Be aware that the no-subscription packages might not be tested as rigorously as enterprise packages

  1. Log into the Proxmox host shell and disable the enterprise repository by editing the file: vi /etc/apt/sources.list.d/pve-enterprise.list. Comment the only line in this file: # deb https://enterprise.proxmox.com/debian/pve bookworm pve-enterprise.

  2. Add the no-subscription repo: Open the main apt sources file with vi /etc/apt/sources.list:

    deb http://ftp.es.debian.org/debian bookworm main contrib non-free non-free-firmware
    deb http://ftp.es.debian.org/debian bookworm-updates main contrib non-free non-free-firmware
    deb http://security.debian.org/debian-security bookworm-security main contrib non-free non-free-firmware
    
    # Security updates
    deb http://security.debian.org bookworm-security main contrib
    # Proxmox VE no-subscription repository
    deb http://download.proxmox.com/debian/pve bookworm pve-no-subscription
    
  3. After updating your sources list, be sure to run the following commands to update your package lists and upgrade your system: apt update && apt full-upgrade -y. Then, reboot.

  4. After switching repos, the web interface will still show a pop-up saying “You do not have a valid subscription” each time you log in. This is just an annoyance, a useless message and doesn’t affect functionality - ignore it!

Creating and Configuring an Ubuntu VM in Proxmox

  1. Visit the official Ubuntu and grab the latest ISO (HTTP Direct Downloads, BitTorrent -this is recommended for faster downloads-).

  2. Upload the ISO to Proxmox. In the Proxmox web interface, select a storage on the left panel, Datacenter, Storage, e.g., local (myServer) or mypool (myServer), go to ISO Images. Click Download from URL or Upload (select the Ubuntu ISO file and upload it).

  3. Go to Node (e.g., Datacenter, myserver), local (myserver), select ISO Images. Click “Download from URL” or upload the ISO from your local computer. Typically, you will not want to enable Start at boot.

  4. Create a new Virtual Machine. In the Proxmox web UI, select Datacenter, node or host (server name, e.g., myserver) in the left tree, then click Create VM on the top right corner. In the creation wizard, use these settings:

  5. General. Give the Virtual Machine a name (e.g., UbuntuDesktop, UbuntuServer or Ubuntu-Desktop). VM ID are automatically generated and can be left as default or choose an unused ID.
    OS. Select the type of operating system you plan to install (Linux, Microsoft Windows, Solaris Kernel, etc.). For the ISO image, select the Arch ISO you uploaded (e.g., Use CD/DVD disk image file. Storage: local; ISO image: ubuntu-25.04-desktop-amd64.iso).
    System: Configure the BIOS type, choose the firmware/BIOS type OVMF(UEFI), which is a UEFI implementation for virtual machines. instead of SeaBIOS. This sets up an EFI boot environment which is recommended for Arch and modern OSes. Graphic card: Default. Set the Machine Type to q35 (Intel Q35 chipset). The machine type defines the virtual motherboard chipset EFI, let’s choose q35 for better compatibility with modern hardware features, especially if we plan to do PCIe device passthrough in the future (GPU pass-through). Storage (mypool). It specifies the storage pool where the EFI disk will be stored. Qemu Agent: Yes. It enables the Qemu Agent. It allows for better integration between the host and the guest operating system, providing features like graceful shutdown and reboot, and improved clipboard sharing.

    The EFI disk is a small virtual disk that stores persistent UEFI variables, such as boot order, secure boot settings, etc.


    Disk: Storage, choose the storage location for the VM disk, e.g., local-lvm (a local Logical Volume Manager -LVM- storage on the Proxmox host. A system for managing disk space that allows for flexible disk allocation, resizing, and management of storage volumes), mypool (a ZFS pool), etc., and allocate an appropriate Disk size for the VM, e.g., 64 or 128 GB or more. Ensure SCSI Controller is VirtIO SCSI (Proxmox default, a storage controller that offers high-performance disk I/O for VMs). For Cache policy, you can leave it as Default (No cache), which means that writes go directly to disk, bypassing the host’s page cache. Alternatively, Cache: Write back improves performance by temporarily storing write operations in the cache before writing them to the disk. This can speed up disk operations but also carry a risk of data loss in the event of a power failure.
    CPU: Cores. Assign CPU cores to the VM, e.g., 2, 4 or more. Proxmox offers a selection of generic CPU models, it’s generally best to set CPU Type to host (this makes the VM CPU mimic the host CPU, enabling all features for best performance) or x86-64-v2-AES (a good, safe baseline for many modern systems if host isn’t used), and Sockets: 1
    Memory: Allocate the desired amount of RAM for the VM, e.g., 4096 or 8192 MB. GNOME is a full desktop environment, so 4 GB minimum; 8 GB or more are recommended for smooth performance and better user experience. By default, Proxmox enables a Ballooning device for memory management. This feature allows the VM to dynamically adjust its memory usage. The VM can release memory back to the host when it is not in use, helping the host manage resources more efficiently during high-demand (under pressure) situations.
    Network: configure the network interface (usually defaults are fine). Proxmox will add a virtual network interface (vNIC).

    Choose the Model: VirtIO (paravirtualized) for the network adapter, as it provides better performance and compatibility for virtual machines. Assign it to the default Bridge (vmbr0) so the VM gets network access via the host, meaning that it is bridged to your LAN.

    Confirm: Review your settings and click Finish to confirm and create your VM. It will be created but not yet started.

  6. Configure display and GPU for the VM. After creating the VM, you should have a new VM listed in the left sidebar. Select the VM in the Proxmox interface. In the VM’s Hardware panel, find the Display device. Set Graphic card to VirtIO-GPU (VirGL). This gives the VM a virtual GPU that supports 3D acceleration.

    For a PCIe Passthrough configuration: In the VM’s Hardware panel, click Add, PCI Device. In the dialog, select your GPU (it will show up as an available PCI device, identified by its vendor and device ID).

    If you have an NVIDIA graphic card, you’ll typically see two functions (the GPU and its audio function), select All Functions to passthrough both at once. Besides, you may want to set the Graphic card to None (Hardware, Display) to avoid conflicts.

  7. Add other devices: If you want sound in the VM and you’re using VirGL (a virtual GPU), you can add an Audio Device, click on Add, Audio Device (e.g., ich9-intel-hda), Backend Driver, set to SPICE.

  8. Ensure the QEMU Guest Agent is enabled in the Options tab of the virtual machine.

  9. Click Finish and start the VM.

  10. Select the VM (e.g., Datacenter, myserver, 100 (ubuntu-desktop)). Click the Start button and then open the Console to proceed with the ubuntu installation.

Installing Ubuntu on the VM

  1. Follow the Ubuntu installer prompts as you would on a physical machine:

    Language: English or your preference.
    Keyboard Layout: English (US) or your preference.
    Connect to the Internet: Use wired connection is usually correct for Proxmox’s default bridged networking (vmbr0).
    Install Ubuntu.
    Installation Type: Interactive installation is the default graphical wizard installer.
    What apps do you like to start with? Extended selection.
    Install recommended proprietary software”: enable Install third-party software and support for additional media formats.
    Partitioning. For simplicity, you can accept defaults: Erase disk and install Ubuntu. It will use the entire virtual disk you assigned in Proxmox for your Ubuntu VM.
    Encryption and file system: No encryption is simpler and fine for most use cases unless specific security needs or requirements dictate otherwise.
    Create the default user. Ubuntu’s installer will ask for a username and password; Location & Timezone: Set as appropriate, e.g., Europe/Madrid.
    Finish installation by clicking on Restart now.

  2. Remove the Installation Medium. This is an important step to prevent the VM from booting into the installer again. Select the virtual machine, Go to the Hardware tab, you’ll see a list of attached storage devices. Click on the installation medium (e.g., CD/DVD Drive), select it, click Edit, and choose Do not use any media.

  3. Configure VM Options in Proxmox. Select the virtual machine in Proxmox web UI, go to the Option tab, you may want to enable Start at boot (the VM will automatically start when the Proxmox host boots) and QEMU Guest Agent (it allows Proxmox to properly communicate with the guest agent).

  4. Post-Install Setup of the Ubuntu Guest.

Initial Ubuntu Prompts You might see prompts like “Updated software has been issued since Ubuntu [Version] was released. Do you want to install it now?” Clicking Install Now is the way to go. Similarly, you might be asked to “Help improve Ubuntu”. Choose No, don't share/send system data. Open a terminal and perform the following setup tasks:

# Update the system's package list and upgrade all installed packages
sudo apt update && sudo apt dist-upgrade

# Install and enable QEMU Guest Agent.
# It facilitates better communication between the host (Proxmox) and the guest OS (Ubuntu VM).
# It allows for graceful shutdown of the guest OS from the Proxmox web interface or command line, reducing the risk of data loss.
# It enables features like shutdown/reboot and snapshots from Proxmox.
# It allows the host to retrieve information about the guest OS, such as CPU usage, memory IP address, and disk usage.
sudo apt install qemu-guest-agent
sudo systemctl start qemu-guest-agent
# Let's check that it is up and running
sudo systemctl status qemu-guest-agent
# Press 'q' to exit the status view

# Install SSH Server (remote terminal access to the VM)
sudo apt install openssh-server
# Start the SSH service with
sudo systemctl enable --now sshd

# Post-install cleanup
# It frees up disk space by deleting old downloaded package files (leftover packages) that are no longer needed
sudo apt clean
# Removes packages that were automatically installed to satisfy dependencies
# for other packages and are now no longer needed
sudo apt autoremove

# Grant sudo privileges to our user
sudo usermod -aG sudo username

# Verify sudo privileges for your user
groups $(whoami) # Should list 'sudo' among the groups
# If for some reason, this is not the case:
sudo visudo # Then, add this line:
sudo username ALL=(ALL:ALL) ALL
# Replace 'username' with the actual username.
sudo shutdown now

Resizing the Virtual Disk and Expanding Partitions in the Guest

It’s not unusual to need more disk space for your VM as your Ubuntu system grows. Proxmox allows you to enlarge the virtual disk fairly easily.

  1. Shut down the VM: sudo shutdown -h now.

  2. Shut down the VM: In the Proxmox Web UI, select the VM, go to the Hardware tab, select the Hard disk you want to resize (e.g., scsio0), click on Disk Action and choose Resize. Proxmox will prompt for how much to add to the disk (in GiB, e.g., 16 or 20GB) and confirm the resize operation by clicking on Resize. If you prefer CLI, type qm resize scsi0 +20G.

  3. Expanding the partition and filesystem inside Ubuntu
    # Identify your partition layout.
    sudo fdisk -l
    [...]
    GPT PMBR size mismatch (209715199 != 251658239) will be corrected by write.
    The backup GPT table is not on the end of the device.
    
    Disk /dev/sda: 120 GiB, 128849018880 bytes, 251658240 sectors
    Disk model: QEMU HARDDISK
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    
    Device       Start       End   Sectors  Size Type
    /dev/sda1     2048   2203647   2201600    1G EFI System
    /dev/sda2  2203648 209713151 207509504 98.9G Linux filesystem
    

    This output shows: /dev/sda: 120 GiB (resized disk), /dev/sda2 is your root partition with an ext4 filesystem: 98.9 GiB (partition not yet expanded). Resize the Partition with parted (we want /dev/sda2 to use all available space): sudo parted /dev/sda

    # Resize the Partition
    sudo parted /dev/sda
    Using /dev/sda
    Welcome to GNU Parted! (parted) print
    Warning: Not all of the space available to /dev/sda appears to be used, you can fix the GPT to use all of the space (an extra 41943040 blocks)
    or continue with the current setting?
    # Type Fix and press Enter. This corrects the GPT to recognize the full new disk size.
    Fix/Ignore? Fix
    Model: QEMU QEMU HARDDISK (scsi)
    Disk /dev/sda: 129GB
    Sector size (logical/physical): 512B/512B
    Partition Table: gpt
    Disk Flags:
    
    Number  Start   End     Size    File system  Name  Flags
    1      1049kB  1128MB  1127MB  fat32              boot, esp
    2      1128MB  107GB   106GB   ext4
    # Resize the partition (assuming partition 2 is your target and you want it to use all available contiguous space):
    (parted) resizepart 2 100%
    Warning: Partition /dev/sda2 is being used. Are you sure you want to continue?
    # It might warn that the partition is in use (root partition).
    # Type Yes to continue. parted modifies the partition table entry.
    Yes/No? Yes
    quit
    
    # Now that the partition is larger, you need to tell the filesystem (e.g., ext4) to use the new space.
    sudo resize2fs /dev/sda2
    
    nmaximo7@nmaximo7-UbuntuVM:~$ df -h
    Filesystem      Size  Used Avail Use% Mounted on
    tmpfs           741M  1.8M  740M   1% /run
    /dev/sda2       117G   11G  100G  10% /
    /dev/sda1       1.1G  6.2M  1.1G   1% /boot/efi
    tmpfs           3.7G  8.0K  3.7G   1% /tmp
    [...]
    

    You may have noticed many tmpfs entries in your df -h output. This is completely normal for modern Linux systems, including Ubuntu.

    tmpfs stands for “Temporary File System”, a type of filesystem that keeps all of its files in virtual memory, meaning that the data is primarily stored in your RAM (fast for file operations).

  4. Verify and Reboot

More things to do post-installation

  1. Passwordless SSH. To copy your SSH key to the VM (remote server) for your user, you can use the ssh-copy-id command: ssh-copy-id nmaximo7@192.168.1.41.
  2. Software Updates. Keep your system secure and up to date: sudo apt update && sudo apt upgrade.
  3. Install Additional Drivers. If your VM uses specialized hardware (e.g., GPU passthrough) or you need proprietary drivers: open Software & Updates, go to the Additional Drivers, select and apply any recommended proprietary drivers, e.g., an NVIDIA driver if you passed through your NVIDIA GPU.
  4. Enable “Minimize on Click” in GNOME Dock: gsettings set org.gnome.shell.extensions.dash-to-dock click-action minimize.
  5. Enable AppImage, Flatpak, and Multimedia Support: sudo apt install libfuse2 flatpak ubuntu-restricted-extras. Then, add the Flathub repository flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
  6. Install useful software: sudo apt install synaptic vlc gnome-tweaks unzip p7zip unrar gimp transmission audacity neofetch

    VLC is a free and open source cross-platform multimedia player. unzip p7zip unrar are archive tools for extracting zip, rar, 7z, etc. GIMP is a free, open-source, and feature-packed image editor with Photoshop-style functionality. Gnome-Tweak-Tools helps you to customize your Linux to look better: themes, fonts, etc. Transmission is a fast, easy and free Bittorrent client. Audacity is a free, easy-to-use, multi-track audio editor and recorder. Neofetch is a tool to quickly view OS, kernel, CPU, RAM, and more in the terminal.

  7. Customizing your Ubuntu Appearance. Go to the Ubuntu Desktop Settings, Ubuntu Desktop, disable Show Home Folder, toggle Auto-Hide the Dock, choose Panel Mode (dock, panel) and adjust Icon size. Text and cursor size: Settings, Accessibility, Seeing, turn on Large Text and increase Cursor Size for better visibility.
Bitcoin donation

JustToThePoint Copyright © 2011 - 2025 Anawim. ALL RIGHTS RESERVED. Bilingual e-books, articles, and videos to help your child and your entire family succeed, develop a healthy lifestyle, and have a lot of fun. Social Issues, Join us.

This website uses cookies to improve your navigation experience.
By continuing, you are consenting to our use of cookies, in accordance with our Cookies Policy and Website Terms and Conditions of use.