VirtFS isn’t quite ready

Despite claims to the contrary [PDF], VirtFS — the 9P-based virtio KVM/QEMU layer designed to pass through a host’s filesystem to the guest — is quite slow. I have yet to get it to perform at even 1/10 the speed of the virtual block device (VBD). That’s unfortunate, because in theory it should be significantly faster. At this rate, I suspect even NFS will be significantly faster.

Beyond that, it seems impossible to use VirtFS as the root filesystem in a VM, at least with Debian; initramfs-tools doesn’t know how to build an initrd in that situation, and the support is just not there.

It would make a great combination with btrfs or zfs, but unfortunately looks to be just not ready yet.

9 thoughts on “VirtFS isn’t quite ready

  1. virtio-9p is indeed horribly slow; I really wish it was faster, since it’s wildly useful.

    However, you *can* use it as the root filesystem; I’ve done so several times. You don’t even need an initramfs. Just have a kernel with the appropriate modules built in for virtio and 9p, pass the virtio-9p filesystem label as the root= parameter, and pass rootfstype=9p .

      1. “Just have a kernel with the appropriate modules built in for virtio and 9p”.

        I’ve also done it with a hand-constructed initramfs.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

To respond on your own website, enter the URL of your response which should contain a link to this post's permalink URL. Your response will then appear (possibly after moderation) on this page. Want to update or remove your response? Update or delete your post and re-enter your post's URL again. (Find out more about Webmentions.)