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>
This commit is contained in:
@@ -61,7 +61,7 @@ _systemd_vmspawn() {
|
||||
elif __contains_word "$prev" ${OPTS[IMAGE_FORMAT]}; then
|
||||
comps='raw qcow2'
|
||||
elif __contains_word "$prev" ${OPTS[IMAGE_DISK_TYPE]}; then
|
||||
comps='virtio-blk virtio-scsi'
|
||||
comps='virtio-blk virtio-scsi nvme'
|
||||
elif __contains_word "$prev" ${OPTS[ARG]}; then
|
||||
comps=''
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user