ZFS Volume in VirtualBox - Permissions issue

Discussions related to using VirtualBox on Linux hosts.
Post Reply
virtualoss
Posts: 13
Joined: 14. Jun 2013, 12:47

ZFS Volume in VirtualBox - Permissions issue

Post 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?
Last edited by virtualoss on 27. Oct 2017, 11:33, edited 1 time in total.
socratis
Site Moderator
Posts: 27330
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: ZFS Volume in VirtualBox - Permissions issue

Post 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...
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
virtualoss
Posts: 13
Joined: 14. Jun 2013, 12:47

Re: ZFS Volume in VirtualBox - Permissions issue

Post by virtualoss »

OK. Thanks for the quick response!
Post Reply