diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in index bfcdc026e6..e06cf2061b 100644 --- a/docs/formatdomain.html.in +++ b/docs/formatdomain.html.in @@ -2948,6 +2948,13 @@ </backingStore> <target dev='vdd' bus='virtio'/> </disk> + <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> </devices> ... @@ -2961,7 +2968,8 @@ Valid values are "file", "block", "dir" (since 0.7.5), "network" (since 0.8.7), or - "volume" (since 1.0.5) + "volume" (since 1.0.5), or + "nvme" (since 6.0.0) and refer to the underlying source for the disk. Since 0.0.3 @@ -3144,6 +3152,43 @@ Since 1.0.5

+
nvme
+
+ To specify disk source for NVMe disk the source + element has the following attributes: +
+
type
+
The type of address specified in address + sub-element. Currently, only pci value is + accepted. +
+ +
managed
+
This attribute instructs libvirt to detach NVMe + controller automatically on domain startup (yes) + or expect the controller to be detached by system + administrator (no). +
+ +
namespace
+
The namespace ID which should be assigned to the domain. + According to NVMe standard, namespace numbers start from 1, + including. +
+
+ + The difference between <disk type='nvme'> + and <hostdev/> is that the latter is plain + host device assignment with all its limitations (e.g. no live + migration), while the former makes hypervisor to run the NVMe + disk through hypervisor's block layer thus enabling all + features provided by the layer (e.g. snapshots, domain + migration, etc.). Moreover, since the NVMe disk is unbinded + from its PCI driver, the host kernel storage stack is not + involved (compared to passing say /dev/nvme0n1 via + <disk type='block'> and therefore lower + latencies can be achieved. +
With "file", "block", and "volume", one or more optional sub-elements seclabel, described @@ -3306,6 +3351,12 @@ initiator IQN needed to access the source via mandatory attribute name. +
address
+
For disk of type nvme this element + specifies the PCI address of the host NVMe + controller. + Since 6.0.0 +

diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng index f5b51d20ad..e964773f5e 100644 --- a/docs/schemas/domaincommon.rng +++ b/docs/schemas/domaincommon.rng @@ -1610,6 +1610,7 @@ + @@ -1925,6 +1926,37 @@ + + + nvme + + + + + pci + + + + + + + + + + + + + + + + + + + + + + + (ioemu:)?(fd|hd|sd|vd|xvd|ubd)[a-zA-Z0-9_]+ diff --git a/tests/qemuxml2argvdata/disk-nvme.xml b/tests/qemuxml2argvdata/disk-nvme.xml new file mode 100644 index 0000000000..4f4f8b917e --- /dev/null +++ b/tests/qemuxml2argvdata/disk-nvme.xml @@ -0,0 +1,63 @@ + + QEMUGuest1 + c7a5fdbd-edaf-9455-926a-d65c16db1809 + 219136 + 219136 + 1 + + hvm + + + + destroy + restart + destroy + + /usr/bin/qemu-system-i386 + + + +

+ + +
+ + + + +
+ + +
+ + + + +
+ + +
+ + + + +
+ + + + + +
+ + +
+ + + +
+ + + + + +