Notes on keeping the SSD clean (more free disk space)

I have one of the fastest SSD drives, but unfortunately didn't have the heart to buy the 240Gb, but the 120GB version. Now, 120GB is definitely enough, but this is my primary machine, and I'm doing several different kinds of things on it, so I need space for all the projects.

How do I keep it clean:


First I run automatic tools like CleanMyMac (free):

It definitely will find stuff that you missed.

Disk Inventory X

This is another type of program - it says how much disk is used by any folder, so it's easy to find the bigger users of space:

With it I found the /private/var/vm/sleepimage file (8gb) - keeps the data when the laptop goes to sleep. I can safely use the 8gb space until my laptop goes to sleep.

It is free.


Same as the former, but all is textual.

Windows XP

I have a Windows XP vm. Keeping it clean is not easy. I use Free Disk Analyzer. It works similarly to OmniDiskSweeper and Disk Inventory X:

System Volume Information

Last time I saved 2.79 GB from this folder. My Computer -> Preferences -> System Restore (there's a slider in XP).

Compacting VirtualBox (.vdi) VMs

VirtualBox is great, because it it's free, but it has many quirks - not that good integration on copy/paste, files, shortcuts and so on. The biggest issue is that compacting the image is weirdly done

  • Defragment the VMs drive (this step is always important regardless of the virtualization software)
  • Zero out the free space. Now this is unnecessary with VMWare and Parallels. It is done with sdelete - a free windows software by SysInternals (you remember these guys? Mark Russinovich?).
    • command is "sdelete -c -z c:\"
  • Compacting the virtual disk (.vdi) is done with this command (the command comes with VirtualBox) (case-sensitive):
    • "VBoxManage modifyhd /fullpath/to/windowsdisk.vdi --compact"

Other concerns

  • I always delete the Windows update files - today I saved 500mb.
  • No swap file for windows - too slow. Few gigs.
  • Now I have no swap for OS X too (500mb).
  • 7GB from compacting the VM
  • Moved some stuff to the Time Machine (20GB)
  • Deleted a lot of temp files and swap files (20 GB)
So now I have a lot more free space. I have spent only an hour for it. Next time it will just take a few minutes.
Wow, the 240GB Vertex 3 now costs as much as I paid for the 120GB less than a year ago. Crap.

How to set up networks and dhcp on vmware (on Mac and other OSs)

How to do networking with VMWare Workstation or VMWare Fusion?

For clarity, let's assume that the host (the machine running vmware fusion or vmware workstation) has the ip of

On every virtual machine there are three options:
Bridged (VM becomes visible to other machines beside the host. It has an IP like
Nat (VM is visible only to the host, there is internet).
Host only (VM is visible only to the host, but no internet).

Do ipconfig or ifconfig.
vmnet8 is for NAT.
vmnet1 is for host-only.
These are whole networks for virtual machines. If nat is chosen, then the VM would be supplied an IP from the vmnet8 pool.

If 'bridged' is chosen, then the administrator of must assign an address to the VM.
if 'nat' or 'host-only' is chosen, then:
(I'll describe how to do this on a mac):


$cd /Library/Application Support/VMware Fusion

stop vmware networking:

$sudo ./ --stop

Let's suppose vmnet8 is and vmnet1 is

I would like to change the network from to and I would like to specify a virtual machine with a specific IP.

We're still in /Library/Application Support/VMware Fusion

Then:$ grep 172.16.57 *locations:answer VNET_8_HOSTONLY_HOSTADDR

Then all files in the list must be changed.Then we go into /Library/Application Support/VMware Fusion/vmnet8/

Then the same: 

$ grep 172.16.57 *dhcpd.conf:subnet netmask {dhcpd.conf:    range;dhcpd.conf:    option broadcast-address;dhcpd.conf:    option domain-name-servers;dhcpd.conf:    option netbios-name-servers;dhcpd.conf:    option routers;nat.conf:ip = or ip =

All of them must be changed.

If a specific VM must have a specific IP we go to:/Library/Application Support/VMware Fusion/vmnet8/dhcpd.conf and we add the following:(get the mac from the VM (ipconfig, ifconfig eth0))

host myhost {    hardware ethernet 00:0C:29:B2:C9:69;    fixed-address;}

Then to renew the ip (ipconfig /release, ipconfig /renew for windows):sudo ifconfig vmnet downsudo ifconfig vmnet up

The last thing is to start the vmware networking:sudo ./ --start

Then to renew the ip inside the VM (ipconfig /release, ipconfig /renew for windows):sudo ifconfig vmnet downsudo ifconfig vmnet up