How do you all do Hard Drive (VHD) Clean-ups on Hyper-V VM's?

Just wondering what you guys do to clean up the hard drives, virtual hard drives to be exact, on virtual machines being ran by a hyper-V host. We have some VM's that need some space cleared up and there's not much space left on the host.

On some servers we've used things like ccleaner and other similar apps, but I just wanted to see what you all use on VM's to make sure I don't corrupt any of them.
Jason KidmanIT Consultant & CEOAsked:
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.

David Johnson, CD, MVPOwnerCommented:
Your problem is most likely you've over provisioned the storage volume using thinly provisioned virtual disks.  When one creates a virtual disk there is a warning about this given but people tend to ignore warnings and just react on errors. For reclaiming space on the virtual machine you do it exactly as you would on a physical machine. disk cleanup/ccleaner etc.
You can always move the virtual disks to another drive when the machine is powered down and change the disk setting to use another location (it is only a file) This will not make the .vhd(x). any smaller you can only do this by compacting the diskhyper-v disk edit
1

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
Jason KidmanIT Consultant & CEOAuthor Commented:
So is the compact option kind of like a defrag for a VHDX?  From the sound of it, it will compact the files, opening up more space on the VHDX, all without deleting any files or making the VHDX smaller.  Correct?
0
David Johnson, CD, MVPOwnerCommented:
correct best to make sure the client has defragged the drive first
0
Jason KidmanIT Consultant & CEOAuthor Commented:
thanks ans sorry for the delay!
0
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
Hyper-V

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.