main: print supported protocol versions

Print the supported vm-migration protocol version range in
cloud-hypervisor --version as an extra line:

  vm-migration protocol versions v0-v1

This makes the currently supported compatibility window
visible without having to inspect the migration code.

On-behalf-of: SAP leander.kohler@sap.com
Signed-off-by: Leander Kohler <leander.kohler@cyberus-technology.de>
This commit is contained in:
Leander Kohler
2026-03-18 13:49:21 +01:00
committed by Rob Bradford
parent a098920e19
commit 59e92f1972

View File

@@ -880,6 +880,11 @@ fn main() {
if cmd_arguments.get_flag("version") {
println!("{} {}", env!("CARGO_BIN_NAME"), env!("BUILD_VERSION"));
let migration_protocol_versions = vm_migration::protocol::supported_protocol_versions()
.map(|version| version.to_string())
.collect::<Vec<_>>()
.join(", ");
println!("Migration Protocol Versions: {migration_protocol_versions}");
if cmd_arguments.get_count("v") != 0 {
println!("Enabled features: {:?}", vmm::feature_list());