Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

I have a SSD drive on my MacBook Pro and I'm constantly running on out of disk space because I need to install and run multiple virtual machines (Linux, Windows etc) on my Mac. Is there a way to mount a writable disk image that is also compressed? I'm hoping to use the disk image to store the VMs on. I don't mind taking the speed hit.

share|improve this question
    
I wonder if zfs offers enough compression for you to attempt to carve some space. My guess is is is going to be a hard problem to solve. –  bmike Sep 15 '13 at 16:08
2  
More details please.. which virtual machine software are you using? That would help us figure out what it supports! –  Dave Sep 15 '13 at 19:01
    
I'm using VMWare Fusion. Though really - any way to mount a compressed + writable file system should work. –  haseebq Sep 16 '13 at 7:00
    
@bmike Thanks for pointing zfs out. I'm posting a solution that seems to be working well so far. –  haseebq Sep 16 '13 at 7:30

2 Answers 2

up vote 3 down vote accepted

I ended up going with MacZFS.

  1. Created a sparse-image disk via Disk Utility for about 100GB.
  2. Formatted it as a ZFS file system by following the instructions in the MacZFS - Getting Started section.
  3. Turned compression 'on' in ZFS via zfs compression=on [mypoolname]

I tried booting a Windows XP VM off the ZFS file system and it worked. ZFS reports that it achieved a compression ratio of about 1.32x (which means my 10GB VM takes up about 6.6GB on disk). Not sure how well VMWare will play with ZFS's compression under high load, but it seems to working well so far.

share|improve this answer

This doesn't answer the question that you asked, but it might address the problem that you have.

VMware Fusion 6 Professional allows for linked clones, which are copies of a VM that don't duplicate the entire contents of the VM. If you've got lots of VMs which are based on the same OS, you can save yourself considerable disk space with them.

To create a linked clone from the current state of a VM, select your VM in the VM library, then click "Virtual Machine" and select "Create Linked Clone". You can do the same from a snapshot of a VM if you prefer.

The biggest thing to watch out for when cloning a VM is to ensure that you don't have an IP address conflict, so change the IP address of your clone if you're using static IPs for VMs. Linked clones should save some disk space while avoiding the performance hit of ZFS.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.