1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2024-12-25 01:34:11 +03:00

qemu: Error out if spice port autoallocation is requested, but disabled

When a user requests auto-allocation of the spice TLS port but spice TLS
is disabled in qemu.conf, we start the machine and let qemu fail instead
of erroring out sooner.

Add an error message so that this doesn't happen.
This commit is contained in:
Peter Krempa 2013-04-29 13:41:27 +02:00
parent 8e91890015
commit eca3fdf738

View File

@ -3292,8 +3292,14 @@ qemuProcessSPICEAllocatePorts(virQEMUDriverPtr driver,
graphics->data.spice.port = port;
}
if (cfg->spiceTLS &&
(needTLSPort || graphics->data.spice.tlsPort == -1)) {
if (needTLSPort || graphics->data.spice.tlsPort == -1) {
if (!cfg->spiceTLS) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
_("Auto allocation of spice TLS port requested "
"but spice TLS is disabled in qemu.conf"));
goto error;
}
if (virPortAllocatorAcquire(driver->remotePorts, &tlsPort) < 0)
goto error;