Skip to content

TechDirectArchive

Hands-on IT, Cloud, Security & DevOps Insights

  • Home
  • About
  • Advertise With US
  • Reviews
  • Contact
  • Toggle search form
Home » Windows Server » Hyper V Disk allocation: Why Veeam reports full size after Shrinking
  • SystemUtilization
    Delivering System Utilization Report on a Linux based OS Linux
  • dasfdg
    Unable to execute: The application GUID not found in the application list Windows Server
  • update powershell
    Fix WDAC vulnerabilities by updating PowerShell Security | Vulnerability Scans and Assessment
  • Install FileZilla Client
    FileZilla Client on Mac: How to Transfer Files to WordPress via SFTP Mac
  • maxresdefault
    How to add one or more external displays with your Mac Mac
  • Repository time shift detected
    Fix Repository time shift detected: Immutability flag cannot be set Backup
  • Feautured image DualBoot
    How to create a dual-boot setup on Windows 11 Windows
  • Jenkins
    How to Install Jenkins Automation Server on Ubuntu 20.04 LTS Linux

Hyper V Disk allocation: Why Veeam reports full size after Shrinking

Posted on 30/10/202530/10/2025 Christian By Christian No Comments on Hyper V Disk allocation: Why Veeam reports full size after Shrinking
VHDX resizing and veeam back

Shrinking works on both raw partitions which lack a file system, and on partitions formatted with the NTFS. This allows you to reclaim unused disk space efficiently while keeping your existing data intact. This guide is not on shrinking your virtual hard disk despite discussing the process. In this guide, we shall discuss “Hyper V Disk allocation: Why Veeam reports full size after Shrinking”. Please, see how to convert a VHDX file to a VHD, and steps o fix video Remoting was disconnected on Hyper V.

I saw this question on a Forum and had to reproduce it and blog on it. Note that if a raw partition contains data, such as a database file, shrinking the partition might destroy the data. So, be careful while also testing this.

Table of contents

  • Zero out free space inside the VM
  • Shrinking Volume in Windows
    • Size to Shrink
    • Resize-VHD cmdlet
    • Hyper-V Compact
    • Veeam reports full VM Size after Shrinking
  • FAQs

In newer versions of Hyper-V (Windows 10/11, Server 2019–2025). The “Shrink” option was removed from the Edit Virtual Hard Disk Wizard from Hyper-V.

Please, see how to shrink and create new partition on Windows Server, and how to create a Recovery Partition in Microsoft Windows 10/11, and

Zero out free space inside the VM

You can run SDelete prior to or after shrinking a volume. To maximize compaction and minimize VHDX size, run sdelete -z before shrinking. Running it after shrinking doesn’t hurt, but it’s mostly redundant for the unallocated portion outside the partition. SDelete effectively zeroes out previously used storage blocks, ensuring that free space can be reclaimed efficiently.

Note: Running SDelete isn’t mandatory, many users have reported significantly better results when using it to zero out empty blocks before shrinking the volume. I can also attest to this after running sDelete in my VM. This process helps the hypervisor recognize unused space, maximizing the reduction in virtual disk size

SDelete (Secure Delete) is useful if your VHDX file size is not shrinking even after compacting. This happens because Hyper-V does not automatically mark unused space as “zeroed” after you delete files inside the VM. You can download SDelete from Sysinternals Microsoft’s Official Webpage.

Webpage displaying the SDelete tool download page, including version details, author information, and introduction to its features.

Upon download, please extract

Screenshot of a computer file explorer showing the Downloads folder with options for managing files, including 'Extract All...' and a list of downloaded files.

I am fine with the defaults and will click “Extract”.

File extraction window showing the destination folder and options.

Files extracted. You can run PowerShell or Command Prompt from the Explorer by typing CMD or PowerShell.

File explorer window showing the path to the SDelete folder in the Downloads directory with visible files, including a text document and several application files.

Alternatively, you can run PowerShell as an “Administrator”.

Screenshot displaying the Windows PowerShell application with options to open or run as administrator.

As mentioned above, I want to run the Command Prompt directly from the File Explore.

Image of a file explorer window displaying the contents of a folder named 'SDelete', with a search bar indicating the term 'cmd'. The folder contains various files including a text document and multiple application files.

