I have a number of virtual machines I run, through both VMWare Fusion and Virtual Box and I've migrated from storing them on HFS+ to a second partition formatted with ZFS. Currently they're using 2GB split/expanding VMDKs. I'm currently storing each VM in it's own zfs filesystem so I can manage snapshots and clones for each individually.
With ZFS compression, I don't need to create expanding disks anymore, a single-file fixed-size disk won't actually occupy all it's space until used.
But I'm wondering if there would be an advantage to using a ZVOL rather than a fixed-size disk image? Both Fusion and VirtualBox support raw VMDK disks and I've set up test VMs in both platforms using zvols for the disks.
Has anyone been through this already? My hope is that there would be a slight performance advantage to using zvols but this is just hope rather than based on any knowledge.
Are thee any properties I should change on the zvol to give better performance? I had read a post on using them for VirtualBox that setting the blocks size to 64k would help but I can't find the reference anymore. What about cache setting or any other properties?
The only downsides I've noticed in my testing so far are:
1) The /dev/diskX devices created for each zvol revert to root ownership when rebooting - is there a way to change the owner so that it persists across reboots?
2) Packing up a virtual machine to give to others is harder because you need to convert the raw disk to a disk image but that is doable.
Thanks
Russell