M
M
Maxim Grishin2018-10-16 14:02:31
KVM
Maxim Grishin, 2018-10-16 14:02:31

How can I forward an NVMe disk to KVM so that its VM sees it as a block device and quickly works with it?

There is a KVM hypervisor (in fact, Nutanix CE AHV v.20180501, qemu-kvm --version produces QEMU emulator version 2.6.0 (qemu-kvm-2.6.0-30.20180425.1.45968.el7)), which has a VM with forwarded SATA, SAS, SSD, you name it drives, and you need to forward an NVMe drive into it, mounted in metal on PCI Express, but strictly as a drive, not as a PCI device. I wrote the following in the config:

<disk type='block' device='disk'>
      <driver name='qemu' type='raw' cache='none' io='native'/>
      <source dev='/dev/nvme0n1'/>
      <target dev='sdf' bus='scsi'/>
    </disk>

Problem: NVMe loses performance with this forwarding, resting on the emulated SATA / SAS controller. What other options are there for forwarding a device as a disk? It is desirable that the overhead from the hypervisor be minimal. Interested in what bus can be used, and what needs to be done with the VM in order to be able to use it.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Radjah, 2018-10-16
@Radjah

In theory, you need to dig towards iommu.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question