Skip to content

Lima instance does not recover from socket_vmnet restart #3020

Open
@nirs

Description

@nirs

Description

If we restart socket_vment limactl will fail to forward packets with this log:

{"level":"error","msg":"Failed to forward packets from VZ to VMNET: write unix -\u003e/var/run/socket_vmnet: write: broken pipe","time":"2024-12-13T21:29:30+02:00"}

From this point the lima0 interface will not receive or send anything since we stopped reading from the the VZ datagram socket and the unix socket connected to socket_vmnet. The only way to recover is to restart the vm.

We can recover from this by changing the forwarding code to reconnect to socket_vment after errors, and start forwarding again. Some packets will be lost, but networking code must be able to recover from lost packets.

This is not easy since we after we get an error on the socket_vmnet socket, we need to stop both io.Copy() goroutines without closing the VZ datagram socketpair. To do this we may need to implement interruptible Copy() instead of using io.Copy().

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions