[PATCH] docs: formatdomain: Document disk serial truncation status quo

Peter Krempa pkrempa at redhat.com
Fri Jun 4 12:08:40 UTC 2021


Disk serials are truncated arbitrarily and silently by qemu depending on
the device type and how they are configured. Since changing the current
state would lead to more regressions than we have now, document that the
truncation is arbitrary.

Signed-off-by: Peter Krempa <pkrempa at redhat.com>
---
 docs/formatdomain.rst | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/docs/formatdomain.rst b/docs/formatdomain.rst
index aa7bb8da14..3ee537da14 100644
--- a/docs/formatdomain.rst
+++ b/docs/formatdomain.rst
@@ -3146,6 +3146,16 @@ paravirtualized driver is specified via the ``disk`` element.
    may look like ``<serial>WD-WMAP9A966149</serial>``. Not supported for
    scsi-block devices, that is those using disk ``type`` 'block' using
    ``device`` 'lun' on ``bus`` 'scsi'. :since:`Since 0.7.1`
+
+   Note that depending on hypervisor and device type the serial number may be
+   truncated silently. IDE/SATA devices are commonly limited to 20 characters.
+   SCSI devices depending on hypervisor version are limited to 20, 36 or 247
+   characters.
+
+   Hypervisors may also start rejecting overly long serials instead of
+   truncating them in the future so it's advised to avoid the implicit
+   truncation by testing the desired serial length range with the desired device
+   and hypervisor combination.
 ``wwn``
    If present, this element specifies the WWN (World Wide Name) of a virtual
    hard disk or CD-ROM drive. It must be composed of 16 hexadecimal digits.
-- 
2.31.1




More information about the libvir-list mailing list