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.
---
 PVE/QMPClient.pm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/PVE/QMPClient.pm b/PVE/QMPClient.pm
index b5c6921..90cba64 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 {
 
-- 
2.11.0

_______________________________________________
pve-devel mailing list
pve-devel@pve.proxmox.com
https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to