

ls -la shows the 8 TB size (virtual size), but du test1.img shows the real size (40 Kb), qemu-img info reports the same (real) disk size I created a raw img hd (test1.img) with 'qemu-img create' with a size of 8000G (8 TB) -> this is the virtual size, I did it on purpose to exceed the size of the physical disk, and formatted with gpt partition table, linux filesystem I deleted my post above because I'm not sure if what I wrote was correct.Īnyway, apart the GB values you are getting in the gui (which I don't know from where they come from), you need to consider the 'disk size' value reported by 'qemu-img info' as the real size occupied on the disk. Image: /mnt/user/domains/macOS/macOS_disk.img

:~# qemu-img info /mnt/user/domains/macOS/macOS_disk.img
#Enable trim mac windows
100GB virtual size (which is fixed) never get reflected in usable space to the actual SSD (maybe I misunderstood this part, I thought that what we were actually solving similar to how my Windows vdisk only shows up as ~36GiB used)? This is my results from the above steps but the space taken up on the SSD itself is still 100GiB.

#Enable trim mac free
Trim is needed to sync the free space from the guest to the host, if trim doesn't work, the non free space will continue to increase on the host side, even if you free the space on the guest side. run the vm and delete the 4-5 GB file you copied before, shutdown the vmħ. run again from unraid terminal the same command:ĭisk size should be decreased by 4-5 GB, same value as step 2. Virtual size will be always the value as before.Ħ. run again from unraid terminal the same command: copy to the vm a 'large file', such as a 4-5 GB file and shutdown the vmĥ. Qemu-img info /mnt/user/domains/macOS/macOS_disk.imgĤ. The reported 100GB is correct, but there is virtual disk size and disk size (you have a sparse image). My macOS vdisk.img is still being reported as 100GiB in the domains folder thoughįrom the log I can't see anything unusual for trim. Essentially - I think TRIM is enabled but not running at boot? I ran command log show -start $(date +%F) | grep -i spaceman_trim_free_blocks and nothing showed up. My macOS vdisk.img is still being reported as 100GiB in the domains folder though Great, sata0-0-2 worked! i enabled the XML edit, enabled trim and below is what system report shows. In both cases, if you have issues attach diagnostics. Probably your alias is sata0-0-2, unraid gui masks it, I don't know why, so add this before Īnd make sure you have discard='unmap' in your disk block.
#Enable trim mac mac os
If trim support is "No", run a terminal in mac os and type Support type should be solid state drive. Select the controller and you will see "support type" and "TRIM support": After it restarts, to verify trim support is now enabled, go back to About This Mac>System Report>SATA/SATA EXPRESS.īoot mac os, go to About this mac -> System report. The OS will then sit for a short bit, after which time it will reboot itself.

It will then give you some text that makes it seem like your computer will eat itself. To fix this, you must force trim on all drives. Recognized as an SSD but no trim support. If you did this correctly, the vm will boot normally. If you only have one, then you can leave it as is, assuming you didn't change the address. If you have any other drives, add an additional copy of the argument (both lines) and modify the "." accordingly to match your address type listed at the top with the disk image(s). I do not know if order matters, but mine is at the end of the arguments list. Next scroll to the bottom of the xml and add the following in the QEMU argumentsĪny other arguments you have will also still need to be included. Make this change for any disk images you have that the vm uses. (note: it may be possible to leave cache on write back and not use the io native setting, but I didn't experiment much, just followed working directions on the link) With the changes only happening on the second line. With the VM shutdown, edit xml settings, changing the disk image info from (if you're worried about potential loss of data, borking a working vm, or other world ending scenarios, make a backup before doing this, and proceed at your own risk.) The result is the OS slows over time and disk images bloat. Issue: QEMU disks in osx are presented to the OS in a manner which interprets them as a rotational disk, as shown under About This Mac>System Report>SATA/SATA EXPRESS.Įven after forcing trim on all disks via terminal, trim does not work, or even show it as an option. Had a few more minutes today and found it on the Internet ( )
#Enable trim mac how to
I've been looking off and on about how to enable trim support on a disk image in osx.