To zero out free space on a drive, run SDelete with the -z switch followed by the drive letter C in my case as shown below.

A command prompt window displaying the use of SDelete, a secure file deletion tool, showing the process of cleaning free space on the C drive.

As you can see below, free space has been reclaimed.

Command prompt window displaying the output of 'SDelete' tool indicating that free space has been cleaned on C: drive.

Please, see Demystifying Zero Trust with Veeam: Design your Architecture, “OOTBI Security Best Practices: Enable Honeypot on Object First“, and “What are the differences between Lite-Touch and Zero-Touch“.

Shrinking Volume in Windows

We have discussed this topic extensively in other articles. This blog will guide you through the steps and explain why size discrepancies can occur in Veeam Backup and Replication during backup, even after shrinking a Hyper-V VM.

To perform this task, you can launch Computer Management, Disk Management, or start the Create and Manage Hard Disk Wizard. All paths ultimately bring you to the same disk management interface where you can manage partitions and virtual disks

Screenshot of a Windows search interface displaying 'Create and format hard disk partitions' under 'Best match' with an arrow pointing to it, along with disk management web suggestions.

Right click on the drive and select “Shrink Volume”.

Screenshot of Windows Disk Management showing various disk partitions, with an emphasis on the 'Shrink Volume...' option highlighted in a pop-up menu.

The volume is being queried for available space as shown below.

Screenshot of Windows Disk Management tool showing different disk partitions, their types, file systems, and free space information. A pop-up notification indicates the system is querying available shrink space.

Please, see how to install Pleasant Password Server, how to Restore VM to Original location using Veeam Entire VM restore, and how to fix Authentication failed: Invalid credential after installing VSA

Size to Shrink

On the strink wizard, the total size of volume (C:) = 99.05 GB, and the available size to shrink = 49718 MB (≈ 48.6 GB).

Disk Management window showing options to shrink a volume, including total size and available space.

Since I want to reduce the total volume to 70 GB. We have to enter the following value of 29773 MB and click on shrink.

A computer interface displaying the 'Shrink C:' window, showing parameters for shrinking a disk volume, including total size, available space, and an input field for entering the amount of space to shrink in MB.
Shrinking the partition inside the VM from 99 GB to 70 GB

The topic of the unallocated space has been dealt with above in the referenced guide. Please, see How to Shrink and Compact Virtual Hard Disks in Hyper-V.

Screenshot of Windows Computer Management interface showing Disk Management with partitions and unallocated space.

Resize-VHD cmdlet

The Resize-VHD cmdlet changes the maximum physical size of a virtual hard disk. It can expand both VHD and VHDX files but can shrink only VHDX files. The shrink operation fails if it would shrink the virtual disk to less than its minimum size (available through the VHDX object’s MinimumSize property).

There’s no way to shrink the VHDX beyond the last used block. “Compact” alone cannot remove unallocated space at the end. You must either move the partition or create a new smaller VHDX.

resize 18.43.15

Optimizing VHDX virtual disk files helps reclaim space in dynamically expanding virtual hard disks. The Optimize-VHD cmdlet performs this task using the Compact operation, which removes unused blocks and reorganizes data for better efficiency, ultimately reducing the overall VHDX file size.

Please, see how to Compact Virtual Hard Disks on VMware, how to fix “Unknown Error occurred when installing Veeam Software Appliance“, and Offline and Online Update for Object First Out-of-the-Box Cluster.

Hyper-V Compact

SDelete zeros out the free space inside the VM, while Hyper-V Compact removes those zeroed blocks from the VHDX on the host, effectively reducing the physical file size.

Launch the Hyper-V Manager, right-click on the VM and select Settings or from the Action pane, select settings

Screenshot of Hyper-V Manager showing virtual machines with the 'Windows 11 Client' selected and menu options for settings.

Next, ensure the right VHDX file of the VM is selected. Click on the Edit Disk as shown below. This will launch the Edit Virtual Hard Disk Wizard.

Screenshot of Hyper-V Manager showing a virtual machine named 'Windows 11 Client' with its state set to 'Off'. The right panel displays settings for the virtual hard disk, including options to edit or inspect.

On the locate Virtual Hard Disk page, click on Next.

