Solved

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

Posted on 2014-03-20
11
1,682 Views
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.
0
Comment
Question by:-MAS
11 Comments
 
LVL 2

Expert Comment

by:dalberson
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.
0
 
LVL 24

Author Comment

by:-MAS
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?
0
 
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.
0
 
LVL 24

Author Comment

by:-MAS
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.
0
 
LVL 16

Expert Comment

by:Gerald Connolly
ID: 39946743
What is different about these two VMs? What is it that is grabbing the extra space?
0
What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
LVL 24

Author Comment

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

Author Comment

by:-MAS
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 ?
0
 
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.
0
 
LVL 24

Author Comment

by:-MAS
ID: 39963303
@Moderator
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
0
 
LVL 24

Accepted Solution

by:
-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.
0
 
LVL 24

Author Closing Comment

by:-MAS
ID: 39974497
Thanks to all experts
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Restoring deleted objects in Active Directory has been a standard feature in Active Directory for many years, yet some admins may not know what is available.
Is your company's data protection keeping pace with virtualization? Here are 7 dynamic ways to adapt to rapid breakthroughs in technology.
This tutorial will show how to push an installation of Backup Exec to an additional server in both 2012 and 2014 versions of the software. Click on the Backup Exec button in the upper left corner. From here, select Installation and Licensing, then I…
This tutorial will walk an individual through locating and launching the BEUtility application and how to execute it on the appropriate database. Log onto the server running the Backup Exec database. In a larger environment, this would generally be …

757 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now