On 2012-11-17 22:54, Edward Ned Harvey (opensolarisisdeadlongliveopensolaris) wrote:
From: zfs-discuss-boun...@opensolaris.org [mailto:zfs-discuss-
boun...@opensolaris.org] On Behalf Of Edward Ned Harvey

An easier event to trigger is the starting of the virtualbox guest.  Upon vbox
guest starting, check the service properties for that instance of vboxsvc, and
chmod if necessary.  But vboxsvc runs as non-root user...

I like the idea of using zfs properties, if someday the functionality is going 
be built into ZFS, and we can simply scrap the SMF chown service.  But these
days, ZFS isn't seeing a lot of public development.

I just built this into simplesmf, http://code.google.com/p/simplesmf/
Support to execut the zvol chown immediately prior to launching guestvm
I know Jim is also building it into vboxsvc, but I haven't tried that yet.

Lest this point be lost - during discussion of the thread, Edward and
myself ultimately embarked on the voyage to the solutions we saw best,
hacked together during that day or so.

Edward tailored his to VM startup events, while I made a more generic
script which can save POSIX and ACL info from devfs into user attributes
of ZVOLs and extract and apply those values to ZVOLs on demand.

This script can register itself as an SMF service, and apply such values
from zfs to devfs at service startup, and save from devfs to zfs at the
service shutdown. I guess this can be integrated into my main vbox.sh
script to initiate such activities during VM startup, but haven't yet
explored or completed this variant (all the needed pieces should be
there already). Perhaps I need to make such integration before next
"official" release of vboxsvc.

This is rather a proof-of-concept so far (i.e. the script should be
sure to run after zpool imports/before zpool exports), but brave souls
can feel free to try it out and comment. Presence of the service didn't
cause any noticeable troubles on my test boxen over the past couple of


//Jim Klimov

zfs-discuss mailing list

Reply via email to