From ccab68c22c2df2e75a272635d22fd19840274b17 Mon Sep 17 00:00:00 2001 From: Dominik Csapak Date: Tue, 20 Aug 2019 10:45:32 +0200 Subject: [PATCH] fix remote viewer live migration for some reason not setting port results in a port of '65535' which triggers an execption in http-server anyevent, so we set the port to 0 also, we have to read the ticket from stdin even for 'unix' type secure migration Signed-off-by: Dominik Csapak --- PVE/API2/Qemu.pm | 2 +- PVE/QemuMigrate.pm | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/PVE/API2/Qemu.pm b/PVE/API2/Qemu.pm index 8be0b7b..b30931d 100644 --- a/PVE/API2/Qemu.pm +++ b/PVE/API2/Qemu.pm @@ -2048,7 +2048,7 @@ __PACKAGE__->register_method({ # read spice ticket from STDIN my $spice_ticket; - if ($stateuri && ($stateuri eq 'tcp') && $migratedfrom && ($rpcenv->{type} eq 'cli')) { + if ($stateuri && ($stateuri eq 'tcp' || $stateuri eq 'unix') && $migratedfrom && ($rpcenv->{type} eq 'cli')) { if (defined(my $line = )) { chomp $line; $spice_ticket = $line; diff --git a/PVE/QemuMigrate.pm b/PVE/QemuMigrate.pm index bc83816..94bc40c 100644 --- a/PVE/QemuMigrate.pm +++ b/PVE/QemuMigrate.pm @@ -749,7 +749,7 @@ sub phase2 { eval { PVE::QemuServer::vm_mon_cmd_nocheck($vmid, "client_migrate_info", protocol => 'spice', - hostname => $proxyticket, 'tls-port' => $spice_port, + hostname => $proxyticket, 'port' => 0, 'tls-port' => $spice_port, 'cert-subject' => $subject); }; $self->log('info', "client_migrate_info error: $@") if $@; -- 2.39.2