Solved

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

Posted on 2014-03-20
11
1,895 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
[X]
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
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 26

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
When ransomware hits your clients, what do you do?

MSPs: Endpoint security isn’t enough to prevent ransomware.
As the impact and severity of crypto ransomware attacks has grown, Webroot fought back, not just by building a next-gen endpoint solution capable of preventing ransomware attacks but also by being a thought leader.

 
LVL 26

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 17

Expert Comment

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

Author Comment

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

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 26

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 26

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 26

Author Closing Comment

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

Featured Post

Free eBook: Backup on AWS

Everything you need to know about backup and disaster recovery with AWS, for FREE!

Question has a verified solution.

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

This article explains how to install and use the NTBackup utility that comes with Windows Server.
Ransomware is a malware that is again in the list of security  concerns. Not only for companies, but also for Government security and  even at personal use. IT departments should be aware and have the right  knowledge to how to fight it.
This tutorial will walk an individual through locating and launching the BEUtility application to properly change the service account username and\or password in situation where it may be necessary or where the password has been inadvertently change…
This tutorial will walk an individual through setting the global and backup job media overwrite and protection periods in Backup Exec 2012. Log onto the Backup Exec Central Administration Server. Examine the services. If all or most of them are stop…

687 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