Jump to content
XPEnology Community

NEW: Virtual DSM in Docker


Recommended Posts

Virtual DSM in Docker


I noticed that installing XPEnology was really complicated, so I decided to create an alternative: a docker container of Virtual DSM 7.




  • No bootloader required
  • No PID/VID/MAC required
  • Updates are fully working
  • Light-weight, only 101 MB in size
  • Uses high-performance KVM acceleration just like Synology VMM
  • Completely legal, all installation files are downloaded from Synology servers


It would be nice to get some feedback, so please download it at https://hub.docker.com/r/vdsm/virtual-dsm and let me know what you think!

If you want to participate in development or report some issues, the source code is available at https://github.com/vdsm/virtual-dsm to see.


Edited by Polanskiman
Updated links at the request of OP.
  • Like 10
Link to comment
Share on other sites

i've been waiting for this day to come. Hopefully i can get it to work, and Synology recognizes the build as legit. I've got the image installed in Docker Desktop on MacOS 12. I'm getting a "failed to send flush request: operation not permitted" error at the end of the system install when it tries to boot. Could this be because i didn't set the ports or is it something else? I'm fairly new to Docker FYI, but i have worked with it some for the last 8 months or so. 

Link to comment
Share on other sites

@loganm20 I have tested the container only on Linux x86 architecture, and not on MacOS. Since Mac doesn't have KVM some small changes will be needed to the QEMU parameters to use the macOS hypervisor framework instead. Unfortunately I don't have any Apple devices myself, so I will not be able to try it out.


@apriliars3 Your host OS needs to have KVM support. You can run 'sudo apt install cpu-checker' and afterwards 'sudo kvm-ok' to see if your machine supports it.

  • Like 1
Link to comment
Share on other sites

@kroese Yes, my i3 2120 is compatible.

I’ll try install Ubuntu with docker on Proxmox and test it. I use W11 and macOS but I suppose is not compatible.

With DSM 7.1.1 is very easy to install DSM 7.2 with VMM, but if you haven’t the correct cpu qnd platform not works, but virtual-dsm docker on DSM I don’t know if is possible.

Link to comment
Share on other sites

1 minute ago, loganm20 said:

.desktop won't let me set multiple ports to 5000/5001. maybe that's the issue i'm having?



No, the issue is that it cannot find the /dev/net/tun path specified in the compose file. I think on MacOS it needs to be changed to /dev/tun0 or /dev/tun1 or something like that, but I have no clue how you can find the right name. 

Link to comment
Share on other sites

I have get install virtual-dsm on Ubuntu with Proxmox. 


I have some questions:

- What is the advantage? I can log to my Synology account, but the s/n and mac is genuine.

- This is DSM 7.1.1-42962. Can I update to DSM 7.2 or later?

- I have only one disk 16GB. Can I add more disks? And cores?


There are some limitations compare with Virtual Machine on Proxmox, VMWARE, etc. but its good for try DSM and more.


         Starting DHCP client init...
[  OK  ] Created slice system-dhclient.slice.
[  OK  ] Started DHCP client init.
         Starting eth0 DHCP Client...
[  OK  ] Started Synology space service.
[  OK  ] Started eth0 DHCP Client.
         Starting Synology virtual space service...
[  OK  ] Started rc.network.
         Starting Check if network is ready...
         Starting PPPoE...
         Starting Set Multiple Geteway...
[  OK  ] Started PPPoE.
[  OK  ] Started Synology virtual space service.
         Starting Synology virtual space service phase2...
[  OK  ] Started Set Multiple Geteway.
[  OK  ] Started Synology virtual space service phase2.
[  OK  ] Reached target Synology storage pool.
         Starting Synology filesystem check service...
         Starting Synology Building Tasks Restore for Storage Manager...
         Starting Check Synology HotSpare Config...
[  OK  ] Reached target Network.
         Starting Network Time Service...
         Starting findhost daemon...
         Starting Redis data structure server for webapi...
         Starting Synology SCGI SocketIO...
[  OK  ] Started Synology filesystem check service.
[  OK  ] Started findhost daemon.
[  OK  ] Started Check Synology HotSpare Config.
         Starting Synology volume service...
         Stopping eth0 DHCP Client...
