Arc-V DSM Container
Go to file
2023-04-19 17:33:25 +02:00
.github Update check.yml 2023-04-19 16:27:29 +02:00
agent Update agent version 2023-04-19 04:32:29 +02:00
run KVM_OPTS 2023-04-19 16:24:22 +02:00
serial Order 2023-04-16 13:55:09 +02:00
.dockerignore Update .dockerignore 2023-04-16 06:48:40 +02:00
.gitignore Update .gitignore 2023-04-16 13:29:51 +02:00
docker-compose.yml Update docker-compose.yml 2023-04-13 16:10:02 +02:00
Dockerfile Add serial 2023-04-18 18:42:16 +02:00
readme.md Update readme.md 2023-04-19 17:33:25 +02:00

Virtual DSM for Docker

build_img gh_last_release_svg Docker Image Size Docker Pulls Count

Virtual DSM in a docker container.

Features

  • KVM acceleration
  • Graceful shutdown
  • Upgrades supported

Usage

Via docker-compose.yml

version: "3"
services:
    dsm:
        container_name: dsm
        image: kroese/virtual-dsm:latest
        environment:
            DISK_SIZE: "16G"
        devices:
            - /dev/kvm
        cap_add:
            - NET_ADMIN                       
        ports:
            - 5000:5000
            - 5001:5001
        restart: on-failure
        stop_grace_period: 1m

Via docker run

docker run -it --rm -p 5000:5000 --device=/dev/kvm --cap-add NET_ADMIN --stop-timeout 60 kroese/virtual-dsm:latest

FAQ

  • How do I check if my system supports KVM?

    To check if your system supports KVM run these commands:

    sudo apt install cpu-checker
    sudo kvm-ok
    

    If kvm-ok returns an error stating KVM acceleration cannot be used, you may need to change your BIOS settings.

  • How do I change the size of the virtual disk?

    By default it is 16GB, but you can modify the DISK_SIZE setting in your compose file:

    environment:
      DISK_SIZE: "16G"
    

    To resize the disk to a capacity of 8 terabyte you would use a value of "8T" for example.

  • How do I change the location of the virtual disk?

    By default it resides inside a docker volume, but you can add these lines to your compose file:

    volumes:
      - /home/user/data:/storage
    

    Just replace /home/user/data with the path to the folder you want to use for storage.

  • How do I change the space reserved by the virtual disk?

    By default the total space for the disk is reserved in advance. If you want to only reserve the space that is actually used, add these lines:

    environment:
      ALLOCATE: "N"
    

    This might lower performance a bit, since the image file will need to grow every time new data is added to it.

  • How do I change the amount of CPU/RAM?

    By default an amount of 512MB RAM and 1 vCPU is allocated to the container.

    To increase this you can add the following environment variabeles:

    environment:
      CPU_CORES: "4"
      RAM_SIZE: "2048M"
    
  • How do I give the container a dedicated IP address?

    By default the container uses bridge networking, and is reachable by the IP of the docker host.

    If you want to give it a seperate IP address, create a macvlan network that matches your local subnet, for example:

    $ docker network create -d macvlan \
        --subnet=192.168.0.0/24 \
        --gateway=192.168.0.1 \
        --ip-range=192.168.0.100/28 \
        -o parent=eth0 vlan
    

    And change the network of the container to vlan in your run command or compose file:

     --network vlan --ip=192.168.0.100
    

    This also has the advantage that you don't need to do any portmapping anymore.

  • How do I install a specific version of vDSM?

    By default it installs vDSM 7.2, but if you want to use an older version you can add its URL to your compose file:

    environment:
      URL: "https://global.synologydownload.com/download/DSM/release/7.1.1/42962-1/DSM_VirtualDSM_42962.pat"
    

    You can also switch back and forth between versions this way without loosing your file data.

  • What are the differences compared to standard DSM?

    There are only three minor differences: the Virtual Machine Manager package is not available, Surveillance Station does not include any free licenses, and logging in to your Synology account is not supported.

Acknowledgments

Based on an article by JXCN.

Disclaimer

Only run this container on original Synology hardware, any other use is not permitted and might not be legal.