Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions

Hyper-V VHD expanding everyday. How to reduce the VHD Size.

Posted on 2014-03-20
Last Modified: 2014-11-12
I have a RAID Array 250GB usable space configured with 5 Partitions 50GB each..
I have installed 5 VMs Each VM in each drive.
Out of that 2 VMs expanding every day aprox 0.5-1GB expansion/day.
all other partions are having more 50% free space.
The data within in the VM is the same no change.

VHD size is 45GB+ in these 2 partitions

How to reduce the VHD size of these 2 partitions.
Question by:-MAS

Expert Comment

ID: 39942937
In normal usage, and over time, some VM's grow when dynamic disks are used. This is a good thing if you need them to grow, but, in your case, since you don't have much room for them to grow, I would say you have two choices.

1. Establish a schedule for compacting the disks. This should be done often enough to avoid the disk attempting to expand more than it has capacity to do so.
     - If you have 10GB of room and you grow 1 GB per day, then you must compact at least every 9 days.

2. Rebuild the VM's as "fixed disks" to keep them from growing dynamically. The downside is - you may run out of disk space for paging, normal operations, etc. but at least your VM's will NOT expand and fill up the actual partition they are on.

Let me know if this is helpful, or, if I misunderstood your situation.
LVL 25

Author Comment

ID: 39945157
I am wondering why only these 2 VMs expanding like this.
I think I gave 127GB HDD space for these 2VMs.  Could be bcoz of that?
Rest all 3 I gave 50GB space in the VM

And recently installed windows7SP1 automatically by the windows update.
This could be the reason?
LVL 20

Expert Comment

by:Svet Paperov
ID: 39945313
As far as I see the issue has been cause by the fact that the initial 250GB space has been split in 5 partitions. This was not a recommended configuration and it basically removes one the main advantages of virtual machines, like sharing disk space.

As a long-term solution I would recommend reverting back to a single space for all VHD files. There are two ways to do it, depending on where the config files are located. If they are located on the same 50GB volumes then the only available solution will be to export all virtual machines, delete them from Hyper-V manager, remove all 50GB partitions and create a single one of 250GB, then import the virtual machines back. If the config files reside on different volume, then you don’t need to export/import the full VM – only copy the VHD files out and then back to the big volume and reattach them to the VMs. Note, that you must not have snapshots if the second method is used.
Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

LVL 25

Author Comment

ID: 39945404
@Svet Paperov
I know it is not recommended but I am having another RAID array with is less than 250GB
I am mirroring the partition to the other partition in the second RAID using windows mirroring.
LVL 17

Expert Comment

by:Gerald Connolly
ID: 39946743
What is different about these two VMs? What is it that is grabbing the extra space?
LVL 25

Author Comment

ID: 39946891
It's recently updated by SP1 and few other updates. It has HDDsize 127gb
LVL 25

Author Comment

ID: 39952562
I noticed one thing today. The other VMs also started the same issue.
This is bcoz of windows updates and SP1 installation.

How to reduce the size ?
LVL 20

Assisted Solution

by:Svet Paperov
Svet Paperov earned 500 total points
ID: 39953090
You can resize the dynamic VHD files and convert them to fixed VHD. First, you will have to reduce the partition size in the virtual machine. Then, reduce the size of the VHD file by using VHDResizer (still) available for download here http://www.brothersoft.com/vhd-resizer-336963.html

Note, that this tool works on the old VHD files only and it does not support the new VHDX files.
LVL 25

Author Comment

ID: 39963303
Appreciate if you can keep it open for couple of days more as the proposed solutions was not successful yet.
Or if you want me to close and reopen please let me know
LVL 25

Accepted Solution

-MAS earned 0 total points
ID: 39964563
I deleted the restore points and turned off the "System Restore"

Then compacted HDD (built-in feature in Hyper-V)and it reduced the HDD size.
LVL 25

Author Closing Comment

ID: 39974497
Thanks to all experts

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Unable to ping a server in the same subnet 10 90
PC trouble to connect to file server 6 38
File Screening 1 15
Domained Joined Hyper-v question 2 21
Last article we focus in how to VMware: How to create and use VMs TAGs – Part 1 so before follow this article and perform the next tasks, you should read the first article how to create the TAG before using them in Veeam Backup Jobs.
In this article, I am going to show you how to simulate a multi-site Lab environment on a single Hyper-V host. I use this method successfully in my own lab to simulate three fully routed global AD Sites on a Windows 10 Hyper-V host.
This tutorial will walk an individual through the steps necessary to configure their installation of BackupExec 2012 to use network shared disk space. Verify that the path to the shared storage is valid and that data can be written to that location:…
This tutorial will show how to configure a new Backup Exec 2012 server and move an existing database to that server with the use of the BEUtility. Install Backup Exec 2012 on the new server and apply all of the latest hotfixes and service packs. The…

860 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question