How to Increase VM Disk in Proxmox [2024] : Create or resize

Introduction

This guide will tackle increasing your VM disk space in Proxmox. It’s easier than you think, and I’ll walk you through every step. So, let’s get your VMs the room they need to breathe and grow!

Ho to increase VM disk in Proxmox

Understanding VM Disk in Proxmox

Before we jump into expanding disk space, let’s understand what a VM disk in Proxmox is. Essentially, a VM disk in Proxmox is a virtual hard drive. It’s where your virtual machine stores its operating system, applications, and data. Like a physical hard drive, this virtual disk has a fixed size – but with a twist. Unlike physical hardware, you can resize this virtual disk as your needs change.

In Proxmox, VM disks are managed through storage pools consisting of local storage, network-attached storage (NAS), or even more complex configurations like SAN (Storage Area Network). Each VM disk is a file or a block device on these storage pools, and they can be in various formats like qcow2, raw, or others, depending on your setup and requirements.

Understanding these basics is key to effectively managing your VMs.


Cyber Monday Deals


Hard Disk in a Virtual Machine of Proxmox

Why should you create a new VM Disk in Proxmox?

Creating a new VM Disk in Proxmox can help handle various needs, not the least of which is expanding your storage capacity. Picture this: your data is growing rapidly, and the current storage cannot keep up. Sounds scary, right? This is where the concept of creating a new disk comes to the rescue. You can use it for storing virtual machines, containers, and images. Additionally, NVMe disks, affordable and known for their speed, make for excellent choices when you’re considering adding a new VM Disk. Trust me, your Proxmox host will love it!


Does increasing disk size affect my data?

The short answer is, no, it should not. Increasing the size of your VM Disk in Proxmox doesn’t translate to immediate data loss. It is more like adding an extra room to your house to store more items. You get extra storage space to accommodate more data. However, a word to the wise: messing up with partitions while increasing disk size without knowing what you’re doing can lead to data loss. Hence, it’s highly recommended to back up your data before making any changes for your peace of mind.


Back-Up Your Data for Safety

A backup becomes essential for data safety as your virtual machine (VM) grows. With Proxmox, you can use the newly added storage space as backup storage for your VMs and containers. Just follow these steps:

  1. Select the VM to back up in the Proxmox web interface.
  2. Click on the “Backup” button in the top menu.
  3. In the “Backup” window, select the new storage space as the “Storage” target and configure other backup options as needed. Click “Backup” to start.
  4. Monitor the backup progress in the “Task Log” tab.

Now, you can rest easy knowing your data is safe and sound.


Backup in Proxmox

Increase VM Disk in Proxmox – How?

  • In the left-hand pane, click on ‘Datacenter’, then select the server, and finally choose the VM where you want to add the disk
  • With the VM selected, click on the ‘Hardware’ tab in the right-hand pane.
  • Click the ‘Add’ button and select ‘Hard Disk’ from the dropdown menu.

Adding a Hard Disk

A new window will appear where you can configure the disk settings:

  • Storage: Choose the storage where the disk will be located.
  • Disk size: Specify the size of the new disk.
  • Format: Select the disk format (e.g., qcow2, raw).
  • Bus/Device: Choose the bus type (e.g., VirtIO, SCSI, IDE).
  • Cache: Set the cache mode if necessary.
  • Additional options: Configure any additional options as needed.

Proxmox Disk Options

  • After configuring the settings, click ‘Create’. The new disk will be added to your VM.
  • The new disk should now be listed under the ‘Hardware’ tab of your VM. You can also verify its presence within the VM’s operating system.

Tips:

  • VM State: Adding disks while the VM is shut down is generally recommended to avoid any potential issues.
  • Disk Size: Ensure the disk size is within the limits of your storage backend.

How to expand/resize a VM disk in Proxmox

  • In the left-hand pane, click on ‘Datacenter’, then select the server, and choose the VM whose disk you want to expand.
  • With the VM selected, click on the ‘Hardware’ tab in the right-hand pane.
  • Locate the disk you want to expand in the list of hardware components. It’s usually labeled as ‘Hard Disk’ with its corresponding storage device identifier (e.g., virtio0, sata0, etc.).
  • Click on the disk to select it, then click the ‘Disk Action’, Resize
  • In the resize dialog, enter the increment size.

Resize VM Disk

VM Disk Size increment
  • Click ‘OK’ or ‘Resize’ to confirm and apply the new disk size.

Check the boot order after adding a new VM Disk.

When adding a new disk to a VM in Proxmox, paying attention to the boot order settings is crucial. This step is often overlooked but can be vital, primarily if the new disk is not intended to be the primary boot device. Incorrect boot order settings can lead to boot issues or the VM attempting to boot from the wrong disk.

After adding a new disk, always double-check the VM’s boot order configuration to ensure it aligns with your intended setup. This simple check can save you from potential headaches caused by boot-related problems and ensures a smooth, uninterrupted operation of your VMs


VM Boot Order

Does reducing VM disk size make sense?

Reducing the size of a VM disk is generally not recommended and can be quite risky. It’s a complex process that often involves shrinking the file system first, which carries a significant risk of data loss if not done correctly. Additionally, many virtualization platforms, including Proxmox, don’t natively support reducing the size of a VM disk due to these risks. However, advanced users may be able to utilize tools such as GParted to safely and effectively reduce the size of the VM disk.

In most cases, it’s safer and more practical to manage disk usage within the VM, such as by deleting unnecessary files or using disk cleanup tools, rather than attempting to reduce the disk size itself. If you need a smaller disk size, it’s often better to create a new VM with the desired disk size and migrate the necessary data. However, some virtualization software may offer a resize option that allows you to adjust the disk size without creating a new VM.


Dealing with Different Operating Systems


Understanding Windows Partitions Created During Installation

When you install Windows on a virtual machine, the setup process automatically creates several partitions, each serving a specific purpose. The most notable ones are:

  • This small partition, usually around 100-500 MB, is crucial for booting Windows. It contains the Boot Manager, Boot Configuration Data, and other system files needed for startup.
  • This is the main partition where the Windows operating system, your applications, and files are stored. Its size varies depending on the total disk space allocated during installation.

Understanding these partitions is key when resizing or modifying your VM’s disk space, especially if you want to increase the boot partition size.

When setting up a Windows VM in Proxmox, carefully plan your disk space allocation. Ideally, size the installation disk (C: drive) appropriately before installing Windows, ensuring it has enough space for the operating system and essential applications. This foresight can prevent the need for complex resizing operations later on.

Adding a separate disk to your virtual machine is a good idea if you need more storage space for things like user data, documents, or specific applications. You can mount this disk as the D: drive (or any other letter you prefer) within Windows. This approach makes it easier to manage your disks, keeps your data organized, and can help improve your system’s performance and backup efficiency.

The screenshot below displays the resized Proxmox disk we completed earlier. However, only the last partition can be expanded in the Windows guest, not the C Drive.

However, with partition tools, you can rearrange the partition Windows created during setup. This process needs more time, and I don’t recommend it.


httpsoutranking.s3.amazonaws.com70718 Edy20Werder601714972023 11 10T103A413A53.490362 Windows Guest partition structure

Some references for Partition management.

  1. Quora Discussion on Partition Management Tools: This Quora thread discusses various tools for managing hard disk partitions in Windows, including built-in options and third-party software.
  2. How to Geek Guide: This How to Geek article explains how to manage partitions on Windows without downloading any additional software, focusing on using the built-in Disk Management tool.

Initializing and Using a New VM Disk in Windows

Step 1: Add a New Disk to Your VM in Proxmox

  • Before starting with Windows, ensure you’ve added a new disk to your VM in Proxmox. This can be done through the Proxmox web interface under the VM’s ‘Hardware’ tab.

Step 2: Start Your Windows VM

  • Boot up your Windows VM where you’ve added the new disk.

Step 3: Open Disk Management in Windows

  • Once logged into Windows, right-click the ‘Start’ button and select ‘Disk Management’. This utility allows you to manage disk drives in Windows.

Step 4: Initialize the New Disk

  • In Disk Management, you should see the new disk listed as ‘Unknown’ and ‘Not Initialized’.
  • Right-click on the new disk, select “Online” and then ‘Initialize Disk’.
  • Choose the partition style: MBR (Master Boot Record) or GPT (GUID Partition Table). GPT is recommended for modern systems.

