> > There will be an additional problem if do this:
> > Who decides which port the `runtime` should listen?
>
> Let the host kernel automatically assign a port using VMADDR_PORT_ANY.
> It works like this:
>
> struct sockaddr_vm svm = {
> .svm_family = AF_VSOCK,
> .svm_port =
> This can be done efficiently as follows:
> 1. kata-runtime listens on a vsock port
> 2. kata-agent-port=PORT is added to the kernel command-line options
> 3. kata-agent parses the port number and connects to the host
>
> This eliminates the reconnection attempts.
There will be an additional
Let me describe the issue with an example via `nc-vsock`:
Let's assume the Guest cid is 3.
execute 'rmmod vmw_vsock_virtio_transport' in Guest,
then execute 'while true; do nc-vsock 3 1234' in Host.
Host Guest
# rmmod