Location:
State:
Carrier
Country
Status

Hyper-V files not being obvious use of storage


Came across an odd issue today. I was about to image backup my C drive, and I noted the storage was about 20 GB higher than I expected.

So I made all folders including hidden system folders visible, and tried to see where the extra 20 GB was being used.

So I used good old windirstat, and it showed storage as 20 GB less - how odd thought. I could not see where the extra 20 GB was in use. I then remembered by default windirstat does not display "unknown" folders. So I set it to show the unknown data size - hey presto my 20 GB but no more info than "unknown".

I was about to try and delete them, as the "unknown" folders are usually something like old restore points etc. So I did a disk cleanup first, but this did not change anything.

Did some googling, and it seems windirstat does not like long filenames. I installed treesize, and immediately it became clear the files were hyper-v files installed on the C drive (i had forgotten to set it to another drive as I usually do).

What I find interesting was that checking the folder sizes of all the folders in the root directory individually did not allow me to track down the culprit immediately. Indeed I am not sure I could even have navigated to them.

I then used move hyper-v vm option, and bam - my storage was recovered.

What is also interesting is when I check my E drive, the hyper-v folder size is correct.

So I guess the issue is related to how many directory levels the hyper-v files were buried on the C drive.

Just thought it was worth mention this in case you end up deleting your hyper-v files by accident.

Hi there.

@cereberus

Windows has problems with file names longer than 250 - 260 chars (this includes the directory names too).

I came up with this problem in trying to use a Windows machine as a media server -- loads of my music files weren't accessible from Windows.

However I believe with the Aug 2nd release of Windows (Anniversary edition) you can (finally !!!!) enable long file names.

Currently I'm using a Linux VM on HYPER-V for media serving -- works fine as I can pass through the Linux HDD's without re-formatting etc.

Things like treesizefree and Windirstats might need to be updated to reflect long file size display. If I need to look at these I usually do it via the Linux VM and using Dolphin look at the Windows files via SAMBA.

Cheers
jimbo

Hi there.

@cereberus

Windows has problems with file names longer than 250 - 260 chars (this includes the directory names too).

I came up with this problem in trying to use a Windows machine as a media server -- loads of my music files weren't accessible from Windows.

However I believe with the Aug 2nd release of Windows (Anniversary edition) you can (finally !!!!) enable long file names.

Currently I'm using a Linux VM on HYPER-V for media serving -- works fine as I can pass through the Linux HDD's without re-formatting etc.

Things like treesizefree and Windirstats might need to be updated to reflect long file size display. If I need to look at these I usually do it via the Linux VM and using Dolphin look at the Windows files via SAMBA.

Cheers
jimbo
Yeah I suspected that was the reason. I am waitingto upgrade to RS1 today :-).

med venlig hilsen.

The default storage location for virtual machine configuration files is
%programdata%MicrosoftWindowsHyper-VVirtual MachinesVM_GUID. As the both last level folder name and configuration file names themselves are 32 bit hexadecimal values, the path will be long.

I "shorten" it a bit by assigning Hyper-V its own drive, in my case D:. One extremely trivial and small "path shortening" tip: when you change default storage locations, for Virtual Hard Disks you have to make and select a folder, but Virtual Machines folder will be created automatically, meaning that if you for instance want that folder to be on root of a drive, you just select the drive:



If you do the mistake and in settings set Virtual Machines folder creating it, you'll end up having a useless extra folder level: D:Virtual MachinesVirtual Machines.

Hyper-V files not being obvious use of storage