Windows Guest: Adding a new hard disk

Step 5: Create a New Volume

  • After initializing, right-click on the unallocated space of the new disk and select ‘New Simple Volume’.
  • Follow the New Simple Volume Wizard to:
  • Specify the volume size.
  • Assign a drive letter (like D: or E:).
  • If desired, format the volume with a file system like NTFS or REFS (recommended) and set a volume label (disk name).

Step 6: Complete the Setup and Use the Disk

  • Once the wizard completes, the new disk will be ready for use and will appear in ‘This PC’ as a new drive with the assigned letter.

Increasing VM Disk Size for Linux Guests

There are a lot of Linux flavors available. I stick to this article for the Ubuntu distro.

In a standard installation of Ubuntu Server 22.04, the partition structure is designed to be straightforward and efficient, particularly when following the recommended setup. The installer primarily creates the following key partition:

  • Root Partition (/): This is the central partition where the Ubuntu operating system and all system files, applications, and user data are stored. It forms the core of the Ubuntu file system hierarchy.

Unlike previous versions, Ubuntu Server 22.04 typically uses a swap file instead of a dedicated swap partition. The system dynamically manages this swap file and resides.

For more detailed information, you can use:

fdisk -l (requires superuser privileges):

  • Type sudo fdisk -l and press Enter.
  • This command provides detailed information about each disk and its partitions, including the type, size, and partition ID.

Ubuntu standard partition

    Adding and Mounting a New Disk in Ubuntu

    Step 1: Verify the New Disk

    • After adding the new disk to your system, open a terminal.
    • Use lsblk to list all block devices and confirm the new disk is recognized (e.g., /dev/sdb).
    Verify the disk added

    Step 2: Partition the Disk with fdisk

    • Start fdisk with superuser privileges: sudo fdisk /dev/sdb (replace /dev/sdb with your disk identifier).
    • To create a new partition, type n and follow the prompts to specify partition size and type.
    • Once you’ve created the partition, type w to write the changes and exit fdisk.

    Step 3: Format the New Partition

    • Format the new partition with a file system, like ext4, using: sudo mkfs.ext4 /dev/sdb1 (replace /dev/sdb1 with your new partition identifier).

    Step 4: Create a Mount Point

    • Create a directory to mount the new partition: sudo mkdir /mnt/newdisk (you can replace /mnt/newdisk with your preferred mount point).

    Step 5: Mount the New Partition

    • Mount the partition to the directory: sudo mount /dev/sdb1 /mnt/newdisk.

    Step 6: Automate Mounting on Boot

    • To mount the partition automatically at boot, edit the /etc/fstab file.
    • Use sudo nano /etc/fstab (or your preferred editor) to open the file.
    • Add a new line: /dev/sdb1 /mnt/newdisk ext4 defaults 0 2 (adjust the partition identifier and mount point as necessary).
    • Save and close the file.

    Step 7: Verify the Setup

    • Verify the mounting works: df -h It should now show the new partition mounted in your specified directory.

    Verify the mounting works

      Important Notes:

      • Disk Identifier: Replace /dev/sdb and /dev/sdb1 with the actual identifiers for your disk and partition.
      • File System: ext4 It is a common choice, but you can use other file systems as needed.

      Before you go..

      And there we have it! You’ve just increased your VM Disk in Proxmox, step by step. Now, if you’re as thrilled about Proxmox as I am and wonder how it squares up against other server virtualization platforms, I’ve got just the read for you. Head on over to my other blog post, “Proxmox vs. ESXI: Is Proxmox an alternative to ESXi?” where I dive into a detailed comparison. I’m sure you’ll find it enlightening!

      Full Disclosure

      Any purchases made from clicks on links to products on this page may result in an affiliate commission for me. 

      Please keep in mind that the quantity or price of items can change at any time.

      As an Amazon  Associate, I earn from qualifying purchases.

      As an Aliexpress Associate, I earn from qualifying purchases. 

      Als Amazon-Partner verdiene ich an qualifizierten Verkäufen

      Leave a Reply

      Your email address will not be published. Required fields are marked *

      For security, use of Google's reCAPTCHA service is required which is subject to the Google Privacy Policy and Terms of Use.

      I agree to these terms.