In case you will specify graphics like this:
<graphics type='spice' port='-1'/>
or
<graphics type='spice' port='-1' tlsPort='6000'/>
libvirt will automatically add autoport='no'. This leads to an issue
that in qemuProcessStop() we don't release that port because we are
releasing both port if autoport=yes or only port marked as reserved.
If autoport=no but we request to generate port via '-1' we need to mark
that port as reserved in order to release it.
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=
1299696
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
goto error;
graphics->data.spice.port = port;
+
+ if (!graphics->data.spice.autoport)
+ graphics->data.spice.portReserved = true;
}
if (needTLSPort || graphics->data.spice.tlsPort == -1) {
goto error;
graphics->data.spice.tlsPort = tlsPort;
+
+ if (!graphics->data.spice.autoport)
+ graphics->data.spice.tlsPortReserved = true;
}
return 0;