Virtualization of OSX: Read-only main VM, delta stored separately?

I would like to have a (Mountain) Lion VM that I configure in a specific way, and store that in a particular place on the the system hard drive. This is simple enough.

However, I would also like VMWare Fusion to not write to that VM disk (making it essentially read-only), but only store the delta of the changes in a particular file that I specify. I would be ok using Fusion's snapping functionality if it can provide this feature. I'd also be willing to look into other virtualization solution, but already own Fusion.

My ultimate goal for this is: I'd like to have the delta stored on a mounted ramdisk (tmpfs).

Is this possible?


Solution 1:

Regarding the mounted ramdisk (tmpfs), it is possible, see some example:

$ hdid -nomount ram://256000  # 256000 (sector) * 512 (bytes/sector)
/dev/disk1
$ newfs_hfs /dev/disk1
Initialized /dev/rdisk1 as a 125 MB HFS Plus volume
$ mkdir /tmp/space
$ mount -t hfs /dev/disk1 /tmp/space
...
...
$ umount /tmp/space/
$ hdiutil detach /dev/disk1 
"disk1" unmounted.
"disk1" ejected.