Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could not add link chip0: operation not supported #10

Closed
bloatfan opened this issue Jun 2, 2022 · 2 comments
Closed

Could not add link chip0: operation not supported #10

bloatfan opened this issue Jun 2, 2022 · 2 comments

Comments

@bloatfan
Copy link

bloatfan commented Jun 2, 2022

hi, my linux vm setup get in trouble

some log

DEBUG: (utun5) 2022/06/03 01:59:00 Setting up Wireguard on Docker Desktop VM
Creating WireGuard interface chip0
Could not add link chip0: operation not supported
Assigning IP to WireGuard interface
Configuring WireGuard device
Failed to configure wireguard device: file does not exist
Setup container complete

fmt.Printf("Could not add link %s: %v\n", linkAttrs.Name, err)

image

software info

OS: Monterey 12.3.1
Docker Desktop 3.3.3

Can you take a look? Looking forward to your reply,thanks

@gregnr
Copy link
Member

gregnr commented Jun 4, 2022

Hey @lslz627, thank you for reaching out. I was able to reproduce your issue by installing Docker Desktop 3.3.3.

After going through each Docker Desktop version one-by-one, I've finally determined that the issue is related to the Linux kernel version. Docker Desktop 3.3.0 - 3.5.2 uses kernel version 5.10.25-linuxkit which doesn't appear to load the WireGuard kernel module by default (WireGuard is required for docker-mac-net-connect). Tested using:

$ ip link add dev wg0 type wireguard
RTNETLINK answers: Operation not supported

I wasn't able to manually load it either:

$ modprobe wireguard
modprobe: ERROR: ../libkmod/libkmod.c:586 kmod_search_moddep() could not open moddep file '/lib/modules/5.10.25-linuxkit/modules.dep.bin'
modprobe: FATAL: Module wireguard not found in directory /lib/modules/5.10.25-linuxkit

The issue is fixed in Docker Desktop 3.6.0+ which uses kernel version 5.10.47-linuxkit:

$ ip link add dev wg0 type wireguard
$ ip a
...
9: wg0: <POINTOPOINT,NOARP> mtu 1420 qdisc noop state DOWN group default qlen 1000
    link/none

Is there any reason you are using an older version of Docker Desktop? Upgrading to at least 3.6.0 should solve your problem.

I did a deep dive into linuxkit commit history to try to determine what exactly changed between 5.10.25 and 5.10.47, but unfortunately it wasn't clear when this actually happened (first appearance of 5.10.x was already at 5.10.34). Perhaps Docker Desktop used a forked version of linuxkit (you can see they publish their docker/for-desktop-kernel separately from linuxkit/kernel), which unfortunately they don't provide the source code for.

Let me know if this helps you move forward or if you have any other questions.

@bloatfan
Copy link
Author

bloatfan commented Jun 5, 2022

@gregnr Thank you for taking the time to look at my problems,I have upgrade my docker to latest version ( 4.8.2 ) by your remaining and now it's ok

Thanks for your information and for being so helpful, Really appreciate 👍

@bloatfan bloatfan closed this as completed Jun 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants