Question Win 11 ReFS Compact vmdk

bep1995

Honorable
Sep 25, 2019
43
0
10,530
Hello guys !! I have a little problem but i'm not sure if there is a solution. If anyone knows to help me.

I managed to install win 11 (build 25300) on ReFS partition on vmware (win 11 host) just out of curiosity, but the compact disk (vmdk) in vm settings doesn't seems to work. It works fine on another win 11 vm (build 25396, i think) but not on this one. I suspect it doesn't work cause of the ReFS partition, but i don't know why. Maybe cause the ReFS doesn't support compression, or it's something else ?

Is there something else i can do to fix it ??
 
I'm interpreting the details in two ways. So I'll just answer for both:
  • The guest OS was installed on an ReFS formatted virtual disk
    • Don't use ReFS for this purpose. It's not meant to be a system partition file system
  • The guest OS was installed using NTFS formatted virtual disk, but the virtual disk image is stored on an ReFS formatted drive
    • File compression was recently up for consideration in an Insider Preview of Windows Server 22H2.
 
Hello !! Thanks for the answer !!

It's the first one. I installed the win 11 on a ReFS vdmk. Of course the host OS is on NTFS disk.

I tried the Ubuntu with Ext4 and Btrfs and the "compact disk" didn't work either or not very well (7.8GB before "compact", 7.7GB after). Is it supposed to work only on Windows NTFS ??

There is a solution to pre-allocate the size of vdmk, but i really don't want to do that.
 
Last edited:
I don't know how VMWare works, but with VirtualBox, if you want to compact a virtual disk image, you first have to go in the guest OS and perform a command that zeros out the virtual disk's free space. From this post

With a Linux Guest run this:

dd if=/dev/zero of=/var/tmp/bigemptyfile bs=4096k ; rm /var/tmp/bigemptyfile

Or:

telinit 1
mount -o remount,ro /dev/sda1
zerofree -v /dev/sda1



With a Windows Guest, download SDelete from Sysinternals and run this:

sdelete.exe c: -z

Then you run the compacting command. This may be all that you're missing.
 
@hotaru.hino
Thanks for your help. I tried sdelete but unfortunately it didn't do anything.
I run it via cmd and waited until finished. I closed the vm, I clicked on "compact" and as previously it completed immediately without do anything.
 
According to https://forums.veeam.com/veeam-backup-replication-f2/refs-reclaim-space-on-array-t55541.html however, sdelete works on ReFS.

Another thing now that I'm having more thoughts coming in is compacting doesn't compress the disk image. It merely shrinks it based on what parts of the disk image are basically zeroed out. So if the guest OS is reporting it's using about the same amount of space as the disk image itself is taking up, then it's about as compact as it'll get.
 
@hotaru.hino
I really don't know what method uses the vmware to compress the disk, but the second method you are saying it's seems more logically. The guest OS is 20gb (by opening "properties" on the c drive) and the virtual disk is 29gb, but compress doesn't work.

Nevermind, the idea of installing win11 on ReFS partition was bad. It gives me a lot of blue screens. Maybe i will tried it again with win12 if there is native support without any tricks to get it work.