ZEVO versus virtual machine uses of devices

Moderators: jhartley, MSR734, nola

ZEVO versus virtual machine uses of devices

Post by grahamperrin » Mon Oct 15, 2012 9:20 pm

At viewtopic.php?p=866#p866

daniel.jozsef wrote:… trouble making the drives accessible to a virtualized environment (Virtualbox) …


A disk that is given to ZEVO Community Edition 1.1.1 can not be used with a VirtualBoxVM on the same host computer. The pool can be exported, but with ZEVO: the physical disk remains in use by the host. In Disk Utility, for example: whilst ejects are apparently logged as successful, the disk and its zfs_pool_proxy counterpart persist.

Whilst used exclusively by the host:

  • a device can not be used by the guest (by the VirtualBoxVM).

Example: a VirtualBoxVM unable to make the USB connection for an OpenIndiana guest.

Possible workarounds

To disable some of the dynamic behaviours that are expected by Mac users: temporarily set aside one of the KEXTs for ZEVO.

Fixes: thoughts

A future version of the ZEVO pane of System Preferences might include an option, enabled by default:

    [*] Dynamic devices

– or words to that effect, whatever will be most user-friendly.

Disabling that option should allow devices to be used by virtual machines.
grahamperrin Offline

User avatar
 
Posts: 1596
Joined: Fri Sep 14, 2012 10:21 pm
Location: Brighton and Hove, United Kingdom

Re: ZEVO versus virtual machine uses of devices

Post by grahamperrin » Tue Oct 16, 2012 1:58 am

grahamperrin wrote:… temporarily set aside one of the KEXTs … 


Precaution: working without ZFSDriver.kext (please don't!)

Here with OS X 10.8.2 on a MacBookPro5,2:

Code: Select all
sudo mv /System/Library/Extensions/ZFSDriver.kext /Users/Shared && sudo touch /System/Library/Extensions && kextstat | grep zfs


– the driver remained loaded. I waited, repeated the last part of the command – 

Code: Select all
kextstat | grep zfs


… waited, repeated, waited, repeated a few times. The driver remained loaded so I:

  1. restarted the OS
  2. logged on as a different user (my home directory uses ZFS)
  3. ignored the prompt to initialise
  4. imported the pool for my home
  5. logged off
  6. logged on with my usual account gjp22 to use VirtualBox
  7. made a USB connection to the disk to be used with the VirtualBoxVM
  8. ignored the prompted to initialise
  9. started a VirtualBoxVM for OpenIndiana
  10. tried again to use the device on USB.

opt to ignore.png
opt to ignore.png (49.36 KiB) Viewed 141 times


Result

That attempt to workaround fails.

As before, the USB device is used exclusively by the host (greyed out, unavailable to the guest):

2012-10-16 07-53-20 screenshot.png
2012-10-16 07-53-20 screenshot.png (171.01 KiB) Viewed 141 times


Housekeeping following the experiment

Code: Select all
sudo mv /Users/Shared/ZFSDriver.kext /System/Library/Extensions && sudo touch /System/Library/Extensions && kextstat | grep zfs


… wait a minute or so, then again

Code: Select all
kextstat | grep zfs


– gains the desired response – 

Code: Select all
macbookpro08-centrim:~ gjp22$ kextstat | grep zfs
  124    1 0xffffff7f807a5000 0x19b000   0x19b000   com.getgreenbytes.filesystem.zfs (2012.09.23) <13 7 5 4 3 1>
  138    0 0xffffff7f82824000 0x6000     0x6000     com.getgreenbytes.driver.zfs (2012.09.14) <124 13 7 5 4 3 1>


… then again wait a while, and the driver automatically imports (to the host, OS X) the pool that could not be used with the virtual machine.
grahamperrin Offline

User avatar
 
Posts: 1596
Joined: Fri Sep 14, 2012 10:21 pm
Location: Brighton and Hove, United Kingdom

Workaround

Post by grahamperrin » Mon Jul 08, 2013 4:38 am

In a nutshell:

  1. make the partition type unrecognisable to both the host operating system and ZEVO Community Edition 1.1.1
  2. if prompted by the host, opt to Ignore the disk
  3. find the disk usable by the guest OS in the virtual machine.

In my case I expect to use a USB 2.0 flash drive, with ZFS, with VirtualBoxVM.

Cross references

Disable automatic zpool import: FreeBSD use of 516E7CBA-6ECF-11D6-8FF8-00022D09712B

Compatibility with other ZFS systems: FreeBSD use of 516E7CBA-6ECF-11D6-8FF8-00022D09712B
grahamperrin Offline

User avatar
 
Posts: 1596
Joined: Fri Sep 14, 2012 10:21 pm
Location: Brighton and Hove, United Kingdom


Return to General Discussion

Who is online

Users browsing this forum: ilovezfs and 0 guests

cron