Example of an NVMe device configuration

To see the function addresses of the available NVMe devices on the host, enter:
# lspci
...
1003:00:00.0 Non-Volatile memory controller: ...
...
The function addresses in the example is 1003:00:00.0.

If the lspci command does not list the device, it has not been assigned to the LPAR in the hardware configuration, or you need to set it online through its representation in /sys/bus/pci/slots.

Find a suitable device node, for example, a udev-created node that includes the function address:
# ls /dev/**
...
/dev/disk/by-path/pci-1003:00:00.0-nvme-1
Define the device:
<disk type="block" device="disk">
    <driver name="qemu" type="raw" cache="none" io="native" iothread="1"/>
    <source dev="/dev/disk/by-path/pci-1003:00:00.0-nvme-1"/>
    <target dev="vdn" bus="virtio"/>
    <address type="ccw" cssid="0xfe" ssid="0x0" devno="0xe001"/>
</disk>

The guest on the virtual server sees the standard device nodes, which are of the form /dev/vd<x>, where <x> represents one or more letters. The mapping between a nodes and devices does not persist across reboots, and the node assigned by the guest need not match the specification for dev= on the target element.

The guest on the virtual server sees the standard device node /dev/vdn and udev-created device nodes . To see the mapping between the standard device nodes and the udev-created by-path device nodes, enter:
[root@guest:] # ls /dev/disk/by-path -l
...
lrwxrwxrwx 1 root root 9 Oct 11:50 ccw-0.0.e001 -> ../../vdh...
The guest always sees control unit type 3832. The control unit model indicates the device type, where 02 is a block device:
[root@guest:] # lscss
Device   Subchan.  DevType CU Type Use  PIM PAM POM  CHPIDs
----------------------------------------------------------------------
...
0.0.e001 0.0.0000  0000/00 3832/02 yes  80  80  ff   00000000 00000000
...