From 148850f693ce93a8e38595bb0dfe8e8900aff931 Mon Sep 17 00:00:00 2001 From: Kamil Trzcinski Date: Mon, 9 Mar 2020 14:32:44 +0100 Subject: [PATCH] Append newline to all QGA commands Since the MacOS Mojave Apple ships AppleQEMUGuestAgent by default. However, it does not fully adhere to QGA specs as they do expect each command to be newline delimited. This makes each command to be newline delimited which is harmless for all other systems (Windows, Linux), but enable guest agent by default without any changes on OSX. Signed-off-by: Kamil Trzcinski Tested-by: Dominik Csapak Reviewed-by: Dominik Csapak --- PVE/QMPClient.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/PVE/QMPClient.pm b/PVE/QMPClient.pm index b5c69214..90cba64d 100644 --- a/PVE/QMPClient.pm +++ b/PVE/QMPClient.pm @@ -263,8 +263,8 @@ my $check_queue = sub { if ($qga) { $qmpcmd = to_json({ execute => 'guest-sync-delimited', - arguments => { id => int($cmd->{id})}}) . - to_json({ execute => $cmd->{execute}, arguments => $cmd->{arguments}}); + arguments => { id => int($cmd->{id})}}) . "\n" . + to_json({ execute => $cmd->{execute}, arguments => $cmd->{arguments}}) . "\n"; } else {