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 .

    Reply

    John Goerzen Reply:

    Interesting. How do you generate the initramfs for that, or are you building the kernel by hand?

    Reply

    Josh Triplett Reply:

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

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

    Reply

Leave a Reply

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