monitor_print only does anything for foreground commands, so we
don't ever see this error message in the case of a 'migrate -d'.
It also doesn't do much good to print a monitor error message if
the migration is being driven by something like libvirt.  Both
of these seem to be the typical usage scenarios, so we might as
well print this error to stderr so it can at least be found in
the log messages.

Signed-off-by: Alex Williamson <alex.william...@redhat.com>
---

 savevm.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/savevm.c b/savevm.c
index 90aa237..c6b9b01 100644
--- a/savevm.c
+++ b/savevm.c
@@ -1543,7 +1543,7 @@ int qemu_savevm_state_complete(Monitor *mon, QEMUFile *f)
 
         r = vmstate_save(f, se);
         if (r < 0) {
-            monitor_printf(mon, "cannot migrate with device '%s'\n", 
se->idstr);
+            fprintf(stderr, "cannot migrate with device '%s'\n", se->idstr);
             return r;
         }
     }


Reply via email to