How to Reclaim Disk Space from Virtual Machines (2024)

Microsoft Hyper-V administrators often find that virtual machines consume physical storage space far more quickly than expected and are looking for ways to reclaim disk space. Focusing on four areas will help admins reclaim lost storage space.

1. Deleted VMs

One of the first things to look for in the quest to reclaim disk space is deleted virtual machines. When you delete a virtual machine using the Hyper-V Manager, Hyper-V deletes only the virtual machine object. Virtual machines tend to vary in size, but deleting one usually frees up only about 4 MB of space.

When you create a Hyper-V virtual machine, Hyper-V creates a virtual machine folder and two sub-folders. One of those subfolders stores the virtual hard disk while the other stores the virtual machine configuration files. You can see these folders and their contents in Figure 1. In this case, the Virtual Machines folder consumes about 4 MB of space (the subfolder is empty), while the virtual hard disk is over 9 GB in size.

How to Reclaim Disk Space from Virtual Machines (1)

reclaim disk space 1

Figure 1

A Hyper-V virtual machine is very small.

Now, take a look at what happens when I delete a virtual machine. For this example, I deleted a virtual machine named Win10. As you can see in Figure 2, both of the virtual machines’ folders still exist. However, the Virtual Machines folder is empty, while the Virtual Hard Disks folder’s contents remain.

How to Reclaim Disk Space from Virtual Machines (2)

reclaim disk space 2

Figure 2

Deleting a virtual machine does not delete its virtual hard disk.

It’s likely that you can recover a significant amount of space by getting rid of orphaned virtual hard disks.

2. ISO Files and Deployment Images

Another way to reclaim disk space is to remove outdated ISO files and Windows deployment images. Granted, most organizations do not store these files on the same volume as their virtual machines. However, given how much space these items can consume, it is worth checking to see if you have any old ISO or Windows deployment image files that you aren’t using any more.

3. Deduplication

You can also try enabling deduplication on the storage volume where your virtual hard disks reside. Imagine for a moment that you have 100 virtual machines, and all of those virtual machines are running Windows Server 2019. That means that the volume contains a hundred copies of the same operating system. Enabling block-level deduplication at the volume level will almost certainly help you to regain a significant amount of space.

4. Compacting Virtual Hard Disks

When you create a new virtual hard disk in Hyper-V, you can choose to create a fixed-length virtual hard disk or a dynamically expanding virtual hard disk. A fixed-length virtual hard disk tends to be the best option for virtual machines that require peak storage performance because Hyper-V will reserve the required storage space up front. If, for example, you were to create a 100 GB virtual hard disk, Hyper-V would reserve 100 GB of disk space.

However, fixed length virtual disks tend to consume a lot of storage space, so most admins opt instead to create dynamically expanding virtual disks. In fact, dynamically expanding virtual disks are used automatically when you create a new virtual machine using the Hyper-V Manager. Unlike a fixed length virtual hard disk, a dynamically expanding virtual hard disk starts out very small, but the virtual hard disk file grows as you add data to the virtual hard disk.

The opposite is not true, however. If you were to delete data from a dynamically expanding virtual hard disk, Hyper-V would not shrink the virtual hard disk file in response to the deletion. Instead, that storage space remains occupied by the virtual hard disk file, even though it is not being used.

Fortunately, Microsoft does provide a way to shrink a dynamically expanding virtual hard disk file. This can be especially useful if you have recently removed a great deal of data from a virtual hard disk.

Make sure that the virtual machine is shut down, and then right click on the virtual machine and choose Settings from the shortcut menu. This will cause the Hyper-V Manager to open the virtual machine’s Settings page. Select the virtual hard disk that you want to compact, and click the Edit button shown in Figure 3. This will cause Windows to launch the Edit Virtual Hard Disk Wizard.

How to Reclaim Disk Space from Virtual Machines (3)

reclaim disk space 3

Figure 3

Select the virtual hard disk and click the Edit button.

Click Next to bypass the wizard’s Welcome screen. At this point, the wizard will ask you to choose the action that you want to perform. Choose Compact and click Next. You will now see a summary screen confirming that you are about to compact the virtual hard disk. Click Finish, and Windows will remove all the free space from the virtual hard disk file, shrinking the file in the process.

How to Reclaim Disk Space from Virtual Machines (2024)

FAQs

