From 56439f396488e3e9797b3f9c7e150290c641887d Mon Sep 17 00:00:00 2001 From: Leander Kohler Date: Mon, 9 Feb 2026 11:53:00 +0100 Subject: [PATCH] vmm: deprecate legacy SMBIOS keys in API and CLI Mark serial_number/uuid as deprecated in the OpenAPI schema and emit warnings when those legacy --platform keys are used, while continuing to accept them for compatibility. On-behalf-of: SAP leander.kohler@sap.com Signed-off-by: Leander Kohler --- vmm/src/api/openapi/cloud-hypervisor.yaml | 2 ++ vmm/src/config.rs | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/vmm/src/api/openapi/cloud-hypervisor.yaml b/vmm/src/api/openapi/cloud-hypervisor.yaml index c5e360f1a..54a0e743d 100644 --- a/vmm/src/api/openapi/cloud-hypervisor.yaml +++ b/vmm/src/api/openapi/cloud-hypervisor.yaml @@ -790,10 +790,12 @@ components: type: string serial_number: type: string + deprecated: true system_uuid: type: string uuid: type: string + deprecated: true oem_strings: type: array items: diff --git a/vmm/src/config.rs b/vmm/src/config.rs index 0627018c6..232ba158e 100644 --- a/vmm/src/config.rs +++ b/vmm/src/config.rs @@ -1002,6 +1002,9 @@ impl PlatformConfig { let legacy_serial_number = parser .convert::("serial_number") .map_err(Error::ParsePlatform)?; + if legacy_serial_number.is_some() { + warn!("'serial_number' in --platform is deprecated; use 'system_serial_number'."); + } platform_config.system_serial_number = platform_config .system_serial_number .or(legacy_serial_number); @@ -1009,6 +1012,9 @@ impl PlatformConfig { let legacy_uuid = parser .convert::("uuid") .map_err(Error::ParsePlatform)?; + if legacy_uuid.is_some() { + warn!("'uuid' in --platform is deprecated; use 'system_uuid'."); + } platform_config.system_uuid = platform_config.system_uuid.or(legacy_uuid); Ok(platform_config)