Page 1 of 1

ZFS Volume in VirtualBox - Permissions issue

Posted: 27. Oct 2017, 10:46
by virtualoss
Hi all,
I have created two vmdk disks, which are linked to two ZFS volumes. Every time I reboot the host and start VirtualBox the disks are not accessible (disk icons are yellow). When I change the ownership of the zvol like this:

Code: Select all

$ sudo chown myuser /dev/zvol/virt-pool/myzvol
the disks are accessible again.
Not a big issue but still annoying and I wonder why is this happening. Any ideas how can I solve it permanently?

Re: ZFS Volume in VirtualBox - Permissions issue

Posted: 27. Oct 2017, 11:30
by socratis
That is most probably your host doing the ownership change. I know that mine (OSX) does that too for raw-access disks. It changes "/dev/disk2" (an external USB HD), either on reboot or a disk change, to:
  • socratis$ ls -al /dev/disk2
    brw-r-----  1 root  operator    1,   5 27 Oct 11:49 /dev/disk2
and I have to change it with:
  • socratis$ sudo chmod og+rw /dev/disk2
And it used to be a real annoyance for an OSX user that he wrote a small program to automate the whole thing; VBoxRawdisk. Unfortunately it's OSX only, but I think that you could do it on any host with a startup script...

Re: ZFS Volume in VirtualBox - Permissions issue

Posted: 27. Oct 2017, 11:35
by virtualoss
OK. Thanks for the quick response!