[pve-devel] applied: [PATCH qemu-server 3/4] fix #2493: show QEMU errors in migration log
Thomas Lamprecht
t.lamprecht at proxmox.com
Thu Dec 12 14:18:26 CET 2019
On 12/9/19 4:14 PM, Stefan Reiter wrote:
> QEMU usually only prints warnings and errors and stays silent otherwise,
> so it makes sense to just log all of it's output.
>
> Prefix it with '[<target_hostname>]' to indicate that the output is
> coming from the remote node, so users know where to search for the
> error.
>
> Side effect is that the 'VM start' task created by the migration will
> now show the "QEMU:" prefix, but it's still very readable IMHO.
>
> Signed-off-by: Stefan Reiter <s.reiter at proxmox.com>
> ---
> PVE/QemuMigrate.pm | 4 +++-
> PVE/QemuServer.pm | 12 ++++++++++++
> 2 files changed, 15 insertions(+), 1 deletion(-)
>
applied, thanks!
Did following follow-up:
diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
index c533070..09a1559 100644
--- a/PVE/QemuServer.pm
+++ b/PVE/QemuServer.pm
@@ -5415,12 +5415,7 @@ sub vm_start {
# errors that might occur and show the user
if ($migratedfrom) {
$run_params{quiet} = 1;
- $run_params{logfunc} = sub {
- my $msg = shift;
- return if !$msg;
- chomp $msg;
- print "QEMU: $msg\n";
- };
+ $run_params{logfunc} = sub { print "QEMU: $_[0]\n" };
}
my %properties = (
More information about the pve-devel
mailing list