vdsm/virtual-dsm

No auto-discovery (WSD)

inuites opened this issue · 8 comments

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

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.

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?

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

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.

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

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'

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

@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.