Hyper-V low disk space

I have Win 2008 SP-2 Hyper-V
My only virtual machine has 3 partitions C: D: E:
They are all on the same VHD and are dymamicly sized.
I am running low on disk space on my Host data drive D: (where my VHD is)

Each of the 3 partitions has a lot of free space, and when I add up the data being used it is only about 60% of the total size of my Host D: drive. (but the VHD is taking up 95%).

I would like to shrink the partitions on the Virtual machine using GParted, but how can I tell which partition is taking up the most space in the .VHD?
I assume it is not as simple as the partition with the greatest size becuase they are all dynamically expanding and they all have free space.

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Simple, remote desktop into your remote machine and determine which disk is taking up what. If you do this from the host machine you won't get an accurate read as you said. Honestly though, I don't think you should do what you are attempting.... VHDs can get corrupted quite easily and I would suggest getting more space long before using a third party utility.

My 2 cents says - upgrade... Hope that helps.
Check that you don't have shadow copies configured on your host D: drive as this could be eating your space up.
ie0Author Commented:
I think is used to have Shadow Copies enabled but I do not now.
However I do have a very large AVHD file (which I thought is only created when shadowcopy is enabled??)
Would merging the AVHD into the VHD lessen my disk space?
If so, do I just shutdown the Virtual server and then a merge will happend automatically?
Cloud Class® Course: C++ 11 Fundamentals

This course will introduce you to C++ 11 and teach you about syntax fundamentals.

Syed Mutahir AliTechnology ConsultantCommented:
if you are satisfied with your virtual server state at the moment and you don't have the need to revert back to an earlier configuration / data set you can simply "Delete the Snapshots" to re-claim your space.

Deleting Snapshots

Managing Snapshots


Normally, I would switch off the virtual server (create a downtime if you can) and then copy the required VHDs to a external storage (USB or SAN) and that way even if something goes wrong onto the virtual server HOST itself, I can always bring up the server on another Box.

Hope this helps
ie0Author Commented:
Hyper-V manager tells me there are no snapshots for that VM.
But I have a 500GB AVHD file with tody's date.

If I merge the AVHD file to the VHD file, will I save any disk space?
Syed Mutahir AliTechnology ConsultantCommented:

         I’ve deleted some snapshots to free up storage space,  but the space hasn’t been recovered. What can I do?              
Shut down the virtual machine—or, if that action is not  available, turn off the virtual machine. Deleted virtual machine files  are not removed from the physical storage until the virtual machine is  shut down, turned off, or put into a saved state. Depending on the size  and number of snapshots, it may take awhile to delete the snapshot  files. Hyper-V Manager displays the progress when deleting the  snapshots.



Generally  speaking, we don’t recommend that you use snapshots in production  environment. With snapshots, you can perform some tests and then revert  the system back to a clear state(for example, you need to test some  applications or updates).  
After  you take a snapshot, the system will create a .avhd file, after that,  all the changes will be saved in the .avhd file. You will have worse  performance if you take several snapshots. If you reinstall the system,  you will not be able to get the VM back. You need to merge the avhds  back to the original VHD file, create a new VM and then attached the  merged VHD file.
Virtual  Machine Snapshotting under Hyper-V
Hyper-V  ignoring "Snapshot file location" setting?
Please  perform the steps in the following post to check whether you can merge  the snapshots.
In  addition, please backup your VMs in a regular time, you can us the  export function or a backup tool.
Best Regards,
Do Read the very last post from Vincent on the technet thread.

You would have to merge the avhd to vhd and then it will disappear. How long has this VM been up for ? did you shutdown today ?

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Server OS

From novice to tech pro — start learning today.