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

No auto-discovery (WSD) #661

Open
inuites opened this issue Mar 24, 2024 · 12 comments
Open

No auto-discovery (WSD) #661

inuites opened this issue Mar 24, 2024 · 12 comments

Comments

@inuites
Copy link

inuites commented Mar 24, 2024

Hi everyone,
I've set up my vDSM with a MacVLAN network. It's working fine; the vDSM has its own IP address (192.168.1.241), and I can manually access the shares in Windows by entering the share path, for example, \192.168.1.241\share1. Unfortunately, SMB discovery isn't working, even though WS-Discovery is activated in the DSM configuration panel. Is there anything else I could do to resolve this issue?

macVLAN settings

docker network create -d macvlan \
    --subnet=192.168.1.0/24 \
    --gateway=192.168.1.1 \
    --ip-range=192.168.1.240/28 \
    -o parent=enp6s18 vdsm

docker-compose.yml:

services:
  dsm:
    container_name: dsm
    image: vdsm/virtual-dsm
    environment:
        RAM_SIZE: "8G"
        CPU_CORES: "4"
        DISK_SIZE: "16G" # system disk
        ALLOCATE: "N" # growable disk
        DISK_FMT: "qcow2" # growable disk
        DEVICE2: "/dev/vdb" # data disk
        DHCP: "Y"
    devices:
        - /dev/kvm
        - /dev/vdb #passthrough proxmox virtual disk to docker
        - /dev/vhost-net
    networks:
      vdsm:
        ipv4_address: 192.168.1.240
    device_cgroup_rules:
        - 'c *:* rwm'
    cap_add:
        - NET_ADMIN
    volumes:
        - /var/dsm:/storage # location of local DSM
    restart: unless-stopped
    stop_grace_period: 1m

networks:
  vdsm:
    external: true

Thank you very much

@kroese
Copy link
Collaborator

kroese commented Mar 24, 2024

Maybe the DSM firewall is activated and needs an exception for WSD discovery. You could try if it makes any difference when disabling the firewall temporarily.

@inuites
Copy link
Author

inuites commented Mar 24, 2024

Thank you for your response. This is a fresh install, and the DSM firewall is off by default. Activating or deactivating the firewall doesn't seem to make a difference.
For additional context, DSM is running in a Debian VM hosted on Proxmox.
Is anyone else experiencing this issue?

@inuites
Copy link
Author

inuites commented Mar 30, 2024

Using nmap it seems that port 3702 used for WS-Discovery is closed on vDSM. I tried also without macvlan and forcing port mapping 3702:3702 but still not working :/
image
image

@kroese
Copy link
Collaborator

kroese commented Mar 30, 2024

The port 3702 with WSDD is UDP and not TCP. So I am not sure if nmap will detect it, because it seems it can only scan TCP ports.

@inuites
Copy link
Author

inuites commented Mar 30, 2024

Yes you're right. I've just tested my real synology and 3702 is closed too so it means nothing

@GreatApo
Copy link

Just commenting for anyone that ends up here due to macvlan setup issues:

  1. Using macvlan is required if you want to share folders at the same port with vDSM shares (e.g. Samba shares). It is also better if you do so when sharing drives from the host to the vDSM through mount remote folders.
  2. If you use portainer, do not setup the macvlan network through it. Instead use the given command.
  3. If you don't know you parent network card (e.g. eth0), you can use the following command (debian):
    find /sys/class/net -type l -not -lname '*virtual*' -printf '%f\n'

@inuites
Copy link
Author

inuites commented Apr 15, 2024

Actually even using ports mapping without Macvlan I can't manage to auto-discover Samba shares with WS Discovery feature. So it looks like that Macvlan has nothing to do with it.

docker compose

services:
dsm:
container_name: dsm
image: vdsm/virtual-dsm
environment:
RAM_SIZE: "4G"
CPU_CORES: "4"
DISK_SIZE: "16G" # system disk
ALLOCATE: "N" # growable disk
DISK_FMT: "qcow2" # growable disk
devices:
- /dev/kvm
cap_add:
- NET_ADMIN
ports:
- 5000:5000
- 137:137
- 138:138
- 139:139
- 445:445
- 3702:3702
- 5357:5357
volumes:
- /var/dsm2:/storage # location of local DSM
restart: on-failure
stop_grace_period: 1m

Note: If I setup an official virtual DSM on true synology device, then WS discovery is working correctly.

@kroese Do you manage to see virtual DSM in windows networks for instance ?

Thank you for your help

@kroese
Copy link
Collaborator

kroese commented Apr 15, 2024

@inuites You mapped 3702 as a TCP port, but for UDP I think it should look something like: - 3702/udp:3702/udp I guess.

I don't have a Windows network at my house and I am not using the container for any file sharing myself (but for Surveillance Station), so I have no easy way to test it. But as nobody ever mentioned this issue before, I just assumed it worked, otherwise I would have expected more people complaining about it.

So maybe someone else who reads this can comment if it works for them or not.

@kroese kroese changed the title MacVLAN but no auto-discovery No auto-discovery (WSD) Apr 15, 2024
@pandamelive
Copy link

我也遇到这个问题,正在寻找解决办法

@emkookmer
Copy link

@inuites,
Did you enable promiscuous mode on proxmox ?

@inuites
Copy link
Author

inuites commented Sep 13, 2024

Thank you for the suggestion.
I enabled it as you recommended, but unfortunately, it doesn't seem to have made a difference.

Have you encountered this issue as well? I can't determine whether it's affecting everyone or just a few users.
Understanding this could help me figure out whether I should focus on the host side, Docker settings, or the container itself to find a solution..

@emkookmer
Copy link

Yes, I've encountered similar issues when running AdguardHome as Docker container with macvlan

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

5 participants