Ticket #4456 (new enhancement)

Opened 9 years ago

Last modified 13 months ago

Direct support for ZFS would be nice

Reported by: nicoatsun Owned by:
Priority: major Component: GUI
Version: VirtualBox 3.0.0 Keywords:
Cc: Guest type: other
Host type: other


There are several ways in which VirtualBox could better support the use of ZFS for VDIs:

  • put each in its own dataset or zvol (a zvol is like a virtual raw device; vbox should have first-class support for using raw devices for VDIs)
  • set the recordsize of each VDI's dataset to match the preferred block size of the filesystem type that will be used with that VDI (this requires either a way to set recordsize manually at VDI creation time, or asking about what the VDI will be used for at creation time)
  • set the compression at VDI creation time, and/or at any other time
  • support for using ZFS snapshots (and rollbacks)
  • support for using ZFS clones to create copies of VDIs (and vbox should automatically change the cloned VDI's UUID)

I'm setting the host type to "other" because ZFS has been ported to other operating systems than just Solaris (e.g., FreeBSD).

Change History

comment:1 Changed 9 years ago by nicoatsun

I do something like this:

zfs create rpool/export/home/nico/.VirtualBox zfs create rpool/export/home/nico/.VirtualBox/HardDisks zfs create rpool/export/home/nico/.VirtualBox/HardDisks/<diskname>

then I create each VDI in its own dataset. I also use ZFS snapshots and clones in conjunction with the VBoxManage internalcommands sethduuid command to give clones their own UUIDs.

This is all very tedious to do by hand.

comment:2 Changed 9 years ago by famiddleton

Have you considered using iscsi? Until iscsi support was broken in 3.0.0 ("fixed in SVN") it worked pretty well, and has the advantage of allowing the use of a (Solaris) ZFS file server independent of the VirtualBox (could be Linux) host. The resulting disk seems always to have 512byte blocks. Boot times seem comparable to booting from a real disk outside VB even over a 100MB/S LAN. The iscsi disk can also be mounted outside of VirtualBox, which can be quite useful if the host O/S can read the iscsi disk format (e.g. Linux has pretty good NTFS support). This seems to meet your requirements and is pretty easy to set up once you've found the Sun documentation on setting up iscsi targets.

Hopefully there will soon be a maintenance release that fixes the iscsi regression...

comment:3 Changed 9 years ago by nicoatsun

I'm using local storage, so iSCSI is of no interest.

The point is to make VBox directly aware of ZFS so that VBox can do things like:

  • set recordsize appropriately, for better performance
  • set compression=...
  • keep each VDI in its own dataset/zvol
  • copy VDIs by using ZFS snapshot+clone
  • checkpoint VDIs by using ZFS snapshot

I can do all those things by hand (meaning that I run the necessary ZFS commands, then I use the VBox HDD GUI or the VBoxManage CLI to create VDIs and/or set new VDI UUIDs). Yes, if I were using iSCSI with ZFS-backed iSCSI targets then I'd really have to do all this by hand. But when everything is local VBox could save me the trouble and do all that work for me.

For users running on systems with ZFS (Solaris, FreeBSD, and someday, one hopes, MacOS X) this would be a great benefit.

comment:4 Changed 9 years ago by Technologov

ZFS is a filesystem, while Guest OSes require block devices. I don't see how such mapping can be done. (maybe with Guest Additions it could be possible)


comment:5 Changed 6 years ago by TheDreamer

How about direct support of ZFS zvols?

comment:6 Changed 5 years ago by ziuchkovski

I would love to see direct ZFS ZVol support as well. Having the performance characteristics of a raw disk (ZVol) while maintaining VirtualBox snapshot + clone capabilities would be a real win.

comment:7 Changed 4 years ago by delitescere


comment:8 Changed 13 months ago by Lapo

 Here are some suggestions to (manually) use with zvol, for reference oh whom may be finding this result first.

Note: See TracTickets for help on using tickets.
ContactPrivacy policyTerms of Use