ZFS Volume in VirtualBox - Permissions issue

Discussions related to using VirtualBox on Linux hosts.

ZFS Volume in VirtualBox - Permissions issue

Postby virtualoss » 27. Oct 2017, 10:46

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   Expand viewCollapse view
$ 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.
virtualoss
 
Posts: 13
Joined: 14. Jun 2013, 12:47

Re: ZFS Volume in VirtualBox - Permissions issue

Postby socratis » 27. Oct 2017, 11:30

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...
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
socratis
Site Moderator
 
Posts: 12649
Joined: 22. Oct 2010, 11:03
Location: Greece
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5

Re: ZFS Volume in VirtualBox - Permissions issue

Postby virtualoss » 27. Oct 2017, 11:35

OK. Thanks for the quick response!
virtualoss
 
Posts: 13
Joined: 14. Jun 2013, 12:47


Return to VirtualBox on Linux Hosts

Who is online

Users browsing this forum: No registered users and 17 guests