migration: Add quiet migration support

Console output required to support migration becomes quite noisy
when doing lots of migrations. Provide a migrate_quiet() call that
suppresses console output and doesn't log a message.

Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Message-ID: <20240221032757.454524-7-npiggin@gmail.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
diff --git a/lib/migrate.c b/lib/migrate.c
index b772165..92d1d95 100644
--- a/lib/migrate.c
+++ b/lib/migrate.c
@@ -19,6 +19,17 @@
 }
 
 /*
+ * Like migrate() but suppress output and logs, useful for intensive
+ * migration stress testing without polluting logs. Test cases should
+ * provide relevant information about migration in failure reports.
+ */
+void migrate_quiet(void)
+{
+	puts("Now migrate the VM (quiet)\n");
+	(void)getchar();
+}
+
+/*
  * Initiate migration and wait for it to complete.
  * If this function is called more than once, it is a no-op.
  */