diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index c5b9f4e6b2ba54199843c31bb6403f5b4190900d..e76018243897c0bd665b2175b39a65ee47ed00ae 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_process.c @@ -3688,6 +3688,9 @@ qemuProcessSPICEAllocatePorts(virQEMUDriverPtr driver, goto error; graphics->data.spice.port = port; + + if (!graphics->data.spice.autoport) + graphics->data.spice.portReserved = true; } if (needTLSPort || graphics->data.spice.tlsPort == -1) { @@ -3702,6 +3705,9 @@ qemuProcessSPICEAllocatePorts(virQEMUDriverPtr driver, goto error; graphics->data.spice.tlsPort = tlsPort; + + if (!graphics->data.spice.autoport) + graphics->data.spice.tlsPortReserved = true; } return 0;