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)
Top Articles
What Are Insurance Company Codes? (2024 Guide)
What Port Does a VPN Use? VPN Unlimited Ports and Protocols
Umbc Baseball Camp
English Bulldog Puppies For Sale Under 1000 In Florida
DL1678 (DAL1678) Delta Historial y rastreo de vuelos - FlightAware
Noaa Weather Philadelphia
Paula Deen Italian Cream Cake
Nyuonsite
Acbl Homeport
Toonily The Carry
Animal Eye Clinic Huntersville Nc
Belly Dump Trailers For Sale On Craigslist
Directions To 401 East Chestnut Street Louisville Kentucky
Soccer Zone Discount Code
Ukc Message Board
1989 Chevy Caprice For Sale Craigslist
Juicy Deal D-Art
Two Babies One Fox Full Comic Pdf
Certain Red Dye Nyt Crossword
How to Make Ghee - How We Flourish
Albert Einstein Sdn 2023
Synergy Grand Rapids Public Schools
Divina Rapsing
Bleacher Report Philadelphia Flyers
Craigslist Rentals Coquille Oregon
Watson 853 White Oval
Intel K vs KF vs F CPUs: What's the Difference?
Lcsc Skyward
Ordensfrau: Der Tod ist die Geburt in ein Leben bei Gott
Himekishi Ga Classmate Raw
Christmas Days Away
Mercedes W204 Belt Diagram
Kelley Fliehler Wikipedia
Xfinity Outage Map Lacey Wa
Vistatech Quadcopter Drone With Camera Reviews
Gyeon Jahee
Lucky Larry's Latina's
AP Microeconomics Score Calculator for 2023
Are you ready for some football? Zag Alum Justin Lange Forges Career in NFL
Ludvigsen Mortuary Fremont Nebraska
Bunkr Public Albums
No Boundaries Pants For Men
Disassemble Malm Bed Frame
Mitchell Kronish Obituary
Wisconsin Volleyball titt*es
Sams Gas Price San Angelo
Ihop Deliver
Immobiliare di Felice| Appartamento | Appartamento in vendita Porto San
Gameplay Clarkston
Obituary Roger Schaefer Update 2020
Leslie's Pool Supply Redding California
Les BABAS EXOTIQUES façon Amaury Guichon
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.