Libvirt NVME support

Suraj Kasi suraj.kasi at nutanix.com
Mon Nov 9 16:38:11 UTC 2020


Hi,

We wanted to check if it’s possible to specify a disk’s target as nvme (so that the disk shows up as a nvme disk to the guest VM).

Per libvirt documentation it looks like (since Libvirt 6.0.0) we can specify the disk type as nvme and disks source as a nvme. But the documentation does not say anything about being specify the disk’s target as nvme. Is it possible to present the disk to the guest as a nvme disk, if so how?


Example from Libvirt documentation (https://libvirt.org/formatdomain.html)

-----

<disk type='nvme' device='disk'>

    <driver name='qemu' type='raw'/>

    <source type='pci' managed='yes' namespace='1'>

      <address domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>

    </source>

    <target dev='vde' bus='virtio'/>

  </disk>

-----


But we want to do something similar to the following: two vNVMe controllers where the first one has one namespace and the second one has two namespaces

-----

# first NVMe controller, one namespace

  <disk type='network' device='disk'>

    <driver name='qemu' type='raw'/>

    <source protocol='iscsi' name='iqn.2013-07.com.example:iscsi-nopool/123'>

      <host name='example.com' port='3260'/>

      <auth username='myuser'>

        <secret type='iscsi' usage='libvirtiscsi'/>

      </auth>

    </source>

    <target dev='nvme0' bus='nvme'/>

  </disk>



  # second NVMe controller, first namespace

  <disk type='network' device='disk'>

    <driver name='qemu' type='raw'/>

    <source protocol='iscsi' name='iqn.2013-07.com.example:iscsi-nopool/456'>

      <host name='example.com' port='3260'/>

      <auth username='myuser'>

        <secret type='iscsi' usage='libvirtiscsi'/>

      </auth>

    </source>

    <target dev='nvme1' namespace='1' bus='nvme'/>

  </disk>



  # second NVMe controller, first namespace

  <disk type='network' device='disk'>

    <driver name='qemu' type='raw'/>

    <source protocol='iscsi' name='iqn.2013-07.com.example:iscsi-nopool/789'>

      <host name='example.com' port='3260'/>

      <auth username='myuser'>

        <secret type='iscsi' usage='libvirtiscsi'/>

      </auth>

    </source>

    <target dev='nvme1' namespace='2' bus='nvme'/>

  </disk>

-----

If in case this is not yet supported, would it be merged if we were to implement it?

Thanks,
Suraj
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20201109/c685b3a3/attachment-0001.htm>


More information about the libvir-list mailing list