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)