Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2014-03-20
11
Medium Priority
?
2,073 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 27

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
Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

 
LVL 27

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 27

Author Comment

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

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 1500 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 27

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 27

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 27

Author Closing Comment

by:MAS
ID: 39974497
Thanks to all experts
0

Featured Post

Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

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

If your vDisk VHD file gets deleted from the image store accidentally or on purpose, you won't be able to remove the vDisk from the PVS console. There is a known workaround that is solid.
In this article, I will show you HOW TO: Perform a Physical to Virtual (P2V) Conversion the easy way from a computer backup (image).
This tutorial will walk an individual through configuring a drive on a Windows Server 2008 to perform shadow copies in order to quickly recover deleted files and folders. Click on Start and then select Computer to view the available drives on the se…
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…
Suggested Courses

916 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