[  OK  ] Stopped eth0 DHCP Client.
         Starting eth0 DHCP Client...
[  OK  ] Started Redis data structure server for webapi.
[  OK  ] Started eth0 DHCP Client.
[  OK  ] Started Synology SCGI.
         Starting Synology SCGI...
[  OK  ] Started Network Time Service.
[  OK  ] Started syno-cgi-keygen.service.
[  OK  ] Started Synology Building Tasks Restore for Storage Manager.
[  OK  ] Started Check if network is ready.
[  OK  ] Reached target Network is Online.
         Starting VPN Client...
         Starting broadcast synorelayd boot state...
         Starting Avahi daemon...
         Starting register ds region by ip...
         Starting Issue VDSM ready for intialization before boot-done....
Mon Apr  3 11:07:20 2023

VirtualDSM login: [   40.892048] raid6: sse2x1   gen()  9601 MB/s
[   40.913043] raid6: sse2x1   xor()  6513 MB/s
[   40.934040] raid6: sse2x2   gen() 11140 MB/s
[   40.955043] raid6: sse2x2   xor()  7541 MB/s
[   40.976043] raid6: sse2x4   gen() 13304 MB/s
[   40.997043] raid6: sse2x4   xor()  8876 MB/s
[   41.001707] raid6: using algorithm sse2x4 gen() 13304 MB/s
[   41.007600] raid6: .... xor() 8876 MB/s, rmw enabled
[   41.013061] raid6: using ssse3x2 recovery algorithm
[   41.030533] xor: automatically using best checksumming function:
[   41.047038]    avx       : 24024.000 MB/sec
[   41.376250] Btrfs loaded, crc32c=crc32c-intel
[   41.385512] BTRFS: device label 2023.04.03-18:07:20 v42962 devid 1 transid 5 /dev/sdb1
[   41.403140] BTRFS info (device sdb1): using free space tree
[   41.409306] BTRFS info (device sdb1): using free block group cache tree
[   41.416341] BTRFS info (device sdb1): has skinny extents
[   41.422039] BTRFS info (device sdb1): flagging fs with big metadata feature
[   41.510219] BTRFS info (device sdb1): BTRFS: root of syno feature tree is null
[   41.561640] BTRFS info (device sdb1): setting 4611686018427387904 campat feature flag
[   41.789426] BTRFS: creating free space tree
[   41.794664] BTRFS info (device sdb1): setting 1 ro feature flag
[   41.945151] BTRFS info (device sdb1): creating UUID tree
[   42.497941] BTRFS info (device sdb1): setting 2 feature flag
[   42.764757] volumetool (7402): drop_caches: 3
[   44.039815] BTRFS info (device sdb1): enabling auto syno reclaim space
[   44.047519] BTRFS info (device sdb1): use ssd allocation scheme
[   44.054379] BTRFS info (device sdb1): turning on discard
[   44.060109] BTRFS info (device sdb1): using free space tree
[   44.066120] BTRFS info (device sdb1): using free block group cache tree
[   44.073298] BTRFS info (device sdb1): has skinny extents
[   44.274075] BTRFS info (device sdb1): BTRFS: root of syno feature tree is null
[   54.204780] capability: warning: `nginx' uses 32-bit capabilities (legacy support in use)
[   60.022382] EXT4-fs (loop0): mounted filesystem with ordered data mode. Opts: (null)
[   61.708169] 8021q: 802.1Q VLAN Support v1.8
[   61.713293] 8021q: adding VLAN 0 to HW filter on device eth0
[   78.804133] Synotify use 16384 event queue size
[   78.811536] Synotify use 16384 event queue size
[  108.195711] fuse init (API version 7.23)
[  151.433956] iSCSI:target_core_rodsp_server.c:1027:rodsp_server_init RODSP server started, login_key(7ef52f196c73).
[  151.517901] iSCSI:extent_pool.c:766:ep_init syno_extent_pool successfully initialized
[  151.566842] iSCSI:target_core_device.c:613:se_dev_align_max_sectors Rounding down aligned max_sectors from 4294967295 to 4294967288
[  151.585817] iSCSI:target_core_configfs.c:5753:target_init_dbroot db_root: cannot open: /etc/target
[  151.596129] iSCSI:target_core_lunbackup.c:360:init_io_buffer_head 512 buffers allocated, total 2097152 bytes successfully
[  151.637818] iSCSI:target_core_file.c:152:fd_attach_hba RODSP plugin for fileio is enabled.
[  151.652795] iSCSI:target_core_file.c:159:fd_attach_hba ODX Token Manager is enabled.
[  151.668399] iSCSI:target_core_multi_file.c:91:fd_attach_hba RODSP plugin for multifile is enabled.
[  151.681309] iSCSI:target_core_ep.c:795:ep_attach_hba RODSP plugin for epio is enabled.
[  151.690493] iSCSI:target_core_ep.c:802:ep_attach_hba ODX Token Manager is enabled.
[  151.899068] workqueue: max_active 1024 requested for vhost_scsi is out of range, clamping between 1 and 512
You can now login to DSM at http://localhost:5000/


Captura de pantalla 2023-04-03 202226.png

Captura de pantalla 2023-04-03 203410.png

Edited by apriliars3
Link to comment
Share on other sites

@apriliars3 Yes you can upgrade to 7.2. You can also do a clean install of 7.2 from scratch by adding this to your docker compose file:


        URL: "https://global.synologydownload.com/download/DSM/beta/7.2/64216/DSM_VirtualDSM_64216.pat"


You can also modify the disk size in this compose file by changing:


        DISK_SIZE: "16G"


I created a FAQ for answers like this on https://github.com/kroese/virtual-dsm (bottom of the page).

  • Thanks 1
Link to comment
Share on other sites

@apriliars3 I made a new version that is compatible with Windows 11 (and MacOS). That means you don't need to use Proxmox anymore. To run it you install Docker Desktop for Windows, and make sure it uses the WSL2 subsystem (I think its the default in Win11). Then go to command prompt (or Powershell) and type:


docker run --rm -it --name dsm -p 5000:5000 -p 5001:5001 --cap-add NET_ADMIN --device="/dev/kvm:/dev/kvm" kroese/virtual-dsm:latest


@loganm20 I think this new version (v1.79) will also work in MacOS, because I removed the need for the TUN interface that caused your error last time. So please try it out. I think you must execute the above line (same as the one for Windows) in the Terminal application, because the Docker application does not allow to specify this NET_ADMIN flag from the GUI. I'm very positive it will work now, fingers crossed!

Link to comment
Share on other sites

@kroese I saw WSL2 with macOS on docker, but is there better than use VirtualBox or VMWare on Windows? I have VM over VMWare and it is very easy to install DSM and passthrought phisical disks.


Other question, the s/n and mac are genuine but you are license? I can´t connect my Synology account and I haven´t active all Synology apps without cmd and other scripts.

Link to comment
Share on other sites

@apriliars3 WSL2 should have higher performance, less overhead and less RAM usage than running a full VM like VirtualBox or VMware. It's just the Linux kernel running via Hyper-V and not a complete OS. But the impost important thing is that it supports KVM acceleration for this docker container, which those others do not.


So I am sure it will run much better via Docker Desktop/WSL2 than via Proxmox/VirtualBox/VMWare. They are made for different things.

Link to comment
Share on other sites

% docker run --rm -it --name dsm -p 5000:5000 -p 5001:5001 --cap-add NET_ADMIN --device="/dev/kvm:/dev/kvm" kroese/virtual-dsm:latest

docker: Error response from daemon: error gathering device information while adding custom device "/dev/kvm": no such file or directory.

Link to comment
Share on other sites

So I got it to say "you may now log into DSM through localhost:5000". So i did, and then it spits out a bunch of code in the terminal like its shutting down and doesn't work. I do get the Synology screen "Sorry the page you're looking for is not found". I keep getting closer but I'm still not into the OS! Any further help would be appreciated! Attaching the terminal output as rtf.

vDSM7x Output loganm20.rtf

Edited by loganm20
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...