Screenshot of the 'Locate Virtual Hard Disk' wizard in a Windows environment, showing options to locate a virtual hard disk file with a warning about potential data loss when editing virtual hard disks

Select Compact and click Next.

Dialog box titled 'Edit Virtual Hard Disk Wizard' with options to compact, convert, or expand a virtual hard disk. 'Compact' option is highlighted.
Reduces the physical size of the .vhdx file on disk by removing zeroed-out blocks

Click on Finish when complete

Window displaying the completion summary of the Edit Virtual Hard Disk Wizard, showing details of the virtual hard disk and the compact action.

And finally, click on OK.

Settings window for a Windows 11 virtual machine, displaying options for managing the hard drive and its associated virtual disk.

Please, see how to add Synology NFS Storage to Proxmox VE for VMs and Backups, and how to setup Veeam Software Appliance v13.

Veeam reports full VM Size after Shrinking

After shrinking the C: partition inside the VM. The unallocated space still exists inside the VHDX. Hyper-V sees the VHDX as its original logical size. Compacting removes zeroed blocks inside partitions. But any unallocated space beyond the last used block remains logical and is not physically stored.

The unallocated space does not consume any additional physical disk space on your host. This is a common scenario when shrinking partitions in Hyper-V. The virtual disk file (.vhdx) is compacted to reflect the actual used space. But any unallocated space within the virtual disk remains logically unassigned.

In conclusion, even after shrinking the C: partition inside the VM from 100 GB to 70 GB. Veeam still sees the full 100 GB because it reads the logical disk size from the VHDX metadata. While the host sees only 70 GB physically used after compact.

The unallocated space inside the VM is effectively released to the host but still counts toward the VM’s maximum size in backups. If after resizing and you are having issues with the backup job etc. Please see kb2450.

Veeam reads provisioned disk size

Please see How to Create a Windows Server VM on Hyper-V, how to install HyperV and Configure vSwitch on Windows Server with PowerShell, and how to Fix PXE Boot Stuck or No Boot Image was found for HyperV VM.

Inspect VHDX

Even after shrinking your partition inside the VM to 70 GB and compacting the disk. When you inspect the virtual hard disk in Hyper-V Manager, it still reports 100 GB

Settings menu for a virtual machine in Windows 11, displaying hard drive information including the current file size of 50.69 GB and maximum disk size of 100 GB.
Compacting reclaims unused blocks. But it does not alter the logical maximum size. That 100 GB header stays fixed.

As you can see below, while the Hyper-V host shows only approximately over 50 GB physically used after compaction. This means that the virtual disk can still expand up to its original 100 GB limit even though only 70 GB is allocated inside the VM and just 50 GB is stored on the host.

Screenshot showing Windows 11 Client settings with a focus on the virtual hard disk configuration, displaying file path and options for managing the hard drive.
Also, from the Hyper host, you can also expand the virtual Hard Disk.

FAQs

When should I run sdelete?

Run sdelete -z before shrinking the partition. It zeroes out free space inside the VM so that compaction fully reclaims unused blocks. Running it after shrinking is mostly redundant

What is the difference between shrinking and compacting a VHDX?

“Shrink”: Reduces the logical maximum size of the VHDX, while “Compact”: Reclaims unused physical storage blocks on the host, reducing the VHDX file size. Both steps are often needed to minimize disk usage.

Can I shrink a VHDX below the size of my VM partition?

No , the resize-VHD cannot shrink a VHDX below the disk’s MinimumSize, which includes all used blocks and metadata. Shrinking beyond this limit will fail to prevent data loss.

Why does Resize-VHD fail with 0xC03A0025 (“cannot safely reduce further”)?

This error occurs when the target size is smaller than the last used block or metadata in the VHDX. PowerShell prevents shrinking below the MinimumSize to avoid data loss.

Why does Resize-VHD fail with 0xC03A0027 (“cannot reduce further”) after shrinking a partition?

Even after shrinking the partition, hidden system files or alignment metadata may extend beyond the requested size. Resize-VHD refuses to shrink below the MinimumSize reported by Get-VHD.

I hope you found this blogpost very useful on “Hyper V Disk allocation: Why Veeam reports full size after Shrinking”. Please, feel free to leave a comment.

5/5 - (1 vote)

Thank you for reading this post. Kindly share it with others.

  • Click to share on X (Opens in new window) X
  • Click to share on Reddit (Opens in new window) Reddit
  • Click to share on LinkedIn (Opens in new window) LinkedIn
  • Click to share on Facebook (Opens in new window) Facebook
  • Click to share on Pinterest (Opens in new window) Pinterest
  • Click to share on Tumblr (Opens in new window) Tumblr
  • Click to share on Telegram (Opens in new window) Telegram
  • Click to share on WhatsApp (Opens in new window) WhatsApp
  • Click to share on Pocket (Opens in new window) Pocket
  • Click to share on Mastodon (Opens in new window) Mastodon
  • Click to share on Bluesky (Opens in new window) Bluesky
  • Click to share on Threads (Opens in new window) Threads
  • Click to share on Nextdoor (Opens in new window) Nextdoor
Windows Server Tags:disk, Disk management, Disk Partition, Diskpart, Expand Volume, Hyper V, Hyper-V, Hyper-V Guest VM, hyperV, HyperV VMs, Hypervisor, Inspect VHDX, New Technology File System, NTFS, Shrink Volume

Post navigation

Previous Post: Restore VM to Original location using Veeam Entire VM restore
Next Post: Migrate Windows Servers from Hyper V to Proxmox Correctly

Related Posts

  • appp
    How to automatically reopen Windows Apps and Folders upon Startup Windows
  • WindowsServer2022
    Windows Server 2022 Capabilities: Register Windows Admin Center with Azure Windows Server
  • maxresdefault 1
    DriveLock Components: Important DriveLock components to master Windows Server
  • GPO 2
    Why GPO is not the best solution for managing Windows updates Windows Server
  • How to manage user permission in AD and Synology
    Manage User Permission on Synology with Active Directory [Part 1] Reviews
  • Featured image wifipass
    Find saved Wi-Fi Passwords in Windows 10 and 11 Network | Monitoring

More Related Articles

appp How to automatically reopen Windows Apps and Folders upon Startup Windows
WindowsServer2022 Windows Server 2022 Capabilities: Register Windows Admin Center with Azure Windows Server
maxresdefault 1 DriveLock Components: Important DriveLock components to master Windows Server
GPO 2 Why GPO is not the best solution for managing Windows updates Windows Server
How to manage user permission in AD and Synology Manage User Permission on Synology with Active Directory [Part 1] Reviews
Featured image wifipass Find saved Wi-Fi Passwords in Windows 10 and 11 Network | Monitoring

Leave a Reply Cancel reply

You must be logged in to post a comment.

Microsoft MVP

VEEAMLEGEND

vexpert-badge-stars-5

Virtual Background

GoogleNews

Categories

veeaam100

sysadmin top30a
 
  • SystemUtilization
    Delivering System Utilization Report on a Linux based OS Linux
  • dasfdg
    Unable to execute: The application GUID not found in the application list Windows Server
  • update powershell
    Fix WDAC vulnerabilities by updating PowerShell Security | Vulnerability Scans and Assessment
  • Install FileZilla Client
    FileZilla Client on Mac: How to Transfer Files to WordPress via SFTP Mac
  • maxresdefault
    How to add one or more external displays with your Mac Mac
  • Repository time shift detected
    Fix Repository time shift detected: Immutability flag cannot be set Backup
  • Feautured image DualBoot
    How to create a dual-boot setup on Windows 11 Windows
  • Jenkins
    How to Install Jenkins Automation Server on Ubuntu 20.04 LTS Linux

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 1,841 other subscribers
  • RSS - Posts
  • RSS - Comments
  • About
  • Authors
  • Write for us
  • Advertise with us
  • General Terms and Conditions
  • Privacy policy
  • Feedly
  • Telegram
  • Youtube
  • Facebook
  • Instagram
  • LinkedIn
  • Tumblr
  • Pinterest
  • Twitter
  • mastodon

Tags

AWS Azure Bitlocker Microsoft Windows PowerShell WDS Windows 10 Windows 11 Windows Deployment Services Windows Server 2016

Copyright © 2025 TechDirectArchive

 

Loading Comments...
 

You must be logged in to post a comment.