Is it a good idea to use ZFS on a KVM virtual machine with direct disk access?

November 22, 2025 3 answers
Asked by hull+section7
I'm currently running a backup server on Debian 13 that has a ZFS pool with two mirrored disks. I'm considering virtualizing this backup server and directly passing /dev/sdb and /dev/sdc to a virtual machine, wanting to use ZFS directly on those disks instead of relying on qcow2 images. I realize this method makes the machine less portable. Will ZFS function properly in this setup? Thanks!

Answers

TICKET VALIDATOR
While it's possible, I would advise against it unless you have a solid reason. VMs can have more chances of filesystem corruptionโ€”often because they're not always shut down properly. Instead, I prefer to run ZFS on the host itself, so the host can manage things like snapshots for the guests more effectively. Plus, using passthrough configurations can complicate things. Just my two cents!
Reply to this answer
citrus peel!!
Yes, it can definitely work if you set it up right! But you might want to reconsider the virtualization part. Whatโ€™s the reason you want to run it in a VM? It could complicate things more than necessary.
Reply to this answer
hull+section7
Reply to this answer

Add your answer

Answers are reviewed before publication.

Related Discussions