VMWare Fusion Reclaim Free Space of OS X Guest: Difference between revisions

From Wurst-Wasser.net
Jump to navigation Jump to search
(Created page with "After installing OS X in a VMWare Fusion v6, I noticed that the disk images are continously growing. And VMWare Fusion won't let me reclaim the free space. === Th...")
 
Line 25: Line 25:
  Finished erase on disk0s2 Macintosh HD
  Finished erase on disk0s2 Macintosh HD
  Mac-OS-X-108-Mountain-Lion-VM:~ appleadmin$
  Mac-OS-X-108-Mountain-Lion-VM:~ appleadmin$
* Now, reclaim the free space:<br>[[Image:
* Shutdown your VM
* Remove all Snapshots (think of the consequences!)
* Now, reclaim the free space:<br>[[Image:VMWareFusion6ReclaimSpace01.png]]




[[Category:Mac OS X]]
[[Category:Mac OS X]]

Revision as of 01:07, 14 December 2013

After installing OS X in a VMWare Fusion v6, I noticed that the disk images are continously growing. And VMWare Fusion won't let me reclaim the free space.

The Problem

As pointed out [ here], the OS X guest does not actually delete files, it just won't remember, where the file is stored on the disk. So all the file's data is still stored on the disk. We need to permanently delete the file's data, and then the space can be reclaimed.

The Solution

  • Startup your guest os
  • Log in as administrator
  • Overwrite all deleted files with zeroes…
    • Get your root-device (the /):
Mac-OS-X-108-Mountain-Lion-VM:~ appleadmin$ mount
/dev/disk0s2 on / (hfs, local, journaled) 
devfs on /dev (devfs, local, nobrowse)
map -hosts on /net (autofs, nosuid, automounted, nobrowse)
map auto_home on /home (autofs, automounted, nobrowse)
.host:/VMware Shared Folders on /Volumes/VMware Shared Folders (vmhgfs)
Mac-OS-X-108-Mountain-Lion-VM:~ appleadmin$ 
    • Erase the free space:
Mac-OS-X-108-Mountain-Lion-VM:~ appleadmin$ sudo diskutil secureErase freespace 0 /dev/disk0s2
Started erase on disk0s2 Macintosh HD
Creating a temporary file
Securely erasing a file
Creating a secondary temporary file
Mounting disk
Finished erase on disk0s2 Macintosh HD
Mac-OS-X-108-Mountain-Lion-VM:~ appleadmin$