]> git.proxmox.com Git - qemu-server.git/commitdiff
fix remote viewer live migration
authorDominik Csapak <d.csapak@proxmox.com>
Tue, 20 Aug 2019 08:45:32 +0000 (10:45 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 20 Aug 2019 09:49:24 +0000 (11:49 +0200)
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 <d.csapak@proxmox.com>
PVE/API2/Qemu.pm
PVE/QemuMigrate.pm

index 8be0b7b10461902d1a3059c4cd8e3a71ef48021d..b30931deb5cfc9c49c1b6f07c2cb21b0d90839a1 100644 (file)
@@ -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 = <STDIN>)) {
                chomp $line;
                $spice_ticket = $line;
index bc83816ac95a7053e699e6ff588bcf2e14de9202..94bc40c021efa0bab458a34471d480d2a41782dc 100644 (file)
@@ -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 $@;