Opened 15 years ago
Last modified 6 years ago
#4456 new enhancement
Direct support for ZFS would be nice
Reported by: | nicoatsun | Owned by: | |
---|---|---|---|
Component: | GUI | Version: | VirtualBox 3.0.0 |
Keywords: | Cc: | ||
Guest type: | other | Host type: | other |
Description
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 (8)
comment:1 by , 15 years ago
comment:2 by , 15 years ago
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 by , 15 years ago
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 by , 14 years ago
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)
-Technologov
comment:6 by , 10 years ago
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:8 by , 6 years ago
Here are some suggestions to (manually) use with zvol, for reference oh whom may be finding this result first.
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.