VFIO: Anybody gotten disks running in VirtIO perfectly stable?

On my VFIO setup I still get hangs when using disks in VirtIO mode (doesn’t seem to matter which settings, but “threads” is more stable than “native”) whereas the IDE and SCSI modes (at least with “threads”) are perfectly stable.
I have multiple VM disk images that I pass through to put games on. Some are on a NVMe drive on ext4 partition, others on a SATA MDADM RAID0 from SSDs. (so all fast storage, haven’t tried slow storage yet, that is what old intel machines are for ;))
All are raw format.

If you have a stable setup please post your config.

I just pass through the sata or nvme drive directly per recommendation of the folks on #vfio-users / freenode. 0 performance difference between the real thing that I’ve noticed. Is there a real you aren’t doing this? I have quite a few 128g SSDs that I bought for $30 a pop off newegg/amazon. I just open up virt-manager > open vm > storage > input /dev/whateverlinuxseesasthedevice if it’s an SSD. If it’s an nvme I pass it through in the PCI-E menu.

1 Like

I’ve tried the latest 4.18.5 kernel, and the latest qemu 2.12 - but, I face the same issue you mention here.
When stress-testing VirtIO devices it seems to be unstable. (Seems to be buffer related)

I would too love to hear if people find a stable configuration of using VirtIO

VirtIO is rock solid for me but I just use raw files for drives and VFIO for the GPU. FWIW pass-through for drives is not recommended yet.

what? why? it works perfectly for me.

Based on my experience passing through other PCI-E devices, wouldn’t passing through an NVMe (on Ryzen the NVME direct connected to CPU PCIe would be good easy choice in its separate IOMMU grouping) drive work very stable? I have the hardware to try this if I swap my 2 NVMe drives on my Ryzen machine.

My physical drives aren’t perfectly stable, let alone my virtual drives…

@pantato
@BillFleming

Depends on what you’re using them for. I use mine for gaming so disk performance isn’t a big issue.

When I was setting up the guest, I couldn’t get pass-through to work back then and that meant I had to reinstall the whole guest system a couple of times.

To get around that I switched to raw files and used the snapshot feature. That also helped to get around Windows update installing broken drivers now and so often. It didn’t have the driver roll-back feature back then.

When I wanted to encrypt the SSDs I just moved the guest file to an encrypted partition.