Inaccurate Design

Using OpenSolaris/Solaris + ZFS as an ESXi datastore

Tuesday, 21 July 2009

This was a really annoying thing that took me ages to get working, but the solution was quite simple.

First, I’d created a ZFS pool at storage/virtual

$ zfs create storage/virtual
$ zfs set quota=100gb storage/virtual
$ zfs set sharenfs=on storage/virtual

Then, I’d go to ESXi and try to connect it to this new datastore. But ESXi would not connect, it would just timeout constantly. What was wrong?

Turns out you need to set sharenfs like this

$ zfs set sharenfs=root=@10.1.1.0/24,rw=@10.1.1.0/24 storage/virtual

This will get ESXi talking to your new datastore. Such a simple solution, you need to grant the root user on the ESXi box full access to the ZFS mount.