[pve-devel] [PATCH qemu-server 2/2] Fix 'uninitialized value' warning about guest agent type
Stefan Reiter
s.reiter at proxmox.com
Wed Nov 20 13:24:57 CET 2019
Signed-off-by: Stefan Reiter <s.reiter at proxmox.com>
---
PVE/QemuServer.pm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
index e6369c1..4f968c3 100644
--- a/PVE/QemuServer.pm
+++ b/PVE/QemuServer.pm
@@ -3905,7 +3905,7 @@ sub config_to_command {
my $qgasocket = qmp_socket($vmid, 1);
push @$devices, '-chardev', "socket,path=$qgasocket,server,nowait,id=qga0";
- if ($guest_agent->{type} eq 'virtio') {
+ if (!$guest_agent->{type} || $guest_agent->{type} eq 'virtio') {
my $pciaddr = print_pci_addr("qga0", $bridges, $arch, $machine_type);
push @$devices, '-device', "virtio-serial,id=qga0$pciaddr";
push @$devices, '-device', 'virtserialport,chardev=qga0,name=org.qemu.guest_agent.0';
--
2.20.1
More information about the pve-devel
mailing list