Hyper-V files not being obvious use of storage

  1. cereberus's Avatar
    Posts : 12,008
    Windows10
       #1

    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.
      My Computer

  2. jimbo45's Avatar
    Posts : 10,459
    Windows / Linux : Arch Linux
       #2

    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
      My Computer

  3. cereberus's Avatar
    Posts : 12,008
    Windows10
    Thread Starter
       #3

    jimbo45 said:
    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.
      My Computer

  4. Kari's Avatar
    Posts : 17,434
    Windows 10 Pro
       #4

    The default storage location for virtual machine configuration files is
    %programdata%\Microsoft\Windows\Hyper-V\Virtual Machines\VM_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:

    Hyper-V files not being obvious use of storage-image.png

    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 Machines\Virtual Machines\.
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd
All times are GMT -5. The time now is 07:48.
Find Us




Windows 10 Forums