2

How to check if virtio storage access virtio_blk really is in use or an eventually existing fallback driver?

Existing documentation doesn't answer it:

The following.

lsmod | grep virtio

Only shows, that the virtio kernel module is loaded. It isn't hard to load arbitrary kernel modules for hardware that you don't have installed. The question remains, is the virtio kernel module actually in use or an eventually existing fallback driver?

1 Answer 1

5

From the human monitor interface of qemu (Ctrl-Alt-2 if using SDL output), issue:

info qtree

For each virtio-scsi disk, you'll see:

        bus: virtio-bus
          type virtio-pci-bus
          dev: virtio-scsi-device, id ""

And for virtio-blk:

        bus: virtio-bus
          type virtio-pci-bus
          dev: virtio-blk-device, id ""

From within the guest, if a Linux guest,

$ ls -l /sys/class/block/?d[a-z]
lrwxrwxrwx 1 root root 0 Aug  2 21:16 /sys/class/block/sda -> ../../devices/pci0000:00/0000:00:04.0/virtio0/host2/target2:0:0/2:0:0:0/block/sda
lrwxrwxrwx 1 root root 0 Aug  2 21:16 /sys/class/block/vda -> ../../devices/pci0000:00/0000:00:05.0/virtio1/block/vda

The first one above is a virtio-scsi, the second a virtio-blk.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .