[PATCH] libxl: Set auto-allocated graphics ports to used on reconnect
Ján Tomko
jtomko at redhat.com
Mon Feb 7 13:38:26 UTC 2022
On a Friday in 2022, Jim Fehlig wrote:
>The libxl driver reconnects to all running VMs when libvirtd is restarted,
>but it failed to mark auto-allocated graphics ports as set in the port
>allocator. If many VMs are running that use port auto-allocation and
>libvirtd is restarted, the port allocator is likely to hand out a port
>already in use when a new VM is created that uses auto-allocation. VM
>creation will fail due to the port clash.
>
In the QEMU driver, we also mark user-specified ports in the allocator,
to let it now it should skip them. But I suppose people worried about
clashes do not use those.
>When reconnecting to running VMs after a libvirtd restart, let the port
>allocator know about previously allocated ports.
>
>Signed-off-by: Jim Fehlig <jfehlig at suse.com>
>---
>
>Like 31e937fb3b, another item unaccounted for when reconnecting to VMs
>after a daemon restart.
>
> src/libxl/libxl_driver.c | 23 +++++++++++++++++++++++
> 1 file changed, 23 insertions(+)
>
Reviewed-by: Ján Tomko <jtomko at redhat.com>
However, I did not find a virPortAllocatorRelease call for the spice
port in src/libxl (for VNC it's done in libxlDomainCleanup )
Jano
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20220207/76a8b9bb/attachment-0001.sig>
More information about the libvir-list
mailing list