Virtual server disk space

intelogent
intelogent used Ask the Experts™
on
hi,

we are using a server 2012 running hyperV  . hyper V houses a virtual file server( FS1 ), and a virtual terminal server ( TS1 ).

We noticed that the disk space on my hyper V server had been used and there was very little left.  my tech, and I am no tech, said that for a temporary time,  I had copied a large file on to my FS1 , which allocated space from my HyperV.    and that although I deleted the file from FS1,  the hyper V server does not contract, even after the FS1 server deleted the large file

he explained it this way... it was like putting a big box on my hyper V  with data in it.  then subsequently removing the contents of the box, did not affect the fact that hyper v was still accommodating the size of that box.

sounds all good, but my hyper V C drive is a color of bright red in my file explorer and it concerns me with a relatively small amount of disk space free , at least seemingly so.

Can anyone confirm this is how it functions, and is there a type of a Defrag program which reclaims this unused space for my hyper V server ?
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Technology and Business Process Advisor
Most Valuable Expert 2013
Commented:
Yes, this is how it functions.  The VHDs/VHDx files ONLY EXPAND automatically (assuming you are using Dynamic VHDs).  If you want to contract them, you need to COMPACT them - open the settings for the VM and edit the Virtual Hard drives - one of the options should be compact.
Abraham DeutschIT professional
Top Expert 2016
Commented:
Window has a built in  defragment feature. Did you try it?
Lee W, MVPTechnology and Business Process Advisor
Most Valuable Expert 2013

Commented:
Also note: it's REALLY BAD to put EVERYTHING on the C: drive - your VHDs should be on a D: (or other drive letter) drive.  If the disk fills, the VMs will PAUSE-CRITICAL and you won't be able to start them until you free sufficient space.  Further, by putting everything on C: Windows could crash and you might not be able to free sufficient space.  

And compacting VHDs does NOT GUARANTEE they will shrink or shrink by as much as you think.  It depends on where in the VHD the data is stored.

Defragmenting before does NOT GUARANTEE they will shrink completely either.

Another problem with putting VHDs on the same drive - FRAGMENTATION - this can slow overall performance.  Partitions act as hard boundaries - I put one, MAYBE two VHDs on a partition to minimize fragmentation.

If you don't understand dynamic disks and what could happen, I STRONGLY DISCOURAGE THEIR USE!  At this point, I would advise you to get two (or more) new drives, setup a new RAID array, and move one if not both sets of VHDs to the new drive - MAKE SURE that new drive is LARGER than the VHDs report to the OS.
JavaScript Best Practices

Save hours in development time and avoid common mistakes by learning the best practices to use for JavaScript.

Author

Commented:
lee

if they compact will it affect performance in any way ?
and compacting is not the same as compression is it ?
if not can you please talk about the differences?
Lee W, MVPTechnology and Business Process Advisor
Most Valuable Expert 2013

Commented:
Where do you see "compression"?

Go to your lab and go through the process.  The wizard explains the differences between options.

*IF* it affects performance it should improve it since the file size gets smaller and you're already (as I understand it) fragmented with both systems and the host OS on the same partition!

See image: http://www.virtualizationadmin.com/img/upl/image0051297801019962.jpg

Author

Commented:
thanks  friends,
i will refer this back to my techs...

excellent information.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial