On 12-11-15 11:57 AM, Edward Ned Harvey (opensolarisisdeadlongliveopensolaris) wrote:

When I google around for anyone else who cares and may have already solved the problem before I came along - it seems we're all doing the same thing for the same reason.If by any chance you are running VirtualBox on a solaris / opensolaris / openidiana / whatever ZFS host, you could of course use .vdi files for the VM virtual disks, but a lot of us are using zvol instead, for various reasons.To do the zvol, you first create the zvol (sudo zfs create -V) and then chown it to the user who runs VBox (sudo chown someuser /dev/zvol/rdsk/...) and then create a rawvmdk that references it (VBoxManage internalcommands createrawvmdk -filename /home/someuser/somedisk.vmdk -rawdisk /dev/zvol/rdsk/...)

The problem is - during boot / reboot, or anytime the zpool or zfs filesystem is mounted or remounted, export, import...The zvol ownership reverts back to root:root.So you have to repeat your "sudo chown" before the guest VM can start.

And the question is ...Obviously I can make an SMF service which will chown those devices automatically, but that's kind of a crappy solution.

Is there any good way to assign the access rights, or persistently assign ownership of zvol's?

Instead of using vdi, I use comstar targets and then use vbox built-in scsi initiator.

zfs-discuss mailing list

Reply via email to