How to reclaim VM disk space? ›

In the vSphere Client, navigate to the datastore. Select Edit Space Reclamation from the right-click menu. Specify the space reclamation setting. Use the fixed method for space reclamation.

How do I free up disk space on my virtual machine? ›

Under System Settings in the Settings window, click General. Select a cleanup option. Click Clean Up Virtual Machine. This option is only available when a Windows virtual machine has disk space to reclaim, or when any virtual machine has unconsolidated snapshot files.

How do I expand my virtual machine disk space? ›

Select the virtual machine from the Inventory. Click Edit Virtual Machine Settings. Click Hard Disk. Click Utilities > Expand, enter the new size, then click Expand.

How do I reclaim unused disk space in VMware workstation? ›

To reduce the size of the disk:
  1. Defragment the disk from Windows.
  2. Shrink the virtual disk using VMware Tools.
  3. Clean up the virtual disk from the host OS using the built-in Workstation utility.
Jul 10, 2024

How do I regain disk space? ›

Follow these straightforward steps to clear up disk space and improve your computer's performance.
  1. Perform Disk Cleanup. Your computer may run slow because your hard drive has used up almost all its hard disk space. ...
  2. Uninstall programs that you no longer need. ...
  3. Remove unnecessary files. ...
  4. Store files in the Cloud.
Sep 11, 2024

How to reclaim memory in VMware? ›

  1. Identify Clusters That Have Enough Space for Virtual Machines.
  2. Examine Abnormal Host Health.
  3. Identify Datastores with Enough Space for Virtual Machines.
  4. Identify Datastores with Wasted Space.
  5. Identify the Virtual Machines with Resource Waste Across Datastores.
Dec 9, 2022

How do you solve there is not enough space on the disk? ›

Free up space with Disk Cleanup
  1. In the search box on the taskbar, type disk cleanup, then select it from the results.
  2. Select the drive you want to clean up files for, then select OK.
  3. Select the check box next to the type of files you want to delete.

How can I free up disk space easily? ›

Summary: Learn how to free up disk space on your computer. Includes removing temporary files, shadow copies, and more.
  1. Run Disk Cleanup.
  2. Free up disk space with Storage Sense (Windows 10)
  3. Uninstall non-essential applications and games.
  4. Move personal data to external hard drive.
  5. Save new personal files to another hard drive.

How to reclaim unallocated disk space in Hyper-V? ›

From within the VM, you can zero out any free space using an appropriate tool, then do a full defrag of the disk. This should allow you to shrink the partition size (again, within the VM) using Disk Management, leaving an unused block of un-partitioned space at the end of the drive.

How do I increase the size of my virtual hard disk? ›

In the left menu under Settings, select Disks. Under Disk name, select the disk you want to expand. In the left menu under Settings, select Size + performance. In Size + performance, select the disk size you want.

How do I expand the C drive on a virtual machine? ›

Right-click the C drive in Disk Management and select “Extend Volume”.
  1. 2.1. In the Extend Volume Wizard window, click “Next” to continue.
  2. 2.1. Select disk which contains the unallocated space to extend the system drive, and hit on “Add” >“Next”. ...
  3. 2.1. Then click “Finish” and wait for the process to accomplish.
  4. 2.2. ...
  5. 2.2.

How to increase disk size of your existing virtual machines in VirtualBox? ›

In VirtualBox, go to File > Virtual Media Manager and use the slider to adjust the disk size. Remember to back up your virtual hard disk file before making any changes, as there is a chance something can go wrong.

How do I free up disk space on my VM? ›

If your VM has snapshots, open Snapshot Manager and remove the ones you no longer need. In most of the situations this will also reduce virtual machine size. Note: If you have many branches of snapshots, deleting one of the parent snapshots may cause the virtual disk size increase.

How do I liberate disk space? ›

Here's how to free up disk space in Windows:
  1. Empty the Recycle Bin. For many people, a hard drive cleanup will begin and end by emptying the trash can. ...
  2. Use Disk Cleanup. ...
  3. Delete temporary files. ...
  4. Delete duplicate files. ...
  5. Uninstall applications. ...
  6. Configure System Restore.
May 7, 2021

How do I clear unused disk space? ›

  1. Select Start > Settings > System > Storage > Cleanup recommendations. Open Storage settings.
  2. Select the temporary files, unused files, files synced to the cloud, or unused apps you want to remove, then select the Clean up button for each section.

How do I recover data from a virtual disk? ›

Method 1: Check Your Backups
  1. Open the Start menu.
  2. Type “control panel” and launch the Control Panel app.
  3. Navigate to System and Security > File History.
  4. Click Restore personal files.
  5. Navigate to the folder where the virtual machine disk image was stored.
  6. Select a previous version of the folder.
  7. Click Restore.
Jan 13, 2023

How do I rebuild a virtual disk? ›

Rebuild via CLI
  1. Open a DOS window (Windows) or a Terminal (Linux).
  2. Run the command omconfig storage pdisk action=rebuild controller=Controller ID pdisk=Physical disk ID to rebuild. ...
  3. "Command successful!" message is displayed and rebuild process starts.

Does deleting the VM from Hyper V delete the disks? ›

The Remove-VM cmdlet deletes a virtual machine. Running this cmdlet deletes the virtual machine's configuration file, but does not delete any virtual hard drives. If the virtual machine has any snapshots, these are deleted and merged into the virtual hard disk files after the virtual machine is deleted.

Top Articles
History of Stock Market Crashes In India - Known And Unknown
Change the Windows regional settings to modify the appearance of some data types in Access databases.
Koopa Wrapper 1 Point 0
Melson Funeral Services Obituaries
Frederick County Craigslist
Enrique Espinosa Melendez Obituary
Week 2 Defense (DEF) Streamers, Starters & Rankings: 2024 Fantasy Tiers, Rankings
Best Big Jumpshot 2K23
Maria Dolores Franziska Kolowrat Krakowská
Lifebridge Healthstream
30 Insanely Useful Websites You Probably Don't Know About
Body Rubs Austin Texas
Publix 147 Coral Way
Progressbook Brunswick
Www.paystubportal.com/7-11 Login
Fire Rescue 1 Login
Craigslist Pets Southern Md
No Strings Attached 123Movies
Dallas Cowboys On Sirius Xm Radio
boohoo group plc Stock (BOO) - Quote London S.E.- MarketScreener
Nine Perfect Strangers (Miniserie, 2021)
Military life insurance and survivor benefits | USAGov
Play It Again Sports Norman Photos
Disputes over ESPN, Disney and DirecTV go to the heart of TV's existential problems
Dr Seuss Star Bellied Sneetches Pdf
Afni Collections
Maine Racer Swap And Sell
Jurassic World Exhibition Discount Code
Dexter Gomovies
WPoS's Content - Page 34
Albertville Memorial Funeral Home Obituaries
Imagetrend Elite Delaware
Elijah Streams Videos
Craigslist Sf Garage Sales
134 Paige St. Owego Ny
Stolen Touches Neva Altaj Read Online Free
Tyler Sis 360 Boonville Mo
Otter Bustr
Dollar Tree's 1,000 store closure tells the perils of poor acquisitions
Tyler Perry Marriage Counselor Play 123Movies
Ursula Creed Datasheet
O'reilly's Palmyra Missouri
The Wait Odotus 2021 Watch Online Free
Florida Lottery Claim Appointment
Blue Beetle Showtimes Near Regal Evergreen Parkway & Rpx
Deezy Jamaican Food
News & Events | Pi Recordings
Fine Taladorian Cheese Platter
Mytmoclaim Tracking
Black Adam Showtimes Near Cinemark Texarkana 14
Southwind Village, Southend Village, Southwood Village, Supervision Of Alcohol Sales In Church And Village Halls
Laurel Hubbard’s Olympic dream dies under the world’s gaze
Latest Posts
Article information

Author: Kerri Lueilwitz

Last Updated:

Views: 6271

Rating: 4.7 / 5 (67 voted)

Reviews: 82% of readers found this page helpful

Author information

Name: Kerri Lueilwitz

Birthday: 1992-10-31

Address: Suite 878 3699 Chantelle Roads, Colebury, NC 68599

Phone: +6111989609516

Job: Chief Farming Manager

Hobby: Mycology, Stone skipping, Dowsing, Whittling, Taxidermy, Sand art, Roller skating

Introduction: My name is Kerri Lueilwitz, I am a courageous, gentle, quaint, thankful, outstanding, brave, vast person who loves writing and wants to share my knowledge and understanding with you.