]> git.ipfire.org Git - thirdparty/systemd.git/commit
vmspawn: add nvme disk type support 41301/head
authorChristian Brauner <brauner@kernel.org>
Tue, 24 Mar 2026 13:44:34 +0000 (14:44 +0100)
committerChristian Brauner <brauner@kernel.org>
Tue, 24 Mar 2026 15:53:41 +0000 (16:53 +0100)
commitb76e1732f7c4781db4eb1611f7fdbbd7d8f830ad
treecc9e18f25a2d5f5e32eacc49e3cfb1238a828cec
parente4a58c38e9434e834b726622efc4c9f21d316574
vmspawn: add nvme disk type support

Extend --image-disk-type= and the --extra-drive= disk type prefix to
support nvme in addition to virtio-blk and virtio-scsi:

  systemd-vmspawn --image-disk-type=nvme --image=image.raw
  systemd-vmspawn --image=image.raw --extra-drive=nvme:data.raw

The NVMe serial number is limited to 20 characters by the NVMe spec.
If the image filename exceeds this, it is hashed with SHA-256 and
truncated to 20 hex characters via the disk_serial() helper introduced
in the previous commit.

Signed-off-by: Christian Brauner <brauner@kernel.org>
man/systemd-vmspawn.xml
shell-completion/bash/systemd-vmspawn
src/vmspawn/vmspawn-settings.c
src/vmspawn/vmspawn-settings.h
src/vmspawn/vmspawn.c