Rorschach Posted November 14, 2020 Share Posted November 14, 2020 The installation of macOS went smoothly. As storage space for the VM I chose 500 GB m2. But this was not passed through. I inserted the vDisk there and chose almost 500 GB. Normally the VM can only read and write to this file, right? But every time I work with the VM, install something or e.g. render a video, the disk space inside the VM decreases, BUT the hard disk is full. Now it gets completely crazy: when I delete a file inside the VM, the space is made available again, but the hard disk itself remains at the storage level, meaning: sooner or later it will run full. Do you have any idea what I am doing wrong? Is this a mistake? By the way, the same thing happens when the hard disk is scanned. It is not clear to me how this can happen. The VM would be allowed to write from the file beyond its right side, which is nonsense. Thanks a lot! Quote Link to comment
JonathanM Posted November 14, 2020 Share Posted November 14, 2020 Vdisks are sparse files, which means they can show the full capacity as available to the VM, but only use the actual amount of space on the host drive. Deleting a file normally inside the VM doesn't clear out the data, it just shows it as available, so the amount of space used by the vdisk file doesn't ever decrease, it just keeps growing until it hits the full allocated size. There are settings you can use for a windows VM to allow the space to be reclaimed, but I don't know if it can be done with a hackintosh VM. Quote Link to comment
ghost82 Posted November 14, 2020 Share Posted November 14, 2020 (edited) 7 hours ago, Rorschach said: Do you have any idea what I am doing wrong? Is this a mistake? Yes it can be done, with the following settings: 1- settings for the disk (this is an example, important is sata and to add cache='none' io='native' discard='unmap' : <disk type='file' device='disk'> <driver name='qemu' type='raw' cache='none' io='native' discard='unmap'/> <source file='/mnt/user/domains/BigSur/vdisk3.img'/> <target dev='hdd' bus='sata'/> <address type='drive' controller='0' bus='0' target='0' unit='3'/> </disk> 2- add qemu custom arg: <qemu:commandline> <qemu:arg value='-set'/> <qemu:arg value='device.sata0-0-3.rotation_rate=1'/> </qemu:commandline> Note the sata0-0-3 matches unit='3' 3- force trim on mac os vm (in mac os terminal): sudo forcetrim enable Now when you delete a file in the mac os vm the host will sync. Edited November 14, 2020 by ghost82 1